Skip to content

Commit e110b0d

Browse files
authored
Merge pull request #20 from andrew-demb/fix-sf-4-deprecation-compatibility
Fix deprecation compatibility with Symfony 4.*
2 parents 4bbc15b + e4d6c55 commit e110b0d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/DependencyInjection/DeprecatedAliasesCompilerPass.php

Lines changed: 5 additions & 3 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,14 +37,16 @@ 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,
4446
$message,
4547
];
4648
}
4749

48-
return [$message];
50+
return [true, $message];
4951
}
5052
}

0 commit comments

Comments
 (0)