Skip to content

Conversation

@ProjektGopher
Copy link
Contributor

There’s a bug in our dependencies
Our Cloud deployments are blowing up because of an unmet dep (using --no-dev).

We’re not finding two classes that are being used in the VerbsServiceProvider

They’re from a package called phpdocumentor/reflection-docblock which is a dep of symfony/serializer, but it’s been moved into their require-dev. We should require this package explicitly to fix it.

@ProjektGopher
Copy link
Contributor Author

I tried adding --no-dev to our CI test script, but that obviously resulted in pest not being installed. Not sure how to prevent this in the future

@inxilpro
Copy link
Contributor

I think this is the result of #125. I think maybe the better solution would just wrap the new PhpDocExtractor() in a class_exists check? I don't actually think most people are going to be using phpdoc annotations with Verbs, so it seems maybe better to not introduce another dependency…

@ProjektGopher
Copy link
Contributor Author

ProjektGopher commented Mar 31, 2025

I think I was wrong about where the issue lives. It's here.

The class on which we're relying does in fact exist. It's just that the maintainers of that package are relying on a class that only lives in their dev dependencies.

@tsterker
Copy link
Contributor

tsterker commented May 2, 2025

We also just ran into issues when trying to upgrade to 0.7.0, due to the missing phpdocumentor/reflection-docblock which is a transient dependency of PhpDocExtractor, which is used in the VerbsServiceProvider.

See the Symfony docs for PhpDocExtractor:

This extractor depends on the phpdocumentor/reflection-docblock library.

So, making this an optional dependency as @inxilpro suggested might be a good trade-off, probably combined with a brief update in the docs about this optional convenience feature :)

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

Successfully merging this pull request may close these issues.

3 participants