From 7b79a92dcbe1ed4fbe8d0ae50dc3e65aec22f91f Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Mon, 15 May 2023 11:05:15 -0400 Subject: [PATCH] Add return types to silence Symfony 6.3 deprecation notices --- Debug/DataCollector.php | 2 +- DependencyInjection/Compiler/AdjustDecorationPass.php | 2 +- DependencyInjection/Compiler/PerInstancePass.php | 2 +- DependencyInjection/JMSSerializerExtension.php | 2 +- JMSSerializerBundle.php | 3 +++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Debug/DataCollector.php b/Debug/DataCollector.php index ab6ab577..ab953782 100644 --- a/Debug/DataCollector.php +++ b/Debug/DataCollector.php @@ -42,7 +42,7 @@ public function __construct( $this->reset(); } - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, \Throwable $exception = null): void { } diff --git a/DependencyInjection/Compiler/AdjustDecorationPass.php b/DependencyInjection/Compiler/AdjustDecorationPass.php index 16f5e369..9d63153b 100644 --- a/DependencyInjection/Compiler/AdjustDecorationPass.php +++ b/DependencyInjection/Compiler/AdjustDecorationPass.php @@ -21,7 +21,7 @@ */ final class AdjustDecorationPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { DIUtils::adjustDecorators($container); } diff --git a/DependencyInjection/Compiler/PerInstancePass.php b/DependencyInjection/Compiler/PerInstancePass.php index 765066ea..c9fbee06 100644 --- a/DependencyInjection/Compiler/PerInstancePass.php +++ b/DependencyInjection/Compiler/PerInstancePass.php @@ -13,7 +13,7 @@ */ abstract class PerInstancePass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { foreach (self::getSerializers($container) as $scopedContainer) { $this->processInstance($scopedContainer); diff --git a/DependencyInjection/JMSSerializerExtension.php b/DependencyInjection/JMSSerializerExtension.php index 35ebc51e..1d7fa67c 100644 --- a/DependencyInjection/JMSSerializerExtension.php +++ b/DependencyInjection/JMSSerializerExtension.php @@ -33,7 +33,7 @@ final class JMSSerializerExtension extends Extension /** * {@inheritdoc} */ - public function load(array $rawConfigs, ContainerBuilder $container) + public function load(array $rawConfigs, ContainerBuilder $container): void { $configs = $this->processNestedConfigs($rawConfigs, $container); diff --git a/JMSSerializerBundle.php b/JMSSerializerBundle.php index a2237a4f..89e97562 100644 --- a/JMSSerializerBundle.php +++ b/JMSSerializerBundle.php @@ -16,6 +16,9 @@ class JMSSerializerBundle extends Bundle { + /** + * @return void + */ public function build(ContainerBuilder $builder) { $builder->addCompilerPass(new AssignVisitorsPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION);