mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -13,12 +13,20 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Translation\TranslatorBagInterface;
|
||||
|
||||
trigger_deprecation('symfony/framework-bundle', '6.4', 'The "%s" class is deprecated, use "%s" instead.', DataCollectorTranslatorPass::class, \Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass::class);
|
||||
|
||||
/**
|
||||
* @author Christian Flothmann <christian.flothmann@sensiolabs.de>
|
||||
*
|
||||
* @deprecated since Symfony 6.4, use Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass instead.
|
||||
*/
|
||||
class DataCollectorTranslatorPass implements CompilerPassInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->has('translator')) {
|
||||
@@ -27,7 +35,7 @@ class DataCollectorTranslatorPass implements CompilerPassInterface
|
||||
|
||||
$translatorClass = $container->getParameterBag()->resolveValue($container->findDefinition('translator')->getClass());
|
||||
|
||||
if (!is_subclass_of($translatorClass, 'Symfony\Component\Translation\TranslatorBagInterface')) {
|
||||
if (!is_subclass_of($translatorClass, TranslatorBagInterface::class)) {
|
||||
$container->removeDefinition('translator.data_collector');
|
||||
$container->removeDefinition('data_collector.translation');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user