New release of JMS serializer breaks phpDocumentor2 (in composer.json set ">=0.12") in any command:
`$ phpdoc --version
Fatal error: Uncaught Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@JMS\Serializer\Annotation\Type" in property phpDocumentorConfiguration::$title does not exist, or could not be auto-loaded. in /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php on line 54
Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@JMS\Serializer\Annotation\Type" in property phpDocumentorConfiguration::$title does not exist, or could not be auto-loaded. in /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php on line 54
Call Stack:
0.0002 353352 1. {main}() /vendor/phpdocumentor/phpdocumentor/bin/phpdoc:0
0.0007 369352 2. phpDocumentor\Bootstrap->initialize() /vendor/phpdocumentor/phpdocumentor/bin/phpdoc:23
0.0091 1178944 3. phpDocumentorApplication->__construct() /vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Bootstrap.php:62
0.0131 1218312 4. phpDocumentorApplication->addLogging() /vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Application.php:67
0.0143 1365616 5. Pimple->offsetGet() /vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Application.php:254
0.0143 1365616 6. Pimple::{closure:/vendor/pimple/pimple/lib/Pimple.php:122-130}() /vendor/pimple/pimple/lib/Pimple.php:83
0.0143 1365640 7. phpDocumentorConfiguration\ServiceProvider->phpDocumentorConfiguration{closure}() /vendor/pimple/pimple/lib/Pimple.php:126
0.0373 2677368 8. phpDocumentorConfiguration\Loader->load() /vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Configuration/ServiceProvider.php:82
0.0399 2825960 9. phpDocumentorConfiguration\Loader->createConfigurationObject() /vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Configuration/Loader.php:62
0.0399 2826984 10. JMS\Serializer\Serializer->deserialize() /vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Configuration/Loader.php:112
0.0413 2896072 11. PhpOption\Some->map() /vendor/jms/serializer/src/Serializer.php:131
0.0413 2896128 12. call_user_func:{/vendor/phpoption/phpoption/src/PhpOption/Some.php:89}() /vendor/phpoption/phpoption/src/PhpOption/Some.php:89
0.0413 2896128 13. JMS\Serializer\Serializer->JMS\Serializer{closure}() /vendor/phpoption/phpoption/src/PhpOption/Some.php:89
0.0419 2897576 14. JMS\Serializer\Serializer->visit() /vendor/jms/serializer/src/Serializer.php:128
0.0419 2898376 15. JMS\Serializer\GraphNavigator->accept() /vendor/jms/serializer/src/Serializer.php:193
0.0420 2898416 16. Metadata\MetadataFactory->getMetadataForClass() /vendor/jms/serializer/src/GraphNavigator.php:211
0.0424 2976552 17. JMS\Serializer\Metadata\Driver\AnnotationDriver->loadMetadataForClass() /vendor/jms/metadata/src/Metadata/MetadataFactory.php:103
0.0473 3099456 18. Doctrine\Common\Annotations\AnnotationReader->getPropertyAnnotations() /vendor/jms/serializer/src/Metadata/Driver/AnnotationDriver.php:152
0.0473 3100024 19. Doctrine\Common\Annotations\DocParser->parse() /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php:250
0.0474 3105224 20. Doctrine\Common\Annotations\DocParser->Annotations() /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:354
0.0475 3105280 21. Doctrine\Common\Annotations\DocParser->Annotation() /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:663
`
We're experiencing this as well:
https://travis-ci.org/neverwoods/validformbuilder/builds/252817460
Same here... is there a workaround?
https://travis-ci.org/redaxmedia/redaxscript-api-sync/builds/252903192
I made a fork that defines version 1.7.* for jms/serializer here:
validformbuilder/phpdocumentor2
I recommend switching back to the original repo once they fixed it.
This email was sent from my iPhone and therefore subject to typos and other inaccuracies.
On 12 Jul 2017, at 19:30, redaxmedia notifications@github.com wrote:
Same here... is there a workaround?
https://travis-ci.org/redaxmedia/redaxscript-api-sync/builds/252903192
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Fixed in a98fd26
Assume I used
composer global [...]
@jaapio Seems this is not fixed for phpdoc v2.9.0 :sweat:
I got this error when I install v3 to give a try and then back to v2
I had to:
composer global remove phpdocumentor/phpdocumentorcomposer global require jms/serializer:1.7.* (as pointer @rvanbaalen )composer global require phpdocumentor/phpdocumentor:^2.9Then I was able to run phpdoc again. :smiley:
Experiencing the same issue
My PC has php-7.3.0, phpdocumentor/phpdocumentor-2.9.0, jms/serializer-3.0.1, but I have the same problem.
Any valid solution so far as I am experiencing the same issue? thank you
@hussnainsheikh If you use v2, you can try https://github.com/phpDocumentor/phpDocumentor2/issues/1868#issuecomment-451728826
@nelson6e65 I have followed the above step but unfortunately phpdoc command not found.

I am running it on docker.
@nelson6e65 I have followed the above step but unfortunately phpdoc command not found.
I am running it on docker.
Well, that's not concerned to this topic, but...
First, running as root is not a good idea. 😅
Second, mmm... well, maybe that's the error: you are using another user. Composer global uses the current user for installing packages. Login as usual user ~or... (not recommended) install it in the root~.
Please create a new issue for this problem.
I think there is something wrong with the docker image. I never tried it myself, but I could have a look to rebuild is so things are working as expected.
Composer
Assume I used
composer global [...]
(...)
How to fix
I had to:
composer global remove phpdocumentor/phpdocumentorcomposer global require jms/serializer:1.7.*(as pointer @rvanbaalen )composer global require phpdocumentor/phpdocumentor:^2.9
Works for me without global
Most helpful comment
Composer
@jaapio Seems this is not fixed for phpdoc
v2.9.0:sweat:I got this error when I install v3 to give a try and then back to v2
How to fix
I had to:
composer global remove phpdocumentor/phpdocumentorcomposer global require jms/serializer:1.7.*(as pointer @rvanbaalen )composer global require phpdocumentor/phpdocumentor:^2.9Then I was able to run
phpdocagain. :smiley: