Skip to content

Deprecation Warning in Symfony 7.1: HttpKernel\DependencyInjection\Extension Should Be Replaced #96

@damianociarla

Description

@damianociarla

Hello,

Since Symfony 7.1, using Symfony\Component\HttpKernel\DependencyInjection\Extension is considered internal and will be deprecated in Symfony 8.1. Instead, Symfony\Component\DependencyInjection\Extension\Extension should be used.

Issue Details
I am getting the following deprecation warning when running my Symfony application with bref/symfony-messenger:

The "Symfony\Component\HttpKernel\DependencyInjection\Extension" class is considered internal since Symfony 7.1, 
to be deprecated in 8.1; use Symfony\Component\DependencyInjection\Extension\Extension instead. 
It may change without further notice. 
You should not use it from "Bref\Symfony\Messenger\DependencyInjection\BrefMessengerExtension".

Affected File:
The issue comes from Bref\Symfony\Messenger\DependencyInjection\BrefMessengerExtension, which currently extends HttpKernel\DependencyInjection\Extension.

Suggested Fix:
The class should extend Symfony\Component\DependencyInjection\Extension\Extension instead to ensure compatibility with future Symfony versions.

Steps to Reproduce:
Use Symfony 7.1+ with bref/symfony-messenger.

Run the application or execute bin/console cache:clear.

The deprecation warning appears.

Would it be possible to update this in an upcoming release? Let me know if I can help with a PR.

Thanks for your work on this package! 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions