Skip to content

Commit 799c606

Browse files
committed
Document incompatibilities with Symfony Framework and symfony/phpunit-bridge
1 parent 9ba81d4 commit 799c606

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ Step 2) When executing `phpunit` from the command-line, enable slowness profilin
174174
$ PHPUNIT_SPEEDTRAP=enabled ./vendor/bin/phpunit
175175
```
176176

177+
## Using with Symfony Framework
178+
179+
**Executing `vendor/bin/simple-phpunit` will not work while PHPUnit SpeedTrap is installed.**
180+
181+
**Use the PHPUnit binary `vendor/bin/phpunit` while PHPUnit SpeedTrap is installed.**
182+
183+
[Symfony Framework](https://symfony.com/) comes with package [symfony/phpunit-bridge](https://packagist.org/packages/symfony/phpunit-bridge) that installs its own version of PHPUnit and **ignores** what is defined in your project's composer.json or composer.lock file. See the PHPUnit versions it installs with command `ls vendor/bin/.phpunit/`
184+
185+
symfony/phpunit-bridge allows environment variable `SYMFONY_PHPUNIT_VERSION` to define the PHPUnit version it uses. However, this appears incompatible with PHPUnit SpeedTrap.
186+
187+
Please submit a PR if you have a solution!
188+
177189
## Inspiration
178190

179191
SpeedTrap was inspired by [RSpec's](https://github.com/rspec/rspec) `--profile` option that displays feedback about slow tests.

0 commit comments

Comments
 (0)