Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php 5.5 +phpunit 4.8.27 = crash on phpDocumentor #2282

Closed
greg0ire opened this issue Aug 30, 2016 · 7 comments
Closed

php 5.5 +phpunit 4.8.27 = crash on phpDocumentor #2282

greg0ire opened this issue Aug 30, 2016 · 7 comments

Comments

@greg0ire
Copy link
Contributor

greg0ire commented Aug 30, 2016

I'm trying to get a build to pass on a PR where :

  • phpunit-old.phar is used
  • I'm requiring a library that depends on phpunit too, namely matthiasnoback/symfony-dependency-injection-test

All jobs for this PR pass but the 5.5 build. That means even the 5.3 and 5.4 builds, that also use phpunit-old.phar

Test output :

............PHP Fatal error:  phpDocumentor\Reflection\DocBlock\Tags\BaseTag cannot implement phpDocumentor\Reflection\DocBlock\Tag - it is not an interface in /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php on line 22
PHP Stack trace:
PHP   1. {main}() /home/travis/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /home/travis/bin/phpunit:552
PHP   3. PHPUnit_TextUI_Command->run() phar:///home/travis/bin/phpunit/phpunit/TextUI/Command.php:100
PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///home/travis/bin/phpunit/phpunit/TextUI/Command.php:149
PHP   5. PHPUnit_Framework_TestSuite->run() phar:///home/travis/bin/phpunit/phpunit/TextUI/TestRunner.php:440
PHP   6. PHPUnit_Framework_TestSuite->run() phar:///home/travis/bin/phpunit/phpunit/Framework/TestSuite.php:747
PHP   7. PHPUnit_Framework_TestCase->run() phar:///home/travis/bin/phpunit/phpunit/Framework/TestSuite.php:747
PHP   8. PHPUnit_Framework_TestResult->run() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:724
PHP   9. PHPUnit_Framework_TestCase->runBare() phar:///home/travis/bin/phpunit/phpunit/Framework/TestResult.php:612
PHP  10. PHPUnit_Framework_TestCase->runTest() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:768
PHP  11. ReflectionMethod->invokeArgs() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:909
PHP  12. Sonata\AdminBundle\Tests\Admin\AdminTest->testCheckAccessThrowsAccessDeniedException() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:909
PHP  13. Prophecy\Prophecy\ObjectProphecy->getAccessMapping() /home/travis/build/sonata-project/SonataAdminBundle/Tests/Admin/AdminTest.php:132
PHP  14. Prophecy\Prophecy\ObjectProphecy->__call() /home/travis/build/sonata-project/SonataAdminBundle/Tests/Admin/AdminTest.php:132
PHP  15. Prophecy\Prophecy\MethodProphecy->__construct() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Prophecy/ObjectProphecy.php:256
PHP  16. Prophecy\Prophecy\ObjectProphecy->reveal() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Prophecy/MethodProphecy.php:48
PHP  17. Prophecy\Doubler\LazyDouble->getInstance() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Prophecy/ObjectProphecy.php:114
PHP  18. Prophecy\Doubler\Doubler->double() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/LazyDouble.php:122
PHP  19. Prophecy\Doubler\Doubler->createDoubleClass() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/Doubler.php:105
PHP  20. Prophecy\Doubler\ClassPatch\MagicCallPatch->apply() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/Doubler.php:138
PHP  21. Prophecy\PhpDocumentor\ClassAndInterfaceTagRetriever->getTagList() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/ClassPatch/MagicCallPatch.php:57
PHP  22. Prophecy\PhpDocumentor\ClassTagRetriever->getTagList() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php:48
PHP  23. phpDocumentor\Reflection\DocBlockFactory->create() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/PhpDocumentor/ClassTagRetriever.php:45
PHP  24. phpDocumentor\Reflection\DocBlockFactory->parseTagBlock() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php:96
PHP  25. phpDocumentor\Reflection\DocBlock\StandardTagFactory->create() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php:231
PHP  26. phpDocumentor\Reflection\DocBlock\StandardTagFactory->createTag() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:116
PHP  27. phpDocumentor\Reflection\DocBlock\StandardTagFactory->fetchParametersForHandlerFactoryMethod() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:191
PHP  28. ReflectionMethod->__construct() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:265
PHP  29. spl_autoload_call() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:265
PHP  30. Composer\Autoload\ClassLoader->loadClass() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:265
PHP  31. Composer\Autoload\includeFile() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:301
PHP  32. include() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:412
PHP  33. spl_autoload_call() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:20
PHP  34. Composer\Autoload\ClassLoader->loadClass() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:20
PHP  35. Composer\Autoload\includeFile() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:301
PHP  36. include() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:412

Fatal error: phpDocumentor\Reflection\DocBlock\Tags\BaseTag cannot implement phpDocumentor\Reflection\DocBlock\Tag - it is not an interface in /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php on line 22

