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

Jane 7.6.0 relies on Symfony 7.0? #785

Open
achton opened this issue Feb 7, 2024 · 1 comment
Open

Jane 7.6.0 relies on Symfony 7.0? #785

achton opened this issue Feb 7, 2024 · 1 comment
Labels

Comments

@achton
Copy link

achton commented Feb 7, 2024

Jane version(s) affected: 7.6.0

Description
When I upgraded to 7.6.0 and regenerated my OpenAPI models with Jane, I got this runtime error:

Fatal error: Declaration of MyApplication\api\Normalizer\CaseOwnedNormalizer::supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool 
must be compatible with Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization($data, $type, $format = null) 
in /var/www/generated/jane/Normalizer/CaseOwnedNormalizer.php on line 524

Due to the CMS framework I use (Drupal), my runtime dependencies are locked at symfony/serializer:^4.4.7. This means that the signature for the supportsDenormalization() method is no longer compatible with the generated normalizers from Jane, hence the fatal error above.

This appears to be the case all the way up to Symfony 6.4.

How to reproduce
I can't share my schema, but I assume any OpenAPI schema that is denormalized using Symfony <7.0 will experience this error.

Possible Solution
I assume this comes from the recently added support for Symfony 7, which also dropped support for older Symfony versions.

However, be aware that both Symfony 5.4 and 6.4 are LTS versions with bugfix support for at least another 18 months. 4.4 was just EOL'ed a couple months ago, so that's my own problem, but you might consider adding CI tests for the other major Symfony versions to avoid regressions.

@achton achton added the bug label Feb 7, 2024
@dudekm
Copy link

dudekm commented Feb 20, 2024

I also got this error on Symfony 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants