Description
This bundle uses the deprecated Symfony\Component\HttpKernel\DependencyInjection\Extension class, which has been marked as internal since Symfony 7.1 and will be deprecated in Symfony 8.1.
Problem
When using the bundle with Symfony 7.1+, the following deprecation warning is generated:
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 "Anyx\LoginGateBundle\DependencyInjection\LoginGateExtension".
Expected Solution
The LoginGateExtension class should be updated to use the recommended Symfony\Component\DependencyInjection\Extension\Extension class instead of the deprecated one.
Required Changes
- File to modify:
DependencyInjection/LoginGateExtension.php
- Change needed: Replace
use Symfony\Component\HttpKernel\DependencyInjection\Extension; with use Symfony\Component\DependencyInjection\Extension\Extension;
Diff
--- a/DependencyInjection/LoginGateExtension.php
+++ b/DependencyInjection/LoginGateExtension.php
@@ -4,7 +4,7 @@ namespace Anyx\LoginGateBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader;
/**
Impact
- ⚠️ Currently generates deprecation warnings in Symfony 7.1+
- ⚠️ Will break compatibility with Symfony 8.1+ if not fixed
- ✅ The fix is backward compatible and will work with Symfony 5.x, 6.x, 7.x, and 8.0+
Additional Context
Description
This bundle uses the deprecated
Symfony\Component\HttpKernel\DependencyInjection\Extensionclass, which has been marked as internal since Symfony 7.1 and will be deprecated in Symfony 8.1.Problem
When using the bundle with Symfony 7.1+, the following deprecation warning is generated:
Expected Solution
The
LoginGateExtensionclass should be updated to use the recommendedSymfony\Component\DependencyInjection\Extension\Extensionclass instead of the deprecated one.Required Changes
DependencyInjection/LoginGateExtension.phpuse Symfony\Component\HttpKernel\DependencyInjection\Extension;withuse Symfony\Component\DependencyInjection\Extension\Extension;Diff
Impact
Additional Context