Call Stack:
    0.0014     472288   1. {main}() /home/travis/bin/phpunit:0
    0.1533   15057376   2. PHPUnit_TextUI_Command::main() /home/travis/bin/phpunit:552
    0.1534   15064504   3. PHPUnit_TextUI_Command->run() phar:///home/travis/bin/phpunit/phpunit/TextUI/Command.php:100
    1.3469   45343984   4. PHPUnit_TextUI_TestRunner->doRun() phar:///home/travis/bin/phpunit/phpunit/TextUI/Command.php:149
    6.0570   45459472   5. PHPUnit_Framework_TestSuite->run() phar:///home/travis/bin/phpunit/phpunit/TextUI/TestRunner.php:440
    8.7962   55351712   6. PHPUnit_Framework_TestSuite->run() phar:///home/travis/bin/phpunit/phpunit/Framework/TestSuite.php:747
    9.1435   52880472   7. PHPUnit_Framework_TestCase->run() phar:///home/travis/bin/phpunit/phpunit/Framework/TestSuite.php:747
    9.1435   52880424   8. PHPUnit_Framework_TestResult->run() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:724
    9.1456   52880896   9. PHPUnit_Framework_TestCase->runBare() phar:///home/travis/bin/phpunit/phpunit/Framework/TestResult.php:612
    9.1510   52897592  10. PHPUnit_Framework_TestCase->runTest() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:768
    9.1512   52898448  11. ReflectionMethod->invokeArgs() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:909
    9.1512   52898744  12. Sonata\AdminBundle\Tests\Admin\AdminTest->testCheckAccessThrowsAccessDeniedException() phar:///home/travis/bin/phpunit/phpunit/Framework/TestCase.php:909
    9.2477   53605344  13. Prophecy\Prophecy\ObjectProphecy->getAccessMapping() /home/travis/build/sonata-project/SonataAdminBundle/Tests/Admin/AdminTest.php:132
    9.2477   53605704  14. Prophecy\Prophecy\ObjectProphecy->__call() /home/travis/build/sonata-project/SonataAdminBundle/Tests/Admin/AdminTest.php:132
    9.2482   53607072  15. Prophecy\Prophecy\MethodProphecy->__construct() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Prophecy/ObjectProphecy.php:256
    9.2482   53607072  16. Prophecy\Prophecy\ObjectProphecy->reveal() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Prophecy/MethodProphecy.php:48
    9.2483   53607072  17. Prophecy\Doubler\LazyDouble->getInstance() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Prophecy/ObjectProphecy.php:114
    9.2483   53607072  18. Prophecy\Doubler\Doubler->double() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/LazyDouble.php:122
    9.2484   53607120  19. Prophecy\Doubler\Doubler->createDoubleClass() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/Doubler.php:105
    9.3044   54054328  20. Prophecy\Doubler\ClassPatch\MagicCallPatch->apply() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/Doubler.php:138
    9.3046   54054616  21. Prophecy\PhpDocumentor\ClassAndInterfaceTagRetriever->getTagList() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/Doubler/ClassPatch/MagicCallPatch.php:57
    9.3046   54054616  22. Prophecy\PhpDocumentor\ClassTagRetriever->getTagList() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php:48
    9.3151   54057920  23. phpDocumentor\Reflection\DocBlockFactory->create() phar:///home/travis/bin/phpunit/phpspec-prophecy/Prophecy/PhpDocumentor/ClassTagRetriever.php:45
    9.3157   54059968  24. phpDocumentor\Reflection\DocBlockFactory->parseTagBlock() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php:96
    9.3159   54060848  25. phpDocumentor\Reflection\DocBlock\StandardTagFactory->create() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php:231
    9.3161   54061216  26. phpDocumentor\Reflection\DocBlock\StandardTagFactory->createTag() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:116
    9.3162   54061368  27. phpDocumentor\Reflection\DocBlock\StandardTagFactory->fetchParametersForHandlerFactoryMethod() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:191
    9.3163   54061832  28. ReflectionMethod->__construct() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:265
    9.3163   54062168  29. spl_autoload_call() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:265
    9.3163   54062232  30. Composer\Autoload\ClassLoader->loadClass() /home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:265
    9.3166   54062424  31. Composer\Autoload\includeFile() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:301
    9.3170   54082512  32. include('/home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php') /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:412
    9.3171   54082856  33. spl_autoload_call() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:20
    9.3171   54082920  34. Composer\Autoload\ClassLoader->loadClass() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:20
    9.3173   54083112  35. Composer\Autoload\includeFile() /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:301
    9.3177   54092240  36. include('/home/travis/build/sonata-project/SonataAdminBundle/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php') /home/travis/build/sonata-project/SonataAdminBundle/vendor/composer/ClassLoader.php:412
@sebastianbergmann
Copy link
Owner

Thank you for your report.

Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.

Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue.

@greg0ire
Copy link
Contributor Author

OK I'll try to reduce that as much as I can

@greg0ire
Copy link
Contributor Author

I managed to dumb it down to this (requires docker, unless you have php 5.5 lying around) :

cd /tmp
git clone git@github.com:greg0ire/phpunit_reproduce_2282.git
cd phpunit_reproduce_2282
docker run --rm -it -v $PWD:/home/travis/src  quay.io/travisci/travis-php  /bin/bash
su - travis
cd src
make test

@OskarStark
Copy link
Contributor

any news here @sebastianbergmann or can I support you?

@sebastianbergmann
Copy link
Owner

I am inclined to say that if this works with PHP 5.3, PHP 5.4, PHP 5.6, and PHP 7 then it's related to PHP 5.5 more that it's related to PHPUnit.

I am sorry to say this but I won't invest any time in debugging a rather weird issue that only occurs with an EOL version of PHP.

@sebastianbergmann
Copy link
Owner

sebastianbergmann commented Oct 7, 2016

I cannot reproduce this with PHP 5.5:

$ git clone git@github.com:greg0ire/phpunit_reproduce_2282.git

$ cd phpunit_reproduce_2282

$ composer install

$ php-55 ./vendor/bin/phpunit --verbose --bootstrap vendor/autoload.php LockExtensionTest 
PHPUnit 4.8.27 by Sebastian Bergmann and contributors.

Runtime:    PHP 5.5.38

.

Time: 45 ms, Memory: 4.75MB

OK (1 test, 0 assertions)

@greg0ire
Copy link
Contributor Author

greg0ire commented Oct 7, 2016

Ok, I'll investigate and I think it's safe to say the problem is not on phpunit's end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants