Skip to content

Commit

Permalink
4.11.0 (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Mar 7, 2022
1 parent 8e79c65 commit b414023
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 124 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [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))
- [[#1011](https://github.com/sonata-project/SonataBlockBundle/pull/1011)] Interface `Sonata\BlockBundle\Cache\HttpCacheHandlerInterface` and it's implementations have been deprecated ([@dmaicher](https://github.com/dmaicher))
- [[#1011](https://github.com/sonata-project/SonataBlockBundle/pull/1011)] Constructor Signature of `Sonata\BlockBundle\Templating\Helper\BlockHelper` changed: all caching related arguments should be removed ([@dmaicher](https://github.com/dmaicher))
- [[#1011](https://github.com/sonata-project/SonataBlockBundle/pull/1011)] All caching configuration options have been deprecated and `sonata_block.http_cache` should be set to `false` ([@dmaicher](https://github.com/dmaicher))

### Fixed
- [[#1026](https://github.com/sonata-project/SonataBlockBundle/pull/1026)] Do not trigger a deprecation if a template setting is not provided in a block context `__construct`. ([@VincentLanglet](https://github.com/VincentLanglet))

## [4.10.0](https://github.com/sonata-project/SonataBlockBundle/compare/4.9.1...4.10.0) - 2022-02-28
### Deprecated
- [[#1012](https://github.com/sonata-project/SonataBlockBundle/pull/1012)] Not passing a string value for the template setting of a BlockContext ([@VincentLanglet](https://github.com/VincentLanglet))
Expand Down
95 changes: 0 additions & 95 deletions UPGRADE-3.x.md

This file was deleted.

4 changes: 2 additions & 2 deletions UPGRADE-4.x.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
UPGRADE 4.x
===========

UPGRADE FROM 4.10 to 4.x
=======================
UPGRADE FROM 4.10 to 4.11
=========================

### Deprecated caching functionality

Expand Down
12 changes: 6 additions & 6 deletions src/Block/BlockContextManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,24 +172,24 @@ static function (Options $options, $value): string {
->setDeprecated(
'use_cache',
...$this->deprecationParameters(
'4.x',
'Block option "use_cache" is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.'
'4.11',
'Block option "use_cache" is deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.'
)
)
// NEXT_MAJOR: Remove setDeprecated.
->setDeprecated(
'extra_cache_keys',
...$this->deprecationParameters(
'4.x',
'Block option "extra_cache_keys" is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.'
'4.11',
'Block option "extra_cache_keys" is deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.'
)
)
// NEXT_MAJOR: Remove setDeprecated.
->setDeprecated(
'ttl',
...$this->deprecationParameters(
'4.x',
'Block option "ttl" is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.'
'4.11',
'Block option "ttl" is deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.'
)
);

Expand Down
2 changes: 1 addition & 1 deletion src/Cache/HttpCacheHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Symfony\Component\HttpKernel\Event\ResponseEvent;

/**
* @deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.
* @deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.
*/
final class HttpCacheHandler implements HttpCacheHandlerInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/HttpCacheHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Symfony\Component\HttpKernel\Event\ResponseEvent;

/**
* @deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.
* @deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.
*/
interface HttpCacheHandlerInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/NoopHttpCacheHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Symfony\Component\HttpKernel\Event\ResponseEvent;

/**
* @deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.
* @deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.
*/
final class NoopHttpCacheHandler implements HttpCacheHandlerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function process(ContainerBuilder $container): void
}

@trigger_error(
'Defining cache blocks other than \'sonata.cache.noop\' is deprecated since sonata-project/block-bundle 4.x and will not be supported anymore in 5.0.',
'Defining cache blocks other than \'sonata.cache.noop\' is deprecated since sonata-project/block-bundle 4.11 and will not be supported anymore in 5.0.',
\E_USER_DEPRECATED
);

Expand Down
10 changes: 5 additions & 5 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getConfigTreeBuilder(): TreeBuilder
// NEXT_MAJOR: remove this block
if (true !== $this->httpCacheDisabled) {
@trigger_error(
'Not setting the "sonata_block.http_cache" config option to false is deprecated since sonata-project/block-bundle 4.x and will fail in 5.0.',
'Not setting the "sonata_block.http_cache" config option to false is deprecated since sonata-project/block-bundle 4.11 and will fail in 5.0.',
\E_USER_DEPRECATED
);
} else {
Expand Down Expand Up @@ -167,8 +167,8 @@ public function getConfigTreeBuilder(): TreeBuilder
->defaultValue('sonata.cache.noop')
->setDeprecated(
...$this->getDeprecationMessage(
'The "cache" option for configuring blocks is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.',
'4.x'
'The "cache" option for configuring blocks is deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.',
'4.11'
)
)
->end()
Expand Down Expand Up @@ -197,8 +197,8 @@ public function getConfigTreeBuilder(): TreeBuilder
->defaultValue('sonata.cache.noop')
->setDeprecated(
...$this->getDeprecationMessage(
'The "cache" option for configuring blocks_by_class is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.',
'4.x'
'The "cache" option for configuring blocks_by_class is deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.',
'4.11'
)
)
->end()
Expand Down
8 changes: 4 additions & 4 deletions src/DependencyInjection/SonataBlockExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ public function load(array $configs, ContainerBuilder $container): void

$container->getDefinition('sonata.block.cache.handler.default')
->setDeprecated(...$this->getDeprecationMessage(
'The "%service_id%" service is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.',
'4.x',
'The "%service_id%" service is deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.',
'4.11',
));

$container->getDefinition('sonata.block.cache.handler.noop')
->setDeprecated(...$this->getDeprecationMessage(
'The "%service_id%" service is deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.',
'4.x',
'The "%service_id%" service is deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.',
'4.11',
));
}

Expand Down
2 changes: 1 addition & 1 deletion src/Model/BaseBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function hasParent(): bool
}

/**
* @deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.
* @deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.
*/
public function getTtl(): int
{
Expand Down
2 changes: 1 addition & 1 deletion src/Model/BlockInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function getUpdatedAt(): ?\DateTime;
/**
* Returns the block cache TTL.
*
* @deprecated since sonata-project/block-bundle 4.x and will be removed in 5.0.
* @deprecated since sonata-project/block-bundle 4.11 and will be removed in 5.0.
*/
public function getTtl(): int;

Expand Down
12 changes: 6 additions & 6 deletions src/Templating/Helper/BlockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function __construct(
$this->cacheBlocks = $blockRendererOrCacheBlocks;
@trigger_error(
sprintf(
'Passing an array 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 array as argument 2 for method "%s" is deprecated since sonata-project/block-bundle 4.11. The argument will change to "%s" in 5.0.',
__METHOD__,
BlockRendererInterface::class
),
Expand All @@ -161,7 +161,7 @@ public function __construct(
$this->blockRenderer = $blockContextManagerOrBlockRenderer;
@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.11. The argument will change to "%s" in 5.0.',
BlockRendererInterface::class,
__METHOD__,
BlockContextManagerInterface::class
Expand All @@ -185,7 +185,7 @@ public function __construct(
$this->blockContextManager = $eventDispatcherOrBlockContextManager;
@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.11. The argument will change to "%s" in 5.0.',
BlockContextManagerInterface::class,
__METHOD__,
EventDispatcherInterface::class
Expand All @@ -210,7 +210,7 @@ public function __construct(
$this->stopwatch = $stopwatch;
@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 change to "%s" in 5.0.',
'Passing an instance of "%s" as argument 5 for method "%s" is deprecated since sonata-project/block-bundle 4.11. The argument will change to "%s" in 5.0.',
EventDispatcherInterface::class,
__METHOD__,
Stopwatch::class
Expand All @@ -232,7 +232,7 @@ public function __construct(
$this->cacheManager = $cacheManager;
@trigger_error(
sprintf(
'Passing an instance of "%s" as argument 6 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 6 for method "%s" is deprecated since sonata-project/block-bundle 4.11. The argument will be removed in 5.0.',
CacheAdapterInterface::class,
__METHOD__
),
Expand All @@ -244,7 +244,7 @@ public function __construct(
$this->cacheHandler = $cacheHandler;
@trigger_error(
sprintf(
'Passing an instance of "%s" as argument 7 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 7 for method "%s" is deprecated since sonata-project/block-bundle 4.11. The argument will be removed in 5.0.',
HttpCacheHandlerInterface::class,
__METHOD__
),
Expand Down

0 comments on commit b414023

Please sign in to comment.