Skip to content

Commit

Permalink
1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Aug 8, 2020
1 parent 7b9ad6b commit 70e3aa2
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 12 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,50 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.4.0](https://github.com/sonata-project/twig-extensions/compare/1.3.1...1.4.0) - 2020-08-08
### Added
- [[#90](https://github.com/sonata-project/twig-extensions/pull/90)] Add
`Sonata\Twig\FlashMessage\FlashManager::addFlash(string $type, string
$message): void` to add flash message directly by FlashManager
([@wbloszyk](https://github.com/wbloszyk))
- [[#90](https://github.com/sonata-project/twig-extensions/pull/90)] Add
`Sonata\Twig\FlashMessage\FlashManagerInterface` to allow create custom
FlashManager ([@wbloszyk](https://github.com/wbloszyk))
- [[#90](https://github.com/sonata-project/twig-extensions/pull/90)] Add twig
function `sonata_flashmessage_class` - get css class from flash message type
in Twig ([@wbloszyk](https://github.com/wbloszyk))
- [[#100](https://github.com/sonata-project/twig-extensions/pull/100)] Added
`Sonata\Twig\Bridge\Symfony\SonataTwigSymfonyBundle`.
([@phansys](https://github.com/phansys))

### Changed
- [[#101](https://github.com/sonata-project/twig-extensions/pull/101)] Bump
Symfony to version 5.1 ([@franmomu](https://github.com/franmomu))
- [[#99](https://github.com/sonata-project/twig-extensions/pull/99)] Bump Twig
to 2.6. ([@franmomu](https://github.com/franmomu))

### Deprecated
- [[#99](https://github.com/sonata-project/twig-extensions/pull/99)] Deprecated
`sonata_template_deprecate` twig tag and
`sonata.twig.deprecated_template_extension` service.
([@franmomu](https://github.com/franmomu))
- [[#99](https://github.com/sonata-project/twig-extensions/pull/99)] Deprecated
`DeprecatedTemplateExtension`, `DeprecatedTemplateNode` and
`DeprecatedTemplateTokenParser` classes.
([@franmomu](https://github.com/franmomu))

### Fixed
- [[#90](https://github.com/sonata-project/twig-extensions/pull/90)] Fix
working `FlashManager` as `StatusClassRenderer`
([@wbloszyk](https://github.com/wbloszyk))
- [[#100](https://github.com/sonata-project/twig-extensions/pull/100)] Fixed
Flex recipe implementation through `SonataTwigSymfonyBundle` alias.
([@phansys](https://github.com/phansys))

### Removed
- [[#101](https://github.com/sonata-project/twig-extensions/pull/101)] Remove
support of Symfony < 3.4 and < 4.4 ([@franmomu](https://github.com/franmomu))

## [1.3.1](https://github.com/sonata-project/twig-extensions/compare/1.3.0...1.3.1) - 2020-06-29
### Fixed
- [[#92](https://github.com/sonata-project/twig-extensions/pull/92)] Fix
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Symfony/Bundle/SonataTwigBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\HttpKernel\Bundle\Bundle;

@trigger_error(sprintf(
'The %s\SonataTwigBundle class is deprecated since version 1.x, to be removed in 2.0. Use %s instead.',
'The %s\SonataTwigBundle class is deprecated since version 1.4, to be removed in 2.0. Use %s instead.',
__NAMESPACE__,
SonataTwigBundle::class
), E_USER_DEPRECATED);
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Symfony/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private function addFlashMessageSection(ArrayNodeDefinition $node): void
->children()
->scalarNode('domain')
->defaultValue('SonataTwigBundle')
->setDeprecated('The child node "%node%" at path "%path%" is deprecated since sonata-project/twig-extensions 1.x and will be removed in 2.0 version. Translate you message before add it to session flash.')
->setDeprecated('The child node "%node%" at path "%path%" is deprecated since sonata-project/twig-extensions 1.4 and will be removed in 2.0 version. Translate you message before add it to session flash.')
->end()
->end()
->end()
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Symfony/Resources/config/twig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</service>
<!-- NEXT_MAJOR: Remove this definition. -->
<service id="sonata.twig.deprecated_template_extension" class="Sonata\Twig\Extension\DeprecatedTemplateExtension">
<deprecated>The "%service_id%" service is deprecated since sonata-project/twig-extensions 1.x.</deprecated>
<deprecated>The "%service_id%" service is deprecated since sonata-project/twig-extensions 1.4.</deprecated>
<tag name="twig.extension"/>
</service>
<service id="sonata.twig.template_extension" class="Sonata\Twig\Extension\TemplateExtension">
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/DeprecatedTemplateExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* NEXT_MAJOR: Remove this class.
*
* @deprecated since sonata-project/twig-extensions 1.x, to be removed in 2.0.
* @deprecated since sonata-project/twig-extensions 1.4, to be removed in 2.0.
*/
final class DeprecatedTemplateExtension extends AbstractExtension
{
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/StatusRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function statusClass($object, $statusType = null, string $default = ''):
}

@trigger_error(sprintf(
'Passing other type than object or string as argument 1 for "%s()" is deprecated since sonata-project/twig-extensions 1.x'
'Passing other type than object or string as argument 1 for "%s()" is deprecated since sonata-project/twig-extensions 1.4'
.' and will throw an exception in 2.0.',
__METHOD__
), E_USER_DEPRECATED);
Expand Down
8 changes: 4 additions & 4 deletions src/FlashMessage/FlashManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(SessionInterface $session, array $types, array $cssC
/**
* Tells if class may handle $object for status class rendering.
*
* @deprecated since sonata-project/twig-extensions 1.x, will be removed in 2.0. Use handlesType() instead.
* @deprecated since sonata-project/twig-extensions 1.4, will be removed in 2.0. Use handlesType() instead.
*
* NEXT_MAJOR: remove this method
*
Expand All @@ -64,7 +64,7 @@ public function __construct(SessionInterface $session, array $types, array $cssC
public function handlesObject($object, ?string $statusName = null)
{
@trigger_error(sprintf(
'The "%s()" method is deprecated since sonata-project/twig-extensions 1.x'
'The "%s()" method is deprecated since sonata-project/twig-extensions 1.4'
.' and will be removed in version 2.0. Use "%s" instead.',
__METHOD__,
'handlesType()'
Expand All @@ -87,7 +87,7 @@ public function handlesObject($object, ?string $statusName = null)
/**
* Returns the status CSS class for $object.
*
* @deprecated since sonata-project/twig-extensions 1.x, will be removed in 2.0. Use getRenderedHtmlClassAttribute() instead.
* @deprecated since sonata-project/twig-extensions 1.4, will be removed in 2.0. Use getRenderedHtmlClassAttribute() instead.
*
* NEXT_MAJOR: remove this method
*
Expand All @@ -100,7 +100,7 @@ public function handlesObject($object, ?string $statusName = null)
public function getStatusClass($object, ?string $statusName = null, string $default = '')
{
@trigger_error(sprintf(
'The "%s()" method is deprecated since sonata-project/twig-extensions 1.x'
'The "%s()" method is deprecated since sonata-project/twig-extensions 1.4'
.' and will be removed in 2.0. Use "%s" instead.',
__METHOD__,
'getRenderedHtmlClassAttribute()'
Expand Down
2 changes: 1 addition & 1 deletion src/Node/DeprecatedTemplateNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* NEXT_MAJOR: Remove this class.
*
* @deprecated since sonata-project/twig-extensions 1.x, to be removed in 2.0.
* @deprecated since sonata-project/twig-extensions 1.4, to be removed in 2.0.
*/
final class DeprecatedTemplateNode extends Node
{
Expand Down
4 changes: 2 additions & 2 deletions src/TokenParser/DeprecatedTemplateTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
*
* NEXT_MAJOR: Remove this class.
*
* @deprecated since sonata-project/twig-extensions 1.x, to be removed in 2.0. Use "deprecated" tag instead.
* @deprecated since sonata-project/twig-extensions 1.4, to be removed in 2.0. Use "deprecated" tag instead.
*/
final class DeprecatedTemplateTokenParser extends AbstractTokenParser
{
public function parse(Token $token): DeprecatedTemplateNode
{
@trigger_error(
'The "sonata_template_deprecate" tag is deprecated since sonata-project/twig-extensions 1.x'
'The "sonata_template_deprecate" tag is deprecated since sonata-project/twig-extensions 1.4'
.' and will be removed in version 2.0. Use "deprecated" tag instead.',
E_USER_DEPRECATED
);
Expand Down

0 comments on commit 70e3aa2

Please sign in to comment.