Skip to content

Commit

Permalink
3.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jul 31, 2019
1 parent f3d84a5 commit 2fe7a11
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 19 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.16.0](https://github.com/sonata-project/SonataBlockBundle/compare/3.15.0...3.16.0) - 2019-07-31

### Deprecated
- `BaseCommand` class
- JMS annotations
- `AbstractBlockServiceTestCase` class with `BlockServiceTestCase`
- Passing block name to the AbstractBlockService class
- `AdminBlockServiceInterface` interface
- `AbstractAdminBlockService` class
- `BlockServiceInterface::getName` method
- `BaseCommand::getBlockServiceManager()` method in favor of `BaseCommand::$blockManager` property;
- Extending `DebugBlocksCommand` class, which will be declared final in 4.0;
- Invoking `DebugBlocksCommand` with "debug:sonata:block" as name.
- Marked all classes as `@final`


### Removed
- Removed deprecation warning when block name does not match service id

### Fixed
- error when debugging blocks with the required options.
- serializing issue for `BlockDataCollector`
- Deprecation caused by usage of `ContainerAwareCommand`.

## [3.15.0](https://github.com/sonata-project/SonataBlockBundle/compare/3.14.0...3.15.0) - 2019-03-03

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Annotation/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @Annotation
* @Target("CLASS")
*
* @deprecated since sonata-project/block-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/block-bundle 3.16, to be removed in 4.0.
*/
class Block implements MetadataProcessorInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Block/BlockServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface BlockServiceInterface
public function execute(BlockContextInterface $blockContext, Response $response = null);

/**
* @deprecated since sonata-project/block-bundle 3.x, to be removed in 4.0
* @deprecated since sonata-project/block-bundle 3.16, to be removed in 4.0
*
* @return string
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Block/Service/AbstractAdminBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;

@trigger_error(
'The '.__NAMESPACE__.'\AbstractAdminBlockService class is deprecated since sonata-project/block-bundle 3.x '.
'The '.__NAMESPACE__.'\AbstractAdminBlockService class is deprecated since sonata-project/block-bundle 3.16 '.
'and will be removed with the 4.0 release.',
E_USER_DEPRECATED
);

/**
* @author Christian Gripp <mail@core23.de>
*
* @deprecated since sonata-project/block-bundle 3.x without any replacement
* @deprecated since sonata-project/block-bundle 3.16 without any replacement
*/
abstract class AbstractAdminBlockService extends AbstractBlockService implements AdminBlockServiceInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Service/AbstractBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct($templatingOrDeprecatedName = null, EngineInterface
if (!$templatingOrDeprecatedName instanceof EngineInterface && 0 !== strpos(static::class, __NAMESPACE__.'\\')) {
@trigger_error(
sprintf(
'Passing %s as argument 1 to %s::%s() is deprecated since sonata-project/block-bundle 3.x and will throw a \TypeError as of 4.0. You must pass an instance of %s instead',
'Passing %s as argument 1 to %s::%s() is deprecated since sonata-project/block-bundle 3.16 and will throw a \TypeError as of 4.0. You must pass an instance of %s instead',
\gettype($templatingOrDeprecatedName),
static::class, __FUNCTION__,
EngineInterface::class
Expand Down
4 changes: 2 additions & 2 deletions src/Block/Service/AdminBlockServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Sonata\CoreBundle\Validator\ErrorElement;

@trigger_error(
'The '.__NAMESPACE__.'\AdminBlockServiceInterface interface is deprecated since sonata-project/block-bundle 3.x '.
'The '.__NAMESPACE__.'\AdminBlockServiceInterface interface is deprecated since sonata-project/block-bundle 3.16 '.
'and will be removed with the 4.0 release. '.
'Use '.__NAMESPACE__.'\Service\EditableBlockService instead.',
E_USER_DEPRECATED
Expand All @@ -28,7 +28,7 @@
/**
* @author Christian Gripp <mail@core23.de>
*
* @deprecated since sonata-project/block-bundle 3.x, to be removed with 4.0
* @deprecated since sonata-project/block-bundle 3.16, to be removed with 4.0
*/
interface AdminBlockServiceInterface extends BlockServiceInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Command/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\Console\Command\Command;

/**
* @deprecated since sonata-project/block-bundle 3.x, to be removed in 4.0
* @deprecated since sonata-project/block-bundle 3.16, to be removed in 4.0
*/
abstract class BaseCommand extends Command
{
Expand Down Expand Up @@ -51,7 +51,7 @@ public function getBlockServiceManager()
{
// NEXT_MAJOR: Remove this method
@trigger_error(sprintf(
'Method %1$s::%2$s() is deprecated since sonata-project/block-bundle 3.x and will be removed with the 4.0 release.'.
'Method %1$s::%2$s() is deprecated since sonata-project/block-bundle 3.16 and will be removed with the 4.0 release.'.
'Use the %1$s::$blockManager property instead.',
static::class,
__FUNCTION__
Expand Down
2 changes: 1 addition & 1 deletion src/Command/DebugBlocksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function execute(InputInterface $input, OutputInterface $output)
if ('sonata:block:debug' === $input->getArgument('command')) {
// NEXT_MAJOR: Remove this check
@trigger_error(
'Command "sonata:block:debug" is deprecated since sonata-project/block-bundle 3.x and will be removed with the 4.0 release.'.
'Command "sonata:block:debug" is deprecated since sonata-project/block-bundle 3.16 and will be removed with the 4.0 release.'.
' Use the "debug:sonata:block" command instead.',
E_USER_DEPRECATED
);
Expand Down
10 changes: 5 additions & 5 deletions src/Templating/Helper/BlockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ protected function computeAssets(BlockContextInterface $blockContext, array &$st
/**
* @return array
*
* @internal since sonata-project/block-bundle 3.x
* @internal since sonata-project/block-bundle 3.16
*/
protected function startTracing(BlockInterface $block)
{
Expand Down Expand Up @@ -393,7 +393,7 @@ protected function startTracing(BlockInterface $block)
}

/**
* @internal since sonata-project/block-bundle 3.x
* @internal since sonata-project/block-bundle 3.16
*/
protected function stopTracing(BlockInterface $block, array $stats)
{
Expand All @@ -411,7 +411,7 @@ protected function stopTracing(BlockInterface $block, array $stats)
/**
* @return array
*
* @internal since sonata-project/block-bundle 3.x
* @internal since sonata-project/block-bundle 3.16
*/
protected function getEventBlocks(BlockEvent $event)
{
Expand All @@ -429,7 +429,7 @@ protected function getEventBlocks(BlockEvent $event)
*
* @return array
*
* @internal since sonata-project/block-bundle 3.x
* @internal since sonata-project/block-bundle 3.16
*/
protected function getEventListeners($eventName)
{
Expand All @@ -453,7 +453,7 @@ protected function getEventListeners($eventName)
/**
* @return CacheAdapterInterface|false
*
* @internal since sonata-project/block-bundle 3.x
* @internal since sonata-project/block-bundle 3.16
*/
protected function getCacheService(BlockInterface $block, array &$stats = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Test/AbstractBlockServiceTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Sonata\BlockBundle\Test;

@trigger_error(
'The '.__NAMESPACE__.'\AbstractBlockServiceTestCase class is deprecated since sonata-project/block-bundle 3.x '.
'The '.__NAMESPACE__.'\AbstractBlockServiceTestCase class is deprecated since sonata-project/block-bundle 3.16 '.
'and will be removed with the 4.0 release. '.
'Use '.__NAMESPACE__.'\BlockServiceTestCase instead.',
E_USER_DEPRECATED
Expand All @@ -25,7 +25,7 @@
*
* @author Sullivan Senechal <soullivaneuh@gmail.com>
*
* @deprecated since sonata-project/block-bundle 3.x, to be removed in 4.0. Use Sonata\BlockBundle\Test\BlockServiceTestCase instead.
* @deprecated since sonata-project/block-bundle 3.16, to be removed in 4.0. Use Sonata\BlockBundle\Test\BlockServiceTestCase instead.
*/
abstract class AbstractBlockServiceTestCase extends BlockServiceTestCase
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Command/DebugBlocksCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function tearDown(): void
/**
* @group legacy
*
* @expectedDeprecation Command "sonata:block:debug" is deprecated since sonata-project/block-bundle 3.x and will be removed with the 4.0 release. Use the "debug:sonata:block" command instead.
* @expectedDeprecation Command "sonata:block:debug" is deprecated since sonata-project/block-bundle 3.16 and will be removed with the 4.0 release. Use the "debug:sonata:block" command instead.
*/
public function testExecute(): void
{
Expand All @@ -76,7 +76,7 @@ public function testExecuteWithAlias(): void
/**
* @group legacy
*
* @expectedDeprecation Method Sonata\BlockBundle\Command\DebugBlocksCommand::getBlockServiceManager() is deprecated since sonata-project/block-bundle 3.x and will be removed with the 4.0 release.Use the Sonata\BlockBundle\Command\DebugBlocksCommand::$blockManager property instead.
* @expectedDeprecation Method Sonata\BlockBundle\Command\DebugBlocksCommand::getBlockServiceManager() is deprecated since sonata-project/block-bundle 3.16 and will be removed with the 4.0 release.Use the Sonata\BlockBundle\Command\DebugBlocksCommand::$blockManager property instead.
*/
public function testGetBlockServiceManager(): void
{
Expand Down

0 comments on commit 2fe7a11

Please sign in to comment.