mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +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:
@@ -42,10 +42,12 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\FormErrorNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\MimeMessageNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\ProblemNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\PropertyNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\TranslatableNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\UidNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer;
|
||||
use Symfony\Component\Serializer\Serializer;
|
||||
@@ -58,9 +60,7 @@ return static function (ContainerConfigurator $container) {
|
||||
|
||||
$container->services()
|
||||
->set('serializer', Serializer::class)
|
||||
->public()
|
||||
->args([[], []])
|
||||
->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2'])
|
||||
|
||||
->alias(SerializerInterface::class, 'serializer')
|
||||
->alias(NormalizerInterface::class, 'serializer')
|
||||
@@ -104,7 +104,7 @@ return static function (ContainerConfigurator $container) {
|
||||
->tag('serializer.normalizer', ['priority' => -950])
|
||||
|
||||
->set('serializer.normalizer.problem', ProblemNormalizer::class)
|
||||
->args([param('kernel.debug')])
|
||||
->args([param('kernel.debug'), '$translator' => service('translator')->nullOnInvalid()])
|
||||
->tag('serializer.normalizer', ['priority' => -890])
|
||||
|
||||
->set('serializer.denormalizer.unwrapping', UnwrappingDenormalizer::class)
|
||||
@@ -114,6 +114,10 @@ return static function (ContainerConfigurator $container) {
|
||||
->set('serializer.normalizer.uid', UidNormalizer::class)
|
||||
->tag('serializer.normalizer', ['priority' => -890])
|
||||
|
||||
->set('serializer.normalizer.translatable', TranslatableNormalizer::class)
|
||||
->args(['$translator' => service('translator')])
|
||||
->tag('serializer.normalizer', ['priority' => -890])
|
||||
|
||||
->set('serializer.normalizer.form_error', FormErrorNormalizer::class)
|
||||
->tag('serializer.normalizer', ['priority' => -915])
|
||||
|
||||
@@ -129,6 +133,7 @@ return static function (ContainerConfigurator $container) {
|
||||
->tag('serializer.normalizer', ['priority' => -1000])
|
||||
|
||||
->alias(ObjectNormalizer::class, 'serializer.normalizer.object')
|
||||
->deprecate('symfony/serializer', '6.2', 'The "%alias_id%" service alias is deprecated, type-hint against "'.NormalizerInterface::class.'" or implement "'.NormalizerAwareInterface::class.'" instead.')
|
||||
|
||||
->set('serializer.normalizer.property', PropertyNormalizer::class)
|
||||
->args([
|
||||
@@ -140,6 +145,7 @@ return static function (ContainerConfigurator $container) {
|
||||
])
|
||||
|
||||
->alias(PropertyNormalizer::class, 'serializer.normalizer.property')
|
||||
->deprecate('symfony/serializer', '6.2', 'The "%alias_id%" service alias is deprecated, type-hint against "'.NormalizerInterface::class.'" or implement "'.NormalizerAwareInterface::class.'" instead.')
|
||||
|
||||
->set('serializer.denormalizer.array', ArrayDenormalizer::class)
|
||||
->tag('serializer.normalizer', ['priority' => -990])
|
||||
@@ -211,12 +217,8 @@ return static function (ContainerConfigurator $container) {
|
||||
->factory([HtmlErrorRenderer::class, 'isDebug'])
|
||||
->args([service('request_stack'), param('kernel.debug')]),
|
||||
])
|
||||
;
|
||||
|
||||
if (interface_exists(\BackedEnum::class)) {
|
||||
$container->services()
|
||||
->set('serializer.normalizer.backed_enum', BackedEnumNormalizer::class)
|
||||
->set('serializer.normalizer.backed_enum', BackedEnumNormalizer::class)
|
||||
->tag('serializer.normalizer', ['priority' => -915])
|
||||
;
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user