Skip to content

Conversation

raphaelriehl
Copy link
Contributor

Since Symfony 6.x call to getContainerExtension() has evolved. Now, it's necessary to set a return type, else it generates this error :

Declaration of Acme\TestBundle\AcmeTestBundle::getContainerExtension() must be compatible with Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension(): ?Symfony\Component\DependencyInjection\Extension\ExtensionInterface

Since Symfony 6.x call to getContainerExtension() has evolved.
Now, it's necessary to set a return type, else it generates this error :
Declaration of Acme\TestBundle\AcmeTestBundle::getContainerExtension() must be compatible with Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension(): ?Symfony\Component\DependencyInjection\Extension\ExtensionInterface"
@carsonbot carsonbot added this to the 6.0 milestone Jan 4, 2023
@javiereguiluz
Copy link
Member

Good catch Raphaël! Thanks ... and congrats on your first Symfony Docs contribution 🎉

@javiereguiluz javiereguiluz merged commit 8ee9da6 into symfony:6.0 Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants