Call to undefined method SebastianBergmann\Environment\Runtime::discardsComments()
frank667 opened this issue · 1 comments
frank667 commented
I have the following error in our buildserver:
phpunit:
[phpunit] PHPUnit 6.4.4 by Sebastian Bergmann and contributors.
[phpunit]
[phpunit] Runtime: PHP 7.1.7
[phpunit] Configuration: C:\Program Files (x86)\Jenkins\workspace\Destiny\build\phpunit.xml
[phpunit]
[phpunit] Fatal error: Uncaught Error: Call to undefined method SebastianBergmann\Environment\Runtime::discardsComments() in C:\Users\jenkins\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:332
[phpunit] Stack trace:
[phpunit] #0 C:\Users\jenkins\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Command.php(195): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
[phpunit] #1 C:\Users\jenkins\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Command.php(148): PHPUnit\TextUI\Command->run(Array, true)
[phpunit] #2 C:\Users\jenkins\AppData\Roaming\Composer\vendor\phpunit\phpunit\phpunit(53): PHPUnit\TextUI\Command::main()
[phpunit] #3 {main}
[phpunit] thrown in C:\Users\jenkins\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 332
[phpunit] Result: 255
I installed phpunit with global with composer so all our php-projects are treated the same:
composer global require 'phpunit/phpunit ^6.4'
Is there a dependency that's missing?
Cheers,
Frank
sebastianbergmann commented
I don't understand why this was reported for PHPLOC. That being said, it appears that you have different installations of PHPUnit mixed up.
For instance, you may have used Composer to install PHPUnit and have configured the autoloader generated by Composer as PHPUnit's bootstrap script but then you invoke PHPUnit using an executable other than vendor/bin/phpunit
.