Fatal error: Class 'PHP_Token_ELLIPSIS' not found
aurora opened this issue · comments
hey,
I tried to analyze a codebase that contains variadics using phpdcd but that failed with the following error message:
Fatal error: Class 'PHP_Token_ELLIPSIS' not found in phar:///usr/local/bin/phpdcd/php-token-stream/Token/Stream.php on line 218
Call Stack:
0.0006 275888 1. {main}() /usr/local/bin/phpdcd:0
0.0091 1299224 2. Symfony\Component\Console\Application->run() /usr/local/bin/phpdcd:323
0.0115 1635240 3. SebastianBergmann\PHPDCD\CLI\Application->doRun() phar:///usr/local/bin/phpdcd/symfony/console/Symfony/Component/Console/Application.php:121
0.0116 1636448 4. Symfony\Component\Console\Application->doRun() phar:///usr/local/bin/phpdcd/src/CLI/Application.php:136
0.0117 1637320 5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/local/bin/phpdcd/symfony/console/Symfony/Component/Console/Application.php:191
0.0118 1637656 6. Symfony\Component\Console\Command\Command->run() phar:///usr/local/bin/phpdcd/symfony/console/Symfony/Component/Console/Application.php:892
0.0120 1641088 7. SebastianBergmann\PHPDCD\CLI\Command->execute() phar:///usr/local/bin/phpdcd/symfony/console/Symfony/Component/Console/Command/Command.php:241
0.2740 2310104 8. SebastianBergmann\PHPDCD\Detector->detectDeadCode() phar:///usr/local/bin/phpdcd/src/CLI/Command.php:137
1.0693 7722416 9. SebastianBergmann\PHPDCD\Analyser->analyseFile() phar:///usr/local/bin/phpdcd/src/Detector.php:69
1.0696 7726136 10. SebastianBergmann\PHPDCD\Analyser->analyseSourceCode() phar:///usr/local/bin/phpdcd/src/Analyser.php:159
1.0696 7726840 11. PHP_Token_Stream->__construct() phar:///usr/local/bin/phpdcd/src/Analyser.php:179
1.0696 7726840 12. PHP_Token_Stream->scan() phar:///usr/local/bin/phpdcd/php-token-stream/Token/Stream.php:152
I had a look at php-token-stream and it seems, that the ELLIPSIS token is not implemented, yet ... ?
This was fixed in 1.3.0.
You are right ... seems that the version downloadable from https://phar.phpunit.de/phpdcd.phar is outdated ... sorry!