Make the root package name and path dynamically discovered in MakerTestCase#1770
Open
GromNaN wants to merge 7 commits intosymfony:1.xfrom
Open
Make the root package name and path dynamically discovered in MakerTestCase#1770GromNaN wants to merge 7 commits intosymfony:1.xfrom
MakerTestCase#1770GromNaN wants to merge 7 commits intosymfony:1.xfrom
Conversation
stof
reviewed
Jan 9, 2026
stof
reviewed
Jan 9, 2026
MakerTestCaseMakerTestCase
stof
reviewed
Jan 9, 2026
Use Composer\InstalledVersions::getRootPackage() to retrieve the path and name of the root package under test Locate the fixtures and cache directory relatively to this package
GromNaN
commented
Jan 10, 2026
| } | ||
|
|
||
| public function runCommand(string $command): MakerTestProcess | ||
| public function runCommand(string|array $command): MakerTestProcess |
Member
Author
There was a problem hiding this comment.
Not a breaking change because the class is internal.
| } | ||
|
|
||
| public static function create($commandLine, $cwd, array $envVars = [], $timeout = null): self | ||
| public static function create(string|array $commandLine, string $cwd, array $envVars = [], ?float $timeout = null): self |
Member
Author
There was a problem hiding this comment.
Not a breaking change because the class is final and internal
stof
reviewed
Jan 14, 2026
| } | ||
|
|
||
| public function runCommand(string $command): MakerTestProcess | ||
| public function runCommand(string|array $command): MakerTestProcess |
Member
There was a problem hiding this comment.
I suggest adding a phpdoc @param string|list<string> $command to document the type of the array.
792a3a9 to
be0ce3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An issue when using the
MakerTestCaseto test maker classes provided by other packages, is that it depends on thetestsdirectory of thesymfony/maker-bundlepackage.In this PR, we use
Composer\InstalledVersions::getRootPackage()to retrieve the path and name of the root package under test. This way, that's the tested package that is linked into the temporary test projects.This assumes a certain structure of the maker package (
src,testsandtests/fixturesdirs,tests/tmpignored,tools/twigcssubproject).