Skip to content

Commit d970e34

Browse files
Updating to composer 1.9.2 support
1 parent 609d603 commit d970e34

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
],
77
"type": "project",
88
"require": {
9-
"composer/composer": "<=1.8.0",
9+
"composer/composer": "<=1.9.2",
1010
"composer-plugin-api": "^1.0"
1111
},
1212
"require-dev": {

src/Magento/ComposerRootUpdatePlugin/Plugin/Commands/MageRootRequireCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ protected function configure()
117117
);
118118

119119
$mageHelp = '
120+
120121
<comment>Magento Root Updates:</comment>
121122
With <info>' . PluginDefinition::PACKAGE_NAME . "</info> installed, <info>$origName</info> will also check for and
122123
execute any changes to the root composer.json file that exist between the Magento

src/Magento/ComposerRootUpdatePlugin/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "magento/composer-root-update-plugin",
33
"description": "Plugin to look ahead for Magento project root changes when running composer update for new Magento versions",
4-
"version": "0.1.0",
4+
"version": "0.1.1",
55
"license": [
66
"OSL-3.0",
77
"AFL-3.0"
88
],
99
"type": "composer-plugin",
1010
"require": {
11-
"composer/composer": "<=1.8.0",
11+
"composer/composer": "<=1.9.2",
1212
"composer-plugin-api": "^1.0"
1313
},
1414
"autoload": {

tests/Unit/Magento/ComposerRootUpdatePlugin/Updater/DeltaResolverTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,18 @@ public function setUp()
469469
$this->console = new Console($this->io);
470470
$this->retriever = $this->createPartialMock(
471471
RootPackageRetriever::class,
472-
['getOriginalRootPackage', 'getTargetRootPackage', 'getUserRootPackage']
472+
[
473+
'getOriginalRootPackage',
474+
'getOriginalLabel',
475+
'getTargetRootPackage',
476+
'getTargetLabel',
477+
'getUserRootPackage'
478+
]
473479
);
474480
$this->retriever->method('getOriginalRootPackage')->willReturn(null);
481+
$this->retriever->method('getOriginalLabel')->willReturn('Magento Open Source 1.0.0');
475482
$this->retriever->method('getTargetRootPackage')->willReturn(null);
483+
$this->retriever->method('getTargetLabel')->willReturn('Magento Open Source 2.0.0');
476484
$this->retriever->method('getUserRootPackage')->willReturn(null);
477485
}
478486
}

tests/Unit/Magento/ComposerRootUpdatePlugin/Updater/MagentoRootUpdaterTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,17 +310,21 @@ public function setUp()
310310
'getOriginalRootPackage',
311311
'getOriginalEdition',
312312
'getOriginalVersion',
313+
'getOriginalLabel',
313314
'getTargetRootPackage',
314315
'getTargetEdition',
315316
'getTargetVersion',
317+
'getTargetLabel',
316318
'getUserRootPackage'
317319
]);
318320
$retriever->method('getOriginalRootPackage')->willReturn($baseRoot);
319321
$retriever->method('getOriginalEdition')->willReturn('community');
320322
$retriever->method('getOriginalVersion')->willReturn('1.0.0.0');
323+
$retriever->method('getOriginalLabel')->willReturn('Magento Open Source 1.0.0');
321324
$retriever->method('getTargetRootPackage')->willReturn($targetRoot);
322325
$retriever->method('getTargetEdition')->willReturn('community');
323326
$retriever->method('getTargetVersion')->willReturn('2.0.0.0');
327+
$retriever->method('getTargetLabel')->willReturn('Magento Open Source 2.0.0');
324328
$retriever->method('getUserRootPackage')->willReturn($installRoot);
325329

326330
$this->retriever = $retriever;

0 commit comments

Comments
 (0)