Skip to content

Commit e4d6c55

Browse files
committed
Fix check for Symfony 4.* version
`Symfony\Component\DependencyInjection\Dumper\Preloader` was introduced for Symfony 4 also, but marked as internal. We should use another class, which is strongly not available for Symfony 4.
1 parent ef02ba5 commit e4d6c55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DependencyInjection/DeprecatedAliasesCompilerPass.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
namespace Jaeger\Symfony\DependencyInjection;
55

6+
use Symfony\Component\DependencyInjection\Compiler\AliasDeprecatedPublicServicesPass;
67
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
78
use Symfony\Component\DependencyInjection\ContainerBuilder;
8-
use Symfony\Component\DependencyInjection\Dumper\Preloader;
99

1010
class DeprecatedAliasesCompilerPass implements CompilerPassInterface
1111
{
@@ -37,7 +37,9 @@ public function process(ContainerBuilder $container): void
3737
*/
3838
private function getDeprecationMsg(string $message, string $version): array
3939
{
40-
if (class_exists(Preloader::class)) {
40+
// \Symfony\Component\DependencyInjection\Compiler\AliasDeprecatedPublicServicesPass
41+
// introduced in symfony/dependency-injection 5.1.0
42+
if (class_exists(AliasDeprecatedPublicServicesPass::class)) {
4143
return [
4244
'code-tool/jaeger-client-symfony-bridge',
4345
$version,

0 commit comments

Comments
 (0)