phpDocumentor/Reflection

Allow to skip parsing errors

juliushaertl opened this issue · 4 comments

When an Exception is thrown during namespace building it should be possible to proceed with it instead of failing.

Example: A InvalidArgumentException is thrown because a phpdoc block cannot be parsed in a file.

Which version of phpdocumentor/reflection are you using? Is it possible for you to switch to the current development version?

I'm running the develop branch.

Please have a look at how we solved this in phpdocumentor. https://github.com/phpDocumentor/phpDocumentor2/blob/develop/src/phpDocumentor/Parser/Middleware/ErrorHandlingMiddleware.php

This is how you would inject this middleware.
https://github.com/phpDocumentor/phpDocumentor2/blob/develop/src/phpDocumentor/Parser/ServiceProvider.php#L74

I still need to add some more documentation to this project to show the more advanced use cases. :-)

Looks good, i'll give that a try. Thank you for the quick help.