From 228e1fb1c455d87c2c02fde2c403c646fd052f89 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Mon, 9 Nov 2020 20:22:23 +0100 Subject: [PATCH] 3.79 (#6582) --- CHANGELOG.md | 25 +++++++++++++++++++++++++ UPGRADE-3.x.md | 2 +- src/Admin/AbstractAdmin.php | 2 +- src/Model/DatagridManagerInterface.php | 2 +- src/Model/ModelManagerInterface.php | 2 +- tests/Admin/AdminTest.php | 2 +- 6 files changed, 30 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72521c5b4f..d5ded9cc32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,31 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [3.79.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.78.1...3.79.0) - 2020-11-09 +### Added +- [[#6565](https://github.com/sonata-project/SonataAdminBundle/pull/6565)] Added `collection_by_reference` option for AdminType ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6556](https://github.com/sonata-project/SonataAdminBundle/pull/6556)] Added `Sonata\AdminBundle\Templating\AbstractTemplateRegistry` ([@wbloszyk](https://github.com/wbloszyk)) +- [[#6556](https://github.com/sonata-project/SonataAdminBundle/pull/6556)] Added `Sonata\AdminBundle\Templating\MutableTemplateRegistry` ([@wbloszyk](https://github.com/wbloszyk)) +- [[#6556](https://github.com/sonata-project/SonataAdminBundle/pull/6556)] Added `Sonata\AdminBundle\Templating\MutableTemplateRegistryAwareInterface` ([@wbloszyk](https://github.com/wbloszyk)) +- [[#6463](https://github.com/sonata-project/SonataAdminBundle/pull/6463)] Added DataSourceInterface ([@VincentLanglet](https://github.com/VincentLanglet)) + +### Changed +- [[#6565](https://github.com/sonata-project/SonataAdminBundle/pull/6565)] `collection_by_reference` is used instead of `by_reference` in `AdminType in order to know which call should be used between `ObjectManipulator::addInstance()` and `ObjectManipulator::setObject()` ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6556](https://github.com/sonata-project/SonataAdminBundle/pull/6556)] Changed `Sonata\AdminBundle\Templating\TemplateRegistryAwareInterface` to handle instances of `TemplateRegistryInterface`. ([@wbloszyk](https://github.com/wbloszyk)) +- [[#6548](https://github.com/sonata-project/SonataAdminBundle/pull/6548)] Prevent load entities when pass empty choices for `ModelType`, use null for native loading ([@kirya-dev](https://github.com/kirya-dev)) + +### Deprecated +- [[#6556](https://github.com/sonata-project/SonataAdminBundle/pull/6556)] Deprecated `Sonata\AdminBundle\Templating\TemplateRegistry:setTemplate()` ([@wbloszyk](https://github.com/wbloszyk)) +- [[#6556](https://github.com/sonata-project/SonataAdminBundle/pull/6556)] Deprecated `Sonata\AdminBundle\Templating\TemplateRegistry:setTemplates()` ([@wbloszyk](https://github.com/wbloszyk)) +- [[#6458](https://github.com/sonata-project/SonataAdminBundle/pull/6458)] `DatagridManagerInterface` with no replacement ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6463](https://github.com/sonata-project/SonataAdminBundle/pull/6463)] Deprecated not setting a DataSourceInterface to an Admin ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6463](https://github.com/sonata-project/SonataAdminBundle/pull/6463)] Deprecated `ModelManagerInterface::getDataSourceIterator()` ([@VincentLanglet](https://github.com/VincentLanglet)) + +### Fixed +- [[#6571](https://github.com/sonata-project/SonataAdminBundle/pull/6571)] If no label is provided to the filter, the default label is used following the label translator strategy ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6574](https://github.com/sonata-project/SonataAdminBundle/pull/6574)] Showing toggle filter button when the filter is hidden in the admin list ([@phansys](https://github.com/phansys)) +- [[#6534](https://github.com/sonata-project/SonataAdminBundle/pull/6534)] Allow usage object properties to get/set instance in `ObjectManipulator` ([@peter-gribanov](https://github.com/peter-gribanov)) + ## [3.78.1](https://github.com/sonata-project/SonataAdminBundle/compare/3.78.0...3.78.1) - 2020-10-28 ### Fixed - [[#6530](https://github.com/sonata-project/SonataAdminBundle/pull/6530)] Added the ability to scroll the filter list dropdown ([@VincentLanglet](https://github.com/VincentLanglet)) diff --git a/UPGRADE-3.x.md b/UPGRADE-3.x.md index 141fc50bc8..f0b6fea66a 100644 --- a/UPGRADE-3.x.md +++ b/UPGRADE-3.x.md @@ -1,7 +1,7 @@ UPGRADE 3.x =========== -UPGRADE FROM 3.x to 3.x +UPGRADE FROM 3.78 to 3.79 ========================= ### Template registry structure and responsibilities. diff --git a/src/Admin/AbstractAdmin.php b/src/Admin/AbstractAdmin.php index ec5ac6e237..c5feaa58a5 100644 --- a/src/Admin/AbstractAdmin.php +++ b/src/Admin/AbstractAdmin.php @@ -713,7 +713,7 @@ public function getDataSourceIterator() } @trigger_error(sprintf( - 'Using "%s()" without setting a "%s" instance in the admin is deprecated since sonata-admin/admin-bundle 3.x' + 'Using "%s()" without setting a "%s" instance in the admin is deprecated since sonata-admin/admin-bundle 3.79' .' and won\'t be possible in 4.0.', __METHOD__, DataSourceInterface::class diff --git a/src/Model/DatagridManagerInterface.php b/src/Model/DatagridManagerInterface.php index bfe57055d6..29bc86b946 100644 --- a/src/Model/DatagridManagerInterface.php +++ b/src/Model/DatagridManagerInterface.php @@ -18,7 +18,7 @@ * * NEXT_MAJOR: Remove this interface * - * @deprecated since sonata-project/admin-bundle 3.x + * @deprecated since sonata-project/admin-bundle 3.79 * * @method array getDefaultPerPageOptions(string $class) */ diff --git a/src/Model/ModelManagerInterface.php b/src/Model/ModelManagerInterface.php index 5ccb4186ad..f1fa27bb1e 100644 --- a/src/Model/ModelManagerInterface.php +++ b/src/Model/ModelManagerInterface.php @@ -311,7 +311,7 @@ public function executeQuery($query); * @param int|null $firstResult * @param int|null $maxResult * - * @deprecated since sonata-admin/admin-bundle 3.x and will be removed in 4.0. + * @deprecated since sonata-admin/admin-bundle 3.79 and will be removed in 4.0. * * @return SourceIteratorInterface */ diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php index a6296a7e4f..7e9cf1cffa 100644 --- a/tests/Admin/AdminTest.php +++ b/tests/Admin/AdminTest.php @@ -2632,7 +2632,7 @@ public function testGetDataSourceIteratorWithoutDataSourceSet(): void return $label; }); - $this->expectDeprecation('Using "Sonata\AdminBundle\Admin\AbstractAdmin::getDataSourceIterator()" without setting a "Sonata\AdminBundle\Exporter\DataSourceInterface" instance in the admin is deprecated since sonata-admin/admin-bundle 3.x and won\'t be possible in 4.0.'); + $this->expectDeprecation('Using "Sonata\AdminBundle\Admin\AbstractAdmin::getDataSourceIterator()" without setting a "Sonata\AdminBundle\Exporter\DataSourceInterface" instance in the admin is deprecated since sonata-admin/admin-bundle 3.79 and won\'t be possible in 4.0.'); $admin->getDataSourceIterator(); }