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

add check for missing required dependencies #2270

Closed
wants to merge 4 commits into from

Conversation

maglnet
Copy link

@maglnet maglnet commented Apr 18, 2024

Q A
Bug fix? yes
New feature? no
Deprecations? no
Issues

Within a project of mine, I updated all dependencies and after that I got an error because of a missing Class.
This happens because the symfony/validator package is not defined as a dependency (only as a dev-dependency) but it seems to be required not only in tests.

This PR does the following:

  • check if dependencies used within the autoload section are defined as a requirement
  • add missing requirements to composer.json
Error: Class "Symfony\Component\Validator\Constraint" not found
/project-dir/vendor/nelmio/api-doc-bundle/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php:217
/project-dir/vendor/nelmio/api-doc-bundle/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php:196
/project-dir/vendor/nelmio/api-doc-bundle/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php:59
/project-dir/vendor/nelmio/api-doc-bundle/src/ModelDescriber/Annotations/AnnotationsReader.php:71
/project-dir/vendor/nelmio/api-doc-bundle/src/ModelDescriber/ObjectModelDescriber.php:174
/project-dir/vendor/nelmio/api-doc-bundle/src/Model/ModelRegistry.php:115
/project-dir/vendor/nelmio/api-doc-bundle/src/ApiDocGenerator.php:135
/project-dir/vendor/nelmio/api-doc-bundle/src/Render/RenderOpenApi.php:85
/project-dir/tests/src/ValidOpenAPISyntaxTest.php:32

@maglnet maglnet marked this pull request as draft April 18, 2024 13:04
@maglnet maglnet changed the title WIP: add check for missing required dependencies add check for missing required dependencies Apr 18, 2024
@DjordyKoert
Copy link
Collaborator

The error you encountered should be fixed with #2276 :)

@maglnet
Copy link
Author

maglnet commented Apr 20, 2024

Thanks @DjordyKoert .
So I'll close this as obsolete.

@maglnet maglnet closed this Apr 20, 2024
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.

None yet

2 participants