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

Possibly missing requirement: symfony/config #2

Open
toitzi opened this issue Sep 20, 2024 · 1 comment
Open

Possibly missing requirement: symfony/config #2

toitzi opened this issue Sep 20, 2024 · 1 comment

Comments

@toitzi
Copy link

toitzi commented Sep 20, 2024

API Platform version(s) affected: 4.0.1

Description
This might not be the exact place to report this, as the error seems to come from the api-platform/graphql package (which doesn’t have an issue tab on GitHub). However, it appears to occur specifically within Laravel. If an invalid field type is encountered, the GraphQL package throws an InvalidTypeException in certain cases, such as here. The exception originates from the symfony/config package, which isn't required or included in a default Laravel installation, as far as I can tell. Hence, if this exception occurs, a PHP Fatal Error is thrown indicating that the class InvalidTypeException cannot be found.

How to reproduce
I haven’t pinpointed the exact cause yet, but it seems related to having an attribute in a model with an invalid or unsupported type in the type container.

Possible Solution
It might be necessary to include the symfony/config package as a dependency in the composer.json file. I’m not certain if this should be added here in the API Platform package or in the GraphQL package itself, but it seems more relevant to the latter.

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

2 participants
@toitzi and others