File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/Symfony/Bridge/PhpUnit/bin Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change <
991C
tr class="diff-line-row">@@ -283,6 +283,16 @@ class SymfonyExcludeListPhpunit {}
283283 chdir ($ oldPwd );
284284}
285285
286+ // Create a symlink with a predictable path pointing to the currently used version.
287+ // This is useful for static analytics tools such as PHPStan having to load PHPUnit's classes
288+ // and for other testing libraries such as Behat using PHPUnit's assertions.
289+ chdir ($ PHPUNIT_DIR );
290+ if (file_exists ('phpunit ' )) {
291+ unlink ('phpunit ' );
292+ }
293+ symlink ($ PHPUNIT_VERSION_DIR , 'phpunit ' );
294+ chdir ($ oldPwd );
295+
286296if ($ PHPUNIT_VERSION < 8.0 ) {
287297 $ argv = array_filter ($ argv , function ($ v ) use (&$ argc ) {
288298 if ('--do-not-cache-result ' !== $ v ) {
You can’t perform that action at this time.
0 commit comments