Replicated on 3 different linux machines, fresh install of phpunit causes PHP Fatal error on any usage.
$ wget https://phar.phpunit.de/phpunit.phar
$ chmod +x phpunit.phar
$ ./phpunit.phar
PHP Fatal error: Class phpDocumentor\Reflection\DocBlock\Tags\Example contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (phpDocumentor\Reflection\DocBlock\Tag::__toString) in phar:///usr/local/bin/phpunit/phpdocumentor-reflection-docblock/DocBlock/Tags/Example.php on line 148
$ sudo mv phpunit.phar phpunit
$ which phpunit
/usr/local/bin/phpunit
$ phpunit --version
PHP Fatal error: Class phpDocumentor\Reflection\DocBlock\Tags\Example contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (phpDocumentor\Reflection\DocBlock\Tag::__toString) in phar:///usr/local/bin/phpunit/phpdocumentor-reflection-docblock/DocBlock/Tags/Example.php on line 148
same here - had to downgrade to 5.4.2
The PHPUnit 5.4.3 PHAR has been unpublished.
I will release PHPUnit 5.4.4 PHAR once https://github.com/phpDocumentor/ReflectionDocBlock/pull/77 has been fixed.
I have released PHPUnit 5.4.4 with e44789661bc689e645b11e1833007a1971e51064 in place to pull in a version of phpdocumentor/reflection-docblock that is not broken.
OK, there are some rather complicated tips floating around like "Use composer to install drush" etc which cause major problems (for instance if you install it with composer it's not available for every user and so on). The solution for me was simply to enter this in your Drupal folder:
composer require phpdocumentor/reflection-docblock ^2.0
This will add the required DocBook version to your composer.json file and then update your DocBook version. Perhaps this helps someone.
I get " [UnexpectedValueException]
Could not parse version constraint LICENSE.txt: Invalid version string "LICENSE.txt" " when I do "composer require phpdocumentor/reflection-docblock ^2.0". @rgpublic
Most helpful comment
I will release PHPUnit 5.4.4 PHAR once https://github.com/phpDocumentor/ReflectionDocBlock/pull/77 has been fixed.