Skip to content

Commit caeeb8f

Browse files
committed
tests for lower php
1 parent d8a581f commit caeeb8f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/PackageJsonSynchronizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function synchronize(array $phpPackages): bool
4343
// Remove all links and add again only the existing packages
4444
try {
4545
$didAddLink = $this->removePackageJsonLinks((new JsonFile($this->rootDir.'/package.json'))->read());
46-
} catch (ParsingException) {
46+
} catch (ParsingException $e) {
4747
// if package.json is invalid (possible during a recipe upgrade), we can't update the file
4848
return false;
4949
}

tests/Configurator/ComposerScriptsConfiguratorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function testUpdate()
169169
['cache:clear' => 'other-cmd', 'do:cool-stuff' => 'symfony-cmd']
170170
);
171171

172-
$this->assertSame(['composer.json' => <<<EOF
172+
$expectedComposerJsonOriginal = <<<EOF
173173
{
174174
"scripts": {
175175
"auto-scripts": {
@@ -185,10 +185,10 @@ public function testUpdate()
185185
}
186186
}
187187
188-
EOF
189-
], $recipeUpdate->getOriginalFiles());
188+
EOF;
189+
$this->assertSame(['composer.json' => $expectedComposerJsonOriginal], $recipeUpdate->getOriginalFiles());
190190

191-
$this->assertSame(['composer.json' => <<<EOF
191+
$expectedComposerJsonNew = <<<EOF
192192
{
193193
"scripts": {
194194
"auto-scripts": {
@@ -205,7 +205,7 @@ public function testUpdate()
205205
}
206206
}
207207
208-
EOF
209-
], $recipeUpdate->getNewFiles());
208+
EOF;
209+
$this->assertSame(['composer.json' => $expectedComposerJsonNew], $recipeUpdate->getNewFiles());
210210
}
211211
}

tests/Fixtures/update_recipes/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"type": "project",
33
"license": "proprietary",
44
"require": {
5-
"php": "^8.0",
6-
"symfony/console": "6.0.*"
5+
"php": ">=7.1",
6+
"symfony/console": "5.4.*"
77
},
88
"config": {
99
"allow-plugins": {

0 commit comments

Comments
 (0)