Skip to content

Commit

Permalink
4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Feb 27, 2022
1 parent 62f984f commit 89cac16
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 15 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.9.0](https://github.com/sonata-project/SonataAdminBundle/compare/4.8.1...4.9.0) - 2022-02-27
### Added
- [[#7730](https://github.com/sonata-project/SonataAdminBundle/pull/7730)] `TemplateType` to display custom data in the edit/create view. ([@VincentLanglet](https://github.com/VincentLanglet))

### Changed
- [[#7749](https://github.com/sonata-project/SonataAdminBundle/pull/7749)] Improve `make:sonata:admin` command, now it's passing modelClass and Controller in services tag. ([@eerison](https://github.com/eerison))
- [[#7725](https://github.com/sonata-project/SonataAdminBundle/pull/7725)] The default list mode is now the first one of the `getListModes` method. ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7744](https://github.com/sonata-project/SonataAdminBundle/pull/7744)] Some typehint from SourceIteratorInterface to \Iterator to allow using this library without deprecation ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7729](https://github.com/sonata-project/SonataAdminBundle/pull/7729)] Use dynamic action variable to template ([@core23](https://github.com/core23))
- [[#7714](https://github.com/sonata-project/SonataAdminBundle/pull/7714)] Change if targetClass is instance of other className ([@willemverspyck](https://github.com/willemverspyck))

### Deprecated
- [[#7748](https://github.com/sonata-project/SonataAdminBundle/pull/7748)] `sonata_admin.options.default_label_catalogue` in favor of `sonata_admin.options.default_translation_domain` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7748](https://github.com/sonata-project/SonataAdminBundle/pull/7748)] `label_catalogue` attribute on `sonata_admin` tag in favor of `translation_domain` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7748](https://github.com/sonata-project/SonataAdminBundle/pull/7748)] `catalogue` option on fieldDescription in favor of `choice_translation_domain` for TYPE_CHOICE or `value_translation_domain` for TYPE_TRANS. ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7748](https://github.com/sonata-project/SonataAdminBundle/pull/7748)] `label_catalogue` on group configuration in favor of `translation_domain` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7748](https://github.com/sonata-project/SonataAdminBundle/pull/7748)] `btn_catalogue` option on form type in favor of `btn_translation_domain` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7725](https://github.com/sonata-project/SonataAdminBundle/pull/7725)] Defining a list mode with a "class" setting, use the "icon" setting instead. ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7743](https://github.com/sonata-project/SonataAdminBundle/pull/7743)] Passing '' for the `admin` key in an item of the `sonata_admin.dashboard.groups` config ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7743](https://github.com/sonata-project/SonataAdminBundle/pull/7743)] Passing a `route` or a `label` when an `admin` is passed in an item of the `sonata_admin.dashboard.groups` config ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7743](https://github.com/sonata-project/SonataAdminBundle/pull/7743)] The `item_adds` key when configuring the `sonata_admin.dashboard.groups` config ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7729](https://github.com/sonata-project/SonataAdminBundle/pull/7729)] `tree.html.twig` template ([@core23](https://github.com/core23))

### Fixed
- [[#7748](https://github.com/sonata-project/SonataAdminBundle/pull/7748)] `translation_domain` attribute on `sonata_admin` is used to set the admin translation domain. (Unlike the `label_catalogue` attribute) ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7757](https://github.com/sonata-project/SonataAdminBundle/pull/7757)] Duplicate display of the help option for ModelListType ([@VincentLanglet](https://github.com/VincentLanglet))

## [4.8.1](https://github.com/sonata-project/SonataAdminBundle/compare/4.8.0...4.8.1) - 2022-01-31
### Fixed
- [[#7716](https://github.com/sonata-project/SonataAdminBundle/pull/7716)] Configure the admin with the `sonata_admin` tag before any custom `call` provided in the service configuration. ([@VincentLanglet](https://github.com/VincentLanglet))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function process(ContainerBuilder $container): void
if (isset($attributes['label_catalogue'])) {
@trigger_error(
'The "label_catalogue" attribute is deprecated'
.' since sonata-project/admin-bundle 4.x and will throw an error in 5.0.',
.' since sonata-project/admin-bundle 4.9 and will throw an error in 5.0.',
\E_USER_DEPRECATED
);
}
Expand Down
14 changes: 7 additions & 7 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->scalarNode('default_label_catalogue')
->setDeprecated(...BCDeprecation::forConfig(
'The "default_label_catalogue" node is deprecated, use "default_translation_domain" instead.',
'4.x'
'4.9'
))
->defaultValue('SonataAdminBundle')
->info('Label Catalogue used for admin services if one isn\'t provided.')
Expand All @@ -344,7 +344,7 @@ public function getConfigTreeBuilder(): TreeBuilder
if (null === $value) {
@trigger_error(
'Not setting the "sonata_admin.options.default_translation_domain" config option is deprecated'
.' since sonata-project/admin-bundle 4.x. In 5.0, it will default to "messages".',
.' since sonata-project/admin-bundle 4.9. In 5.0, it will default to "messages".',
\E_USER_DEPRECATED
);
}
Expand Down Expand Up @@ -414,7 +414,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->scalarNode('label_catalogue')
->setDeprecated(...BCDeprecation::forConfig(
'The "default_label_catalogue" node is deprecated, use "default_translation_domain" instead.',
'4.x'
'4.9'
))
->end()
->scalarNode('icon')->end()
Expand All @@ -437,13 +437,13 @@ public function getConfigTreeBuilder(): TreeBuilder
// NEXT_MAJOR: Remove this check
if ('' === $item['admin']) {
@trigger_error(
'Configuring an item with an empty admin is deprecated since sonata-project/admin-bundle 4.x and will be removed in 5.0.',
'Configuring an item with an empty admin is deprecated since sonata-project/admin-bundle 4.9 and will be removed in 5.0.',
\E_USER_DEPRECATED
);
} else {
if (isset($item['route'])) {
@trigger_error(
'Configuring a route for an item with an admin key is deprecated since sonata-project/admin-bundle 4.x and will be removed in 5.0.',
'Configuring a route for an item with an admin key is deprecated since sonata-project/admin-bundle 4.9 and will be removed in 5.0.',
\E_USER_DEPRECATED
);

Expand All @@ -453,7 +453,7 @@ public function getConfigTreeBuilder(): TreeBuilder

if (isset($item['label'])) {
@trigger_error(
'Configuring a label for an item with an admin key is deprecated since sonata-project/admin-bundle 4.x and will be removed in 5.0.',
'Configuring a label for an item with an admin key is deprecated since sonata-project/admin-bundle 4.9 and will be removed in 5.0.',
\E_USER_DEPRECATED
);

Expand Down Expand Up @@ -503,7 +503,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->arrayNode('item_adds')
->setDeprecated(...BCDeprecation::forConfig(
'The "item_adds" node is deprecated',
'4.x'
'4.9'
))
->prototype('scalar')->defaultValue([])->end()
->end()
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/AdminType.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static function (Options $options, $value): string {

return '';
},
'4.x',
'4.9',
)
); // NEXT_MAJOR: Remove this deprecation notice.
}
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ModelAutocompleteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static function (Options $options, $value): string {

return '';
},
'4.x',
'4.9',
)
); // NEXT_MAJOR: Remove this deprecation notice.
}
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ModelListType.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static function (Options $options, $value): string {

return '';
},
'4.x',
'4.9',
)
); // NEXT_MAJOR: Remove this deprecation notice.
}
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ModelType.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static function (Options $options, $value): string {

return '';
},
'4.x',
'4.9',
)
); // NEXT_MAJOR: Remove this deprecation notice.
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/CRUD/tree.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ file that was distributed with this source code.
#}

{% deprecated 'The "tree.html.twig" template is deprecated since sonata-project/admin-bundle version 4.x and will be removed in 5.0.' %}
{% deprecated 'The "tree.html.twig" template is deprecated since sonata-project/admin-bundle version 4.9 and will be removed in 5.0.' %}

{% extends '@SonataAdmin/CRUD/base_list.html.twig' %}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/ajax_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ file that was distributed with this source code.
<a href="{{ admin.generateUrl('list', app.request.query.all|merge({_list_mode: mode})) }}" class="btn btn-default navbar-btn btn-sm{% if admin.getListMode() == mode %} active{% endif %}">
{# NEXT_MAJOR: Remove the if and keep the else part #}
{% if settings.icon is not defined and settings.class is defined %}
{% deprecated 'Relying on the "class" setting is deprecated since sonata-project/admin-bundle 4.x, use the "icon" setting instead' %}
{% deprecated 'Relying on the "class" setting is deprecated since sonata-project/admin-bundle 4.9, use the "icon" setting instead' %}
<i class="{{ settings.class }}" aria-hidden="true"></i>
{% else %}
{{ settings.icon|default('')|parse_icon }}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/standard_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ file that was distributed with this source code.
<a href="{{ admin.generateUrl('list', app.request.query.all|merge({_list_mode: mode})) }}" class="btn btn-default navbar-btn btn-sm{% if admin.getListMode() == mode %} active{% endif %}">
{# NEXT_MAJOR: Remove the if and keep the else part #}
{% if settings.icon is not defined and settings.class is defined %}
{% deprecated 'Relying on the "class" setting is deprecated since sonata-project/admin-bundle 4.x, use the "icon" setting instead' %}
{% deprecated 'Relying on the "class" setting is deprecated since sonata-project/admin-bundle 4.9, use the "icon" setting instead' %}
<i class="{{ settings.class }}" aria-hidden="true"></i>
{% else %}
{{ settings.icon|default('')|parse_icon }}
Expand Down

0 comments on commit 89cac16

Please sign in to comment.