Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.98 #7123

Merged
merged 11 commits into from
Apr 27, 2021
Merged

3.98 #7123

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.98.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.97.0...3.98.0) - 2021-04-27
### Added
- [[#7118](https://github.com/sonata-project/SonataAdminBundle/pull/7118)] Added `FilterData` to use it for forward compatibility with `4.0` ([@franmomu](https://github.com/franmomu))
- [[#7115](https://github.com/sonata-project/SonataAdminBundle/pull/7115)] `TaggedAdmin::setListModes()` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7092](https://github.com/sonata-project/SonataAdminBundle/pull/7092)] Generic template for DatagridBuilderInterface ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7092](https://github.com/sonata-project/SonataAdminBundle/pull/7092)] Generic template for LockInterface ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7088](https://github.com/sonata-project/SonataAdminBundle/pull/7088)] Added `render_breadcrumbs` and `render_breadcrumbs_for_title` Twig functions to render breadcrumbs ([@franmomu](https://github.com/franmomu))

### Changed
- [[#7112](https://github.com/sonata-project/SonataAdminBundle/pull/7112)] Restrict return type of `ProxyQuery::execute()` method to `array<object>|(\Traversable<object>&\Countable)` ([@VincentLanglet](https://github.com/VincentLanglet))

### Deprecated
- [[#7115](https://github.com/sonata-project/SonataAdminBundle/pull/7115)] `TaggedAdmin::showMosaicButton()` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7110](https://github.com/sonata-project/SonataAdminBundle/pull/7110)] `_email_link.html.twig` template, use `display_email.html.twig` instead ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7110](https://github.com/sonata-project/SonataAdminBundle/pull/7110)] Using `display_*` templates passing a field_description, you SHOULD pass the option directly instead ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7088](https://github.com/sonata-project/SonataAdminBundle/pull/7088)] Deprecated overriding the `breadcrumbs_builder` variable passed to Twig templates ([@franmomu](https://github.com/franmomu))

### Fixed
- [[#7103](https://github.com/sonata-project/SonataAdminBundle/pull/7103)] FieldDescriptions options phpdoc to keep only common options ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7121](https://github.com/sonata-project/SonataAdminBundle/pull/7121)] Calling foreach on `ArrayAccess` in ModelToIdPropertyTransformer ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7065](https://github.com/sonata-project/SonataAdminBundle/pull/7065)] Fixed "Field "FIELD" has already been rendered" error message when using ModelType ([@epci](https://github.com/epci))
- [[#7092](https://github.com/sonata-project/SonataAdminBundle/pull/7092)] `DatagridBuilderInterface::addFilter` phpdoc: The `$type` MUST be a class-string ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7092](https://github.com/sonata-project/SonataAdminBundle/pull/7092)] Missing generic template for ModelManagerInterface ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7110](https://github.com/sonata-project/SonataAdminBundle/pull/7110)] Stop throwing an error when using `display_*` templates without passing a field_description ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#7093](https://github.com/sonata-project/SonataAdminBundle/pull/7093)] URLs generated at global search results for the list filtering, which were missing the `value` dimension ([@phansys](https://github.com/phansys))
- [[#7093](https://github.com/sonata-project/SonataAdminBundle/pull/7093)] Layout for the filter links generated at global search results ([@phansys](https://github.com/phansys))

### Removed
- [[#7100](https://github.com/sonata-project/SonataAdminBundle/pull/7100)] Remove deprecation for `AbstractAdmin::preValidate()` method ([@VincentLanglet](https://github.com/VincentLanglet))

## [3.97.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.96.0...3.97.0) - 2021-04-19
### Added
- [[#7033](https://github.com/sonata-project/SonataAdminBundle/pull/7033)] Added "block.admin_preview" block in order to show a preview for admin lists in dashboard ([@phansys](https://github.com/phansys))
Expand Down
4 changes: 2 additions & 2 deletions UPGRADE-3.x.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
UPGRADE 3.x
===========

UPGRADE FROM 3.x to 3.x
=======================
UPGRADE FROM 3.97 to 3.98
=========================

### Deprecated overriding `breadcrumbs_builder` variable in templates

Expand Down
4 changes: 2 additions & 2 deletions src/DependencyInjection/Admin/AbstractTaggedAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class AbstractTaggedAdmin implements TaggedAdminInterface
/**
* NEXT_MAJOR: Remove this constant.
*
* @deprecated since sonata-project/sonata-admin 3.x, will be removed in 4.0
* @deprecated since sonata-project/sonata-admin 3.98, will be removed in 4.0
*/
public const MOSAIC_ICON_CLASS = 'fa fa-th-large fa-fw';

Expand Down Expand Up @@ -271,7 +271,7 @@ public function getLabel()
final public function showMosaicButton($isShown)
{
@trigger_error(sprintf(
'The method %s() is deprecated since sonata-project/admin-bundle 3.x. Use `setListModes` instead.',
'The method %s() is deprecated since sonata-project/admin-bundle 3.98. Use `setListModes` instead.',
__METHOD__
), \E_USER_DEPRECATED);

Expand Down
10 changes: 5 additions & 5 deletions src/Resources/config/commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
->set(CreateClassCacheCommand::class, CreateClassCacheCommand::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('console.command', [
'command' => 'cache:create-cache-class',
])
Expand All @@ -46,7 +46,7 @@
->set('sonata.admin.command.explain', ExplainAdminCommand::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('console.command')
->args([
new ReferenceConfigurator('sonata.admin.pool'),
Expand All @@ -64,7 +64,7 @@
->set('sonata.admin.command.generate_object_acl', GenerateObjectAclCommand::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('console.command')
->args([
new ReferenceConfigurator('sonata.admin.pool'),
Expand All @@ -81,7 +81,7 @@
->set('sonata.admin.command.list', ListAdminCommand::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('console.command')
->args([
new ReferenceConfigurator('sonata.admin.pool'),
Expand All @@ -97,7 +97,7 @@
->set('sonata.admin.command.setup_acl', SetupAclCommand::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('console.command')
->args([
new ReferenceConfigurator('sonata.admin.pool'),
Expand Down
38 changes: 19 additions & 19 deletions src/Resources/config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
// NEXT_MAJOR: Remove alias.
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
new ReferenceConfigurator('service_container'),
[], // admin service ids
Expand Down Expand Up @@ -88,7 +88,7 @@
->set('sonata.admin.route_loader', AdminPoolLoader::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('routing.loader')
->args([
new ReferenceConfigurator('sonata.admin.pool'),
Expand All @@ -104,7 +104,7 @@
->set('sonata.admin.helper', AdminHelper::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
new ReferenceConfigurator('property_accessor'),
// NEXT_MAJOR: Remove next line.
Expand All @@ -121,7 +121,7 @@
->set('sonata.admin.builder.filter.factory', FilterFactory::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
new ReferenceConfigurator('service_container'),
[],
Expand All @@ -139,7 +139,7 @@
->set('sonata.admin.breadcrumbs_builder', BreadcrumbsBuilder::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
'%sonata.admin.configuration.breadcrumbs%',
])
Expand All @@ -161,7 +161,7 @@
->set('sonata.admin.label.strategy.bc', BCLabelTranslatorStrategy::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])

// NEXT_MAJOR: Remove this alias.
->alias(BCLabelTranslatorStrategy::class, 'sonata.admin.label.strategy.bc')
Expand All @@ -173,7 +173,7 @@
->set('sonata.admin.label.strategy.native', NativeLabelTranslatorStrategy::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])

// NEXT_MAJOR: Remove this alias.
->alias(NativeLabelTranslatorStrategy::class, 'sonata.admin.label.strategy.native')
Expand All @@ -187,7 +187,7 @@
->set('sonata.admin.label.strategy.noop', NoopLabelTranslatorStrategy::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])

// NEXT_MAJOR: Remove this alias.
->alias(NoopLabelTranslatorStrategy::class, 'sonata.admin.label.strategy.noop')
Expand All @@ -199,7 +199,7 @@
->set('sonata.admin.label.strategy.underscore', UnderscoreLabelTranslatorStrategy::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])

// NEXT_MAJOR: Remove this alias.
->alias(UnderscoreLabelTranslatorStrategy::class, 'sonata.admin.label.strategy.underscore')
Expand All @@ -211,7 +211,7 @@
->set('sonata.admin.label.strategy.form_component', FormLabelTranslatorStrategy::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])

// NEXT_MAJOR: Remove this alias.
->alias(FormLabelTranslatorStrategy::class, 'sonata.admin.label.strategy.form_component')
Expand All @@ -224,7 +224,7 @@
->set('sonata.admin.translator.extractor.jms_translator_bundle', DeprecatedAdminExtractor::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('jms_translation.extractor', [
'alias' => 'sonata_admin',
])
Expand Down Expand Up @@ -260,7 +260,7 @@
->set('sonata.admin.controller.admin', HelperController::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->deprecate(...BCDeprecationParameters::forConfig(
'The controller service "%service_id%" is deprecated in favor of several action services since sonata-project/admin-bundle 3.38.0 and will be removed in 4.0.',
'3.38.0'
Expand All @@ -276,7 +276,7 @@
->set('sonata.admin.audit.manager', AuditManager::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
// NEXT_MAJOR: Remove next line.
new ReferenceConfigurator('service_container'),
Expand All @@ -299,7 +299,7 @@
->set('sonata.admin.exporter', Exporter::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->deprecate(...BCDeprecationParameters::forConfig(
'The service "%service_id%" is deprecated since sonata-project/admin-bundle 3.14.0 and will be removed in 4.0. Use "sonata.exporter.exporter" service instead.',
'3.14.0'
Expand All @@ -308,7 +308,7 @@
->set('sonata.admin.search.handler', SearchHandler::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
'%sonata.admin.configuration.global_search.case_sensitive%',
])
Expand All @@ -323,7 +323,7 @@
->set('sonata.admin.event.extension', AdminEventExtension::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('sonata.admin.extension', ['global' => true])
->args([
new ReferenceConfigurator('event_dispatcher'),
Expand All @@ -339,14 +339,14 @@
->set('sonata.admin.lock.extension', LockExtension::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->tag('sonata.admin.extension', ['global' => true])

// NEXT_MAJOR: Remove this service definition and alias.
->set('sonata.admin.twig.global', GlobalVariables::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
new ReferenceConfigurator('sonata.admin.pool'),
'%sonata.admin.configuration.mosaic_background%',
Expand All @@ -371,7 +371,7 @@
->set('sonata.admin.global_template_registry', TemplateRegistry::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
'%sonata.admin.configuration.templates%',
])
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
->set('sonata.admin.admin_exporter', AdminExporter::class)
// NEXT_MAJOR: Remove public and sonata.container.private tag.
->public()
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.x'])
->tag(AliasDeprecatedPublicServicesCompilerPass::PRIVATE_TAG_NAME, ['version' => '3.98'])
->args([
new ReferenceConfigurator('sonata.exporter.exporter'),
])
Expand Down
Loading