Skip to content

Commit

Permalink
Merge pull request #524 from B-Galati/issue-523
Browse files Browse the repository at this point in the history
fix #523: use a new service id insteal of an alias
  • Loading branch information
B-Galati authored Jul 31, 2019
2 parents 9ac8d92 + c910653 commit 217e34e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DependencyInjection/SncRedisExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,13 @@ protected function loadPhpredisClient(array $client, ContainerBuilder $container
$phpredisAliasId = sprintf('snc_redis.%s_client', $client['alias']);
$phpredisAliasId2 = sprintf('snc_redis.%s', $client['alias']);

if (method_exists($phpredisDef, 'setDeprecated')) {
$phpredisDef->setDeprecated(true, '"%service_id%" service is deprecated since 2.1.10, to be removed in 3.0. Please use "'.$phpredisAliasId2.'" instead.');
}

$container->setDefinition($phpredisId, $phpredisDef);
$container->setAlias($phpredisAliasId2, new Alias($phpredisId, true));
$container->setAlias($phpredisAliasId, $phpredisId);
$alias = $container->setAlias($phpredisAliasId, $phpredisId);

if (method_exists($alias, 'setDeprecated')) {
$alias->setDeprecated(true, '"%alias_id%" service is deprecated since 2.1.10, to be removed in 3.0. Please use "'.$phpredisAliasId2.'" instead.');
}
}

/**
Expand Down

0 comments on commit 217e34e

Please sign in to comment.