Skip to content

Update getContainerExtension() #17653

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

Merged
merged 1 commit into from
Jan 5, 2023
Merged

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