Closed GPHemsley-RELX closed 3 years ago
You need to unpack the pack and manage your deps explicitly.
@nicolas-grekas Are you saying this is by design?
Yes: packs are now unpacked by default to let ppl manage their deps explicitly. Please upgrade flex and unpack packs if you started your project before this change.
Is there documentation for this? How can I tell if a package is a pack?
If the field type
from its composer.json
is equal to symfony-pack
, see https://github.com/symfony/test-pack/blob/main/composer.json#L3
Also, packs always have the -pack
suffix.
You might want to check https://github.com/symfony/flex/pull/655 and to run composer help unpack
I think there is a still a problem with this design because following the symfony testing documentation exposes us to breaking changes.
PHP Fatal error: Uncaught Error: Class "PHPUnit\TextUI\Command" not found in /srv/app/bin/phpunit:11
Stack trace:
#0 {main}
thrown in /srv/app/bin/phpunit on line 11
The PHPUnit\TextUI\Command class In PHPUnit 9.6.1 has been removed in PHPUnit 10.0.0
Just spent an hour to understand I have to downgrade the PHPUnit version autmaticaly installed
I think there is a still a problem with this design because following the symfony testing documentation exposes us to breaking changes.
PHP Fatal error: Uncaught Error: Class "PHPUnit\TextUI\Command" not found in /srv/app/bin/phpunit:11 Stack trace: #0 {main} thrown in /srv/app/bin/phpunit on line 11
The PHPUnit\TextUI\Command class In PHPUnit 9.6.1 has been removed in PHPUnit 10.0.0
Just spent an hour to understand I have to downgrade the PHPUnit version autmaticaly installed
Agree! I spent 2 hours debugging
My package has a dev dependency on both symfony/phpunit-bridge and symfony/test-pack. I run my tests with
vendor/bin/simple-phpunit
.After updating to test-pack 1.0.8, which adds a direct dependency on phpunit/phpunit, my tests no longer run, as invoking simple-phpunit immediately fails with an error:
I am running Symfony 4.4 on PHP 7.4.