File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1313 "require" : {
1414 "php" : " ^7.2 || ^8.0" ,
1515 "ext-json" : " *" ,
16- "composer/composer" : " <2.3 " ,
16+ "composer/composer" : " ^1.4 || ^2.0 " ,
1717 "composer/semver" : " @stable" ,
1818 "symfony/config" : " ^3.3||^4.4||^5.0" ,
1919 "symfony/console" : " ^2.6||^4.0||^5.0" ,
Original file line number Diff line number Diff line change 1212use Composer \Package \RootPackageInterface ;
1313use Composer \Repository \RepositoryManager ;
1414use Composer \Repository \WritableRepositoryInterface ;
15+ use Composer \Repository \InstalledRepositoryInterface ;
1516use Magento \CloudPatches \Composer \MagentoVersion ;
1617use PHPUnit \Framework \MockObject \MockObject ;
1718use PHPUnit \Framework \TestCase ;
@@ -24,7 +25,7 @@ class MagentoVersionTest extends TestCase
2425 const VERSION = '2.3.5 ' ;
2526
2627 /**
27- * @var WritableRepositoryInterface|MockObject
28+ * @var WritableRepositoryInterface|InstalledRepositoryInterface| MockObject
2829 */
2930 private $ repository ;
3031
@@ -43,7 +44,11 @@ class MagentoVersionTest extends TestCase
4344 */
4445 protected function setUp (): void
4546 {
46- $ this ->repository = $ this ->getMockForAbstractClass (WritableRepositoryInterface::class);
47+ $ this ->repository = $ this ->getMockForAbstractClass (
48+ (version_compare (PHP_VERSION , '7.3 ' ) == -1 )
49+ ? WritableRepositoryInterface::class
50+ : InstalledRepositoryInterface::class
51+ );
4752 $ this ->rootPackage = $ this ->getMockForAbstractClass (RootPackageInterface::class);
4853 $ repositoryManager = $ this ->createMock (RepositoryManager::class);
4954 $ repositoryManager ->method ('getLocalRepository ' )
You can’t perform that action at this time.
0 commit comments