From 0e9eba4f39ac265057ed4fc91916e8b848092f36 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 27 Apr 2022 11:03:10 +0200 Subject: [PATCH] 4.12.0 (#1049) --- CHANGELOG.md | 12 ++++++++++++ src/Block/BlockContextManager.php | 4 ++-- src/Block/Service/AbstractBlockService.php | 4 ++-- src/Block/Service/MenuBlockService.php | 4 ++-- src/Model/BaseBlock.php | 2 +- src/Templating/Helper/BlockHelper.php | 10 +++++----- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a50cc781..3064970d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [4.12.0](https://github.com/sonata-project/SonataBlockBundle/compare/4.11.0...4.12.0) - 2022-04-27 +### Changed +- [[#1042](https://github.com/sonata-project/SonataBlockBundle/pull/1042)] Marked `BlockHelper::__construct` as `@internal` ([@dmaicher](https://github.com/dmaicher)) + +### Deprecated +- [[#1045](https://github.com/sonata-project/SonataBlockBundle/pull/1045)] Deprecated method `AbstractBlockService::renderPrivateResponse()` ([@dmaicher](https://github.com/dmaicher)) +- [[#1045](https://github.com/sonata-project/SonataBlockBundle/pull/1045)] Deprecated option `cache_policy` on `MenuBlockService` ([@dmaicher](https://github.com/dmaicher)) +- [[#1042](https://github.com/sonata-project/SonataBlockBundle/pull/1042)] Deprecated passing an instance of `BlockServiceManagerInterface` as first argument for `BlockHelper::__construct` ([@dmaicher](https://github.com/dmaicher)) +- [[#1042](https://github.com/sonata-project/SonataBlockBundle/pull/1042)] Deprecated `BaseBlock::$ttl` ([@dmaicher](https://github.com/dmaicher)) +- [[#1039](https://github.com/sonata-project/SonataBlockBundle/pull/1039)] Deprecated passing array `$cacheBlocks` as 3rd argument for `BlockContextManager::__construct` ([@dmaicher](https://github.com/dmaicher)) +- [[#1039](https://github.com/sonata-project/SonataBlockBundle/pull/1039)] Deprecated `BlockContextManagerInterface::CACHE_KEY` ([@dmaicher](https://github.com/dmaicher)) + ## [4.11.0](https://github.com/sonata-project/SonataBlockBundle/compare/4.10.0...4.11.0) - 2022-03-07 ### Deprecated - [[#1011](https://github.com/sonata-project/SonataBlockBundle/pull/1011)] Integration with `SonataCacheBundle` has been deprecated ([@dmaicher](https://github.com/dmaicher)) diff --git a/src/Block/BlockContextManager.php b/src/Block/BlockContextManager.php index e32c2160..b313e84a 100644 --- a/src/Block/BlockContextManager.php +++ b/src/Block/BlockContextManager.php @@ -76,7 +76,7 @@ public function __construct( $this->cacheBlocks = $cacheBlocksOrLogger; @trigger_error( sprintf( - 'Passing an array as argument 3 for method "%s" is deprecated since sonata-project/block-bundle 4.x. The argument will change to "?%s" in 5.0.', + 'Passing an array as argument 3 for method "%s" is deprecated since sonata-project/block-bundle 4.12. The argument will change to "?%s" in 5.0.', __METHOD__, LoggerInterface::class ), @@ -96,7 +96,7 @@ public function __construct( $this->logger = $logger; @trigger_error( sprintf( - 'Passing an instance of "%s" as argument 4 to method "%s" is deprecated since sonata-project/block-bundle 4.x. The argument will be removed in 5.0.', + 'Passing an instance of "%s" as argument 4 to method "%s" is deprecated since sonata-project/block-bundle 4.12. The argument will be removed in 5.0.', LoggerInterface::class, __METHOD__ ), diff --git a/src/Block/Service/AbstractBlockService.php b/src/Block/Service/AbstractBlockService.php index 173c6ef1..7457db64 100644 --- a/src/Block/Service/AbstractBlockService.php +++ b/src/Block/Service/AbstractBlockService.php @@ -52,7 +52,7 @@ public function renderResponse(string $view, array $parameters = [], ?Response $ * Returns a Response object that cannot be cacheable, this must be used if the Response is related to the user. * A good solution to make the page cacheable is to configure the block to be cached with javascript ... * - * @deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0. + * @deprecated since sonata-project/block-bundle 4.12 and will be removed in 5.0. * * NEXT_MAJOR: remove * @@ -62,7 +62,7 @@ public function renderPrivateResponse(string $view, array $parameters = [], ?Res { @trigger_error( sprintf( - 'Method "%s" is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.', + 'Method "%s" is deprecated since sonata-project/block-bundle 4.12 and will be removed in 5.0.', __METHOD__ ), \E_USER_DEPRECATED diff --git a/src/Block/Service/MenuBlockService.php b/src/Block/Service/MenuBlockService.php index 203d89f4..37d8c8f2 100644 --- a/src/Block/Service/MenuBlockService.php +++ b/src/Block/Service/MenuBlockService.php @@ -123,8 +123,8 @@ public function configureSettings(OptionsResolver $resolver): void $resolver->setDeprecated( 'cache_policy', ...$this->deprecationParameters( - '4.x', - 'Option "cache_policy" is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.' + '4.12', + 'Option "cache_policy" is deprecated since sonata-project/block-bundle 4.12 and will be removed in 5.0.' ) ); } diff --git a/src/Model/BaseBlock.php b/src/Model/BaseBlock.php index 664bd24d..70ef7c3f 100644 --- a/src/Model/BaseBlock.php +++ b/src/Model/BaseBlock.php @@ -66,7 +66,7 @@ abstract class BaseBlock implements BlockInterface /** * NEXT_MAJOR: remove. * - * @deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0 + * @deprecated since sonata-project/block-bundle 4.12 and will be removed in 5.0 * * @var int|null */ diff --git a/src/Templating/Helper/BlockHelper.php b/src/Templating/Helper/BlockHelper.php index 3f5d9472..8f581dfe 100644 --- a/src/Templating/Helper/BlockHelper.php +++ b/src/Templating/Helper/BlockHelper.php @@ -140,7 +140,7 @@ public function __construct( $this->blockServiceManager = $blockServiceManagerOrBlockRenderer; @trigger_error( sprintf( - 'Passing an instance of "%s" as argument 1 for method "%s" is deprecated since sonata-project/block-bundle 4.x. The argument will change to "%s" in 5.0.', + 'Passing an instance of "%s" as argument 1 for method "%s" is deprecated since sonata-project/block-bundle 4.12. The argument will change to "%s" in 5.0.', BlockServiceManagerInterface::class, __METHOD__, BlockRendererInterface::class @@ -166,7 +166,7 @@ public function __construct( $this->blockRenderer = $blockContextManagerOrBlockRendererOrCacheBlocks; @trigger_error( sprintf( - 'Passing an instance of "%s" as argument 2 for method "%s" is deprecated since sonata-project/block-bundle 4.x. The argument will change to "%s" in 5.0.', + 'Passing an instance of "%s" as argument 2 for method "%s" is deprecated since sonata-project/block-bundle 4.12. The argument will change to "%s" in 5.0.', BlockRendererInterface::class, __METHOD__, BlockContextManagerInterface::class @@ -200,7 +200,7 @@ public function __construct( $this->blockContextManager = $eventDispatcherOrBlockContextManagerOrBlockRenderer; @trigger_error( sprintf( - 'Passing an instance of "%s" as argument 3 for method "%s" is deprecated since sonata-project/block-bundle 4.x. The argument will change to "%s" in 5.0.', + 'Passing an instance of "%s" as argument 3 for method "%s" is deprecated since sonata-project/block-bundle 4.12. The argument will change to "%s" in 5.0.', BlockContextManagerInterface::class, __METHOD__, EventDispatcherInterface::class @@ -236,7 +236,7 @@ public function __construct( $this->eventDispatcher = $stopWatchOrEventDispatcherOrBlockContextManager; @trigger_error( sprintf( - 'Passing an instance of "%s" as argument 4 for method "%s" is deprecated since sonata-project/block-bundle 4.x. The argument will change to "?%s" in 5.0.', + 'Passing an instance of "%s" as argument 4 for method "%s" is deprecated since sonata-project/block-bundle 4.12. The argument will change to "?%s" in 5.0.', EventDispatcherInterface::class, __METHOD__, Stopwatch::class @@ -270,7 +270,7 @@ public function __construct( $this->stopwatch = $stopwatchOrEventDispatcher; @trigger_error( sprintf( - 'Passing an instance of "%s" as argument 5 for method "%s" is deprecated since sonata-project/block-bundle 4.x. The argument will be removed in 5.0.', + 'Passing an instance of "%s" as argument 5 for method "%s" is deprecated since sonata-project/block-bundle 4.12. The argument will be removed in 5.0.', Stopwatch::class, __METHOD__, ),