From 50999d651e04b7d026ee172e8d6e0b24327979b0 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Fri, 8 Sep 2023 11:05:14 +0200 Subject: [PATCH 1/2] fix(symfony): missing translation contracts (#5799) fixes #5783 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 8d955dbc0b9..4d50110e210 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "symfony/property-access": "^6.1", "symfony/property-info": "^6.1", "symfony/serializer": "^6.1", + "symfony/translation-contracts": "^3.3", "symfony/web-link": "^6.1", "willdurand/negotiation": "^3.0" }, From c9bc72c6852447d0100fa96cd7012e6c30ff25e1 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Fri, 8 Sep 2023 12:19:22 +0200 Subject: [PATCH 2/2] chore: symfony dev (#5801) --- tests/Fixtures/app/AppKernel.php | 55 +++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/tests/Fixtures/app/AppKernel.php b/tests/Fixtures/app/AppKernel.php index 8b16b6e0e24..dc05ea4df72 100644 --- a/tests/Fixtures/app/AppKernel.php +++ b/tests/Fixtures/app/AppKernel.php @@ -34,6 +34,7 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface; +use Symfony\Component\HttpClient\Messenger\PingWebhookMessageHandler; use Symfony\Component\HttpFoundation\Session\SessionFactory; use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher; @@ -112,21 +113,45 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load ], ]; - $c->prependExtensionConfig('framework', [ - 'secret' => 'dunglas.fr', - 'validation' => ['enable_annotations' => true], - 'serializer' => ['enable_annotations' => true], - 'test' => null, - 'session' => class_exists(SessionFactory::class) ? ['storage_factory_id' => 'session.storage.factory.mock_file'] : ['storage_id' => 'session.storage.mock_file'], - 'profiler' => [ - 'enabled' => true, - 'collect' => false, - ], - 'messenger' => $messengerConfig, - 'router' => ['utf8' => true], - 'http_method_override' => false, - 'annotations' => false, - ]); + // This class is introduced in Symfony 6.4 just using it to use the new configuration and to avoid unnecessary deprecations + if (class_exists(PingWebhookMessageHandler::class)) { + $config = [ + 'secret' => 'dunglas.fr', + 'validation' => ['enable_attributes' => true, 'email_validation_mode' => 'html5'], + 'serializer' => ['enable_attributes' => true], + 'test' => null, + 'session' => ['cookie_secure' => true, 'cookie_samesite' => 'lax', 'handler_id' => 'session.handler.native_file'], + 'profiler' => [ + 'enabled' => true, + 'collect' => false, + ], + 'php_errors' => ['log' => true], + 'messenger' => $messengerConfig, + 'router' => ['utf8' => true], + 'http_method_override' => false, + 'annotations' => false, + 'handle_all_throwables' => true, + 'uid' => ['default_uuid_version' => 7, 'time_based_uuid_version' => 7], + ]; + } else { + $config = [ + 'secret' => 'dunglas.fr', + 'validation' => ['enable_annotations' => true], + 'serializer' => ['enable_annotations' => true], + 'test' => null, + 'session' => class_exists(SessionFactory::class) ? ['storage_factory_id' => 'session.storage.factory.mock_file'] : ['storage_id' => 'session.storage.mock_file'], + 'profiler' => [ + 'enabled' => true, + 'collect' => false, + ], + 'messenger' => $messengerConfig, + 'router' => ['utf8' => true], + 'http_method_override' => false, + 'annotations' => false, + ]; + } + + $c->prependExtensionConfig('framework', $config); $alg = class_exists(NativePasswordHasher::class, false) || class_exists('Symfony\Component\Security\Core\Encoder\NativePasswordEncoder') ? 'auto' : 'bcrypt'; $securityConfig = [