diff --git a/src/Block/BlockContext.php b/src/Block/BlockContext.php index c7d22d31..e96e137f 100644 --- a/src/Block/BlockContext.php +++ b/src/Block/BlockContext.php @@ -21,7 +21,7 @@ final class BlockContext implements BlockContextInterface * @param array $settings */ public function __construct( - private readonly BlockInterface $block, + private BlockInterface $block, private array $settings = [], ) { } diff --git a/src/Block/BlockContextManager.php b/src/Block/BlockContextManager.php index c1944173..0069dba5 100644 --- a/src/Block/BlockContextManager.php +++ b/src/Block/BlockContextManager.php @@ -34,8 +34,11 @@ final class BlockContextManager implements BlockContextManagerInterface */ private array $settingsByClass = []; - public function __construct(private readonly BlockLoaderInterface $blockLoader, private readonly BlockServiceManagerInterface $blockService, private readonly LoggerInterface $logger = new NullLogger()) - { + public function __construct( + private BlockLoaderInterface $blockLoader, + private BlockServiceManagerInterface $blockService, + private LoggerInterface $logger = new NullLogger(), + ) { } public function addSettingsByType(string $type, array $settings, bool $replace = false): void diff --git a/src/Block/BlockLoaderChain.php b/src/Block/BlockLoaderChain.php index 3d87f44d..e45bc813 100644 --- a/src/Block/BlockLoaderChain.php +++ b/src/Block/BlockLoaderChain.php @@ -21,7 +21,7 @@ final class BlockLoaderChain implements BlockLoaderInterface /** * @param BlockLoaderInterface[] $loaders */ - public function __construct(private readonly array $loaders) + public function __construct(private array $loaders) { } diff --git a/src/Block/BlockRenderer.php b/src/Block/BlockRenderer.php index c4fb17c8..f355a83f 100644 --- a/src/Block/BlockRenderer.php +++ b/src/Block/BlockRenderer.php @@ -23,9 +23,9 @@ final class BlockRenderer implements BlockRendererInterface { public function __construct( - private readonly BlockServiceManagerInterface $blockServiceManager, - private readonly StrategyManagerInterface $exceptionStrategyManager, - private readonly ?LoggerInterface $logger = null, + private BlockServiceManagerInterface $blockServiceManager, + private StrategyManagerInterface $exceptionStrategyManager, + private ?LoggerInterface $logger = null, ) { } diff --git a/src/Block/BlockServiceManager.php b/src/Block/BlockServiceManager.php index 66c37726..f2bd8d1b 100644 --- a/src/Block/BlockServiceManager.php +++ b/src/Block/BlockServiceManager.php @@ -38,8 +38,8 @@ final class BlockServiceManager implements BlockServiceManagerInterface * @param string[] $containerTypes */ public function __construct( - private readonly ContainerInterface $container, - private readonly array $containerTypes, + private ContainerInterface $container, + private array $containerTypes, ) { } diff --git a/src/Block/Loader/ServiceLoader.php b/src/Block/Loader/ServiceLoader.php index 58fecb17..44ff7ecf 100644 --- a/src/Block/Loader/ServiceLoader.php +++ b/src/Block/Loader/ServiceLoader.php @@ -22,7 +22,7 @@ final class ServiceLoader implements BlockLoaderInterface /** * @param string[] $types */ - public function __construct(private readonly array $types) + public function __construct(private array $types) { } diff --git a/src/Block/Service/AbstractBlockService.php b/src/Block/Service/AbstractBlockService.php index 9a23e81c..6be3fe03 100644 --- a/src/Block/Service/AbstractBlockService.php +++ b/src/Block/Service/AbstractBlockService.php @@ -24,7 +24,7 @@ */ abstract class AbstractBlockService implements BlockServiceInterface { - public function __construct(private readonly Environment $twig) + public function __construct(private Environment $twig) { } diff --git a/src/Block/Service/MenuBlockService.php b/src/Block/Service/MenuBlockService.php index 92ce9df6..09f68928 100644 --- a/src/Block/Service/MenuBlockService.php +++ b/src/Block/Service/MenuBlockService.php @@ -32,8 +32,8 @@ final class MenuBlockService extends AbstractMenuBlockService { public function __construct( Environment $twig, - private readonly MenuProviderInterface $menuProvider, - private readonly MenuRegistryInterface $menuRegistry, + private MenuProviderInterface $menuProvider, + private MenuRegistryInterface $menuRegistry, ) { parent::__construct($twig); } diff --git a/src/Command/DebugBlocksCommand.php b/src/Command/DebugBlocksCommand.php index a0d97d80..6c866660 100644 --- a/src/Command/DebugBlocksCommand.php +++ b/src/Command/DebugBlocksCommand.php @@ -26,7 +26,7 @@ #[AsCommand(name: 'debug:sonata:block', description: 'Debug all blocks available, show default settings of each block')] final class DebugBlocksCommand extends Command { - public function __construct(private readonly BlockServiceManagerInterface $blockManager) + public function __construct(private BlockServiceManagerInterface $blockManager) { parent::__construct(); } diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 95e00e69..266c4dba 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -27,7 +27,7 @@ final class Configuration implements ConfigurationInterface /** * @param array $defaultContainerTemplates */ - public function __construct(private readonly array $defaultContainerTemplates) + public function __construct(private array $defaultContainerTemplates) { } diff --git a/src/Exception/Filter/DebugOnlyFilter.php b/src/Exception/Filter/DebugOnlyFilter.php index 672622cc..aa9f6e0b 100644 --- a/src/Exception/Filter/DebugOnlyFilter.php +++ b/src/Exception/Filter/DebugOnlyFilter.php @@ -22,7 +22,7 @@ */ final class DebugOnlyFilter implements FilterInterface { - public function __construct(private readonly bool $debug) + public function __construct(private bool $debug) { } diff --git a/src/Exception/Filter/IgnoreClassFilter.php b/src/Exception/Filter/IgnoreClassFilter.php index 06194c76..6b71b954 100644 --- a/src/Exception/Filter/IgnoreClassFilter.php +++ b/src/Exception/Filter/IgnoreClassFilter.php @@ -23,7 +23,7 @@ */ final class IgnoreClassFilter implements FilterInterface { - public function __construct(private readonly string $class) + public function __construct(private string $class) { } diff --git a/src/Exception/Renderer/InlineDebugRenderer.php b/src/Exception/Renderer/InlineDebugRenderer.php index 4a13d50e..559358f6 100644 --- a/src/Exception/Renderer/InlineDebugRenderer.php +++ b/src/Exception/Renderer/InlineDebugRenderer.php @@ -26,10 +26,10 @@ final class InlineDebugRenderer implements RendererInterface { public function __construct( - private readonly Environment $twig, - private readonly string $template, - private readonly bool $debug, - private readonly bool $forceStyle = true, + private Environment $twig, + private string $template, + private bool $debug, + private bool $forceStyle = true, ) { } diff --git a/src/Exception/Renderer/InlineRenderer.php b/src/Exception/Renderer/InlineRenderer.php index a1b543fc..8796825f 100644 --- a/src/Exception/Renderer/InlineRenderer.php +++ b/src/Exception/Renderer/InlineRenderer.php @@ -25,8 +25,8 @@ final class InlineRenderer implements RendererInterface { public function __construct( - private readonly Environment $twig, - private readonly string $template, + private Environment $twig, + private string $template, ) { } diff --git a/src/Exception/Strategy/StrategyManager.php b/src/Exception/Strategy/StrategyManager.php index 4a473586..4eeeda9f 100644 --- a/src/Exception/Strategy/StrategyManager.php +++ b/src/Exception/Strategy/StrategyManager.php @@ -41,7 +41,7 @@ final class StrategyManager implements StrategyManagerInterface * @param array $blockRenderers Renderer names for each block */ public function __construct( - private readonly ContainerInterface $container, + private ContainerInterface $container, private array $filters, private array $renderers, private array $blockFilters, diff --git a/src/Form/Type/ContainerTemplateType.php b/src/Form/Type/ContainerTemplateType.php index 8d3b6e43..f42b8220 100644 --- a/src/Form/Type/ContainerTemplateType.php +++ b/src/Form/Type/ContainerTemplateType.php @@ -27,7 +27,7 @@ final class ContainerTemplateType extends AbstractType /** * @param array $templateChoices */ - public function __construct(private readonly array $templateChoices) + public function __construct(private array $templateChoices) { } diff --git a/src/Form/Type/ServiceListType.php b/src/Form/Type/ServiceListType.php index 60eae228..4002fd7e 100644 --- a/src/Form/Type/ServiceListType.php +++ b/src/Form/Type/ServiceListType.php @@ -25,7 +25,7 @@ */ final class ServiceListType extends AbstractType { - public function __construct(private readonly BlockServiceManagerInterface $manager) + public function __construct(private BlockServiceManagerInterface $manager) { } diff --git a/src/Meta/Metadata.php b/src/Meta/Metadata.php index b88457ed..01653040 100644 --- a/src/Meta/Metadata.php +++ b/src/Meta/Metadata.php @@ -22,10 +22,10 @@ final class Metadata implements MetadataInterface * @param array $options */ public function __construct( - private readonly string $title, - private readonly ?string $description = null, - private readonly ?string $image = null, - private readonly ?string $domain = null, + private string $title, + private ?string $description = null, + private ?string $image = null, + private ?string $domain = null, private array $options = [], ) { } diff --git a/src/Profiler/DataCollector/BlockDataCollector.php b/src/Profiler/DataCollector/BlockDataCollector.php index 8a05c834..c12a8dd8 100644 --- a/src/Profiler/DataCollector/BlockDataCollector.php +++ b/src/Profiler/DataCollector/BlockDataCollector.php @@ -30,8 +30,8 @@ final class BlockDataCollector extends DataCollector * @param string[] $containerTypes array of container types */ public function __construct( - private readonly BlockHelper $blocksHelper, - private readonly array $containerTypes, + private BlockHelper $blocksHelper, + private array $containerTypes, ) { $this->reset(); } diff --git a/src/Templating/Helper/BlockHelper.php b/src/Templating/Helper/BlockHelper.php index a40c8024..5fe3e968 100644 --- a/src/Templating/Helper/BlockHelper.php +++ b/src/Templating/Helper/BlockHelper.php @@ -62,10 +62,10 @@ class BlockHelper * @internal */ public function __construct( - private readonly BlockRendererInterface $blockRenderer, - private readonly BlockContextManagerInterface $blockContextManager, - private readonly EventDispatcherInterface $eventDispatcher, - private readonly ?Stopwatch $stopwatch = null, + private BlockRendererInterface $blockRenderer, + private BlockContextManagerInterface $blockContextManager, + private EventDispatcherInterface $eventDispatcher, + private ?Stopwatch $stopwatch = null, ) { } diff --git a/src/Twig/GlobalVariables.php b/src/Twig/GlobalVariables.php index 746e4a3e..3b2aadbb 100644 --- a/src/Twig/GlobalVariables.php +++ b/src/Twig/GlobalVariables.php @@ -23,7 +23,7 @@ final class GlobalVariables /** * @param string[] $templates */ - public function __construct(private readonly array $templates) + public function __construct(private array $templates) { }