Skip to content

Commit

Permalink
fix: Do not refer to the composer.json file when decoding the compose…
Browse files Browse the repository at this point in the history
…r.lock file (#1289)

fix: Do not refer to the composer.json file when decoding the
composer.lock file
  • Loading branch information
theofidry authored Dec 16, 2023
1 parent 5504e12 commit 0a76ccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,7 @@ private static function retrieveComposerArtifact(string $path): ?ComposerArtifac
} catch (ParsingException $exception) {
throw new InvalidArgumentException(
sprintf(
'Expected the file "%s" to be a valid composer.json file but an error has been found: %s',
'Expected the file "%s" to be a valid JSON file but an error has been found: %s',
$path,
$exception->getMessage(),
),
Expand Down
4 changes: 2 additions & 2 deletions tests/Configuration/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function test_it_throws_an_error_when_a_composer_file_is_found_but_invali

self::assertSame(
<<<EOF
Expected the file "{$composerJson}" to be a valid composer.json file but an error has been found: Parse error on line 1:
Expected the file "{$composerJson}" to be a valid JSON file but an error has been found: Parse error on line 1:
^
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
Expand All @@ -383,7 +383,7 @@ public function test_it_throws_an_error_when_a_composer_lock_is_found_but_invali

self::assertSame(
<<<EOF
Expected the file "{$composerLock}" to be a valid composer.json file but an error has been found: Parse error on line 1:
Expected the file "{$composerLock}" to be a valid JSON file but an error has been found: Parse error on line 1:
^
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
Expand Down

0 comments on commit 0a76ccc

Please sign in to comment.