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

Missing explicitly used dependency with symfony/config, cause fatal error #941

Closed
niconoe- opened this issue Nov 29, 2023 · 1 comment
Closed

Comments

@niconoe-
Copy link

Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no

With the release of Symfony 7.0 as of today, the current version of JMSSerializerBundle fails to be required by any project due to a missing dependency with symfony/config.

The error is:

Compile Error: Declaration of JMS\SerializerBundle\DependencyInjection\Configuration::getConfigTreeBuilder() must be compatible with Symfony\Component\Config\Definition\ConfigurationInterface::getConfigTreeBuilder(): Symfony\Component\Config\Definition\Builder\TreeBuilder

This is because symfony/config is not explicitly set in the composer.json of this bundle, therefore, downloaded as a dependency of a dependency. With the release of Symfony 7, the installed version of symfony/config will automatically be "7.0.0", while this breaks the compatibility with JMSSerializerBundle 3.5.1.

Even if there is a new JMSSerializerBundle version in preparation that supports Symfony 7, any attempt to require jms/serializer-bundle: ^3.5 will fail because of this missing explicitly set dependency.

Please add a patch version where the dependency symfony/config:^6.0 is clearly defined in order to not download the version 7.0.0 until the compatibility is fully established.

Steps required to reproduce the problem

  1. run composer require jms/serializer-bundle:"^3.5"
  2. Look at the downloaded packages to see that symfony/config is in version 7.0.0 (this might not be truye depending on other libraries installed on your projects, so make sure you don't have any other libs that limits symfony/config)
  3. Run anything on your project, like php bin/console cache:clear for instance.

Expected Result

  • No error, everything is fine

Actual Result

image

@goetas
Copy link
Collaborator

goetas commented Dec 12, 2023

Done in #937

@goetas goetas closed this as completed Dec 12, 2023
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 a pull request may close this issue.

2 participants