diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b3aaac37..b3df52f9cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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/). +## [3.78.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.77.0...3.78.0) - 2020-10-23 +### Added +- [[#6486](https://github.com/sonata-project/SonataAdminBundle/pull/6486)] Added `Pool::hasSingleAdminByClass()` ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6468](https://github.com/sonata-project/SonataAdminBundle/pull/6468)] Add phpdoc to array returns ([@core23](https://github.com/core23)) + +### Changed +- [[#6513](https://github.com/sonata-project/SonataAdminBundle/pull/6513)] Html with a links in no_result_content ([@axzx](https://github.com/axzx)) +- [[#6500](https://github.com/sonata-project/SonataAdminBundle/pull/6500)] When accessing on a non-existent List page, it displays a link to go to page 1 instead of a button to create a new entity ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6497](https://github.com/sonata-project/SonataAdminBundle/pull/6497)] Setting default values ​​for filters and sorting even without a request ([@VincentLanglet](https://github.com/VincentLanglet)) + +### Deprecated +- [[#6503](https://github.com/sonata-project/SonataAdminBundle/pull/6503)] Instantiate a FieldDescription without passing the name as first argument ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6515](https://github.com/sonata-project/SonataAdminBundle/pull/6515)] Deprecate `FilterInterface::filter()` method ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6510](https://github.com/sonata-project/SonataAdminBundle/pull/6510)] Method `Validators::validateEntityName()` ([@phansys](https://github.com/phansys)) +- [[#6320](https://github.com/sonata-project/SonataAdminBundle/pull/6320)] Deprecated `Sonata\AdminBundle\Controller\CRUDController::getRestMethod()` method in favor of `Symfony\Component\HttpFoundation\Request::getMethod()` ([@phansys](https://github.com/phansys)) +- [[#6480](https://github.com/sonata-project/SonataAdminBundle/pull/6480)] Deprecated not configuring `acl_user_manager` service explicitly when using `friendsofsymfony/user-bundle` ([@franmomu](https://github.com/franmomu)) +- [[#6480](https://github.com/sonata-project/SonataAdminBundle/pull/6480)] Deprecated configuring `acl_user_manager` service without implementing `AdminAclUserManagerInterface` ([@franmomu](https://github.com/franmomu)) + +### Fixed +- [[#6509](https://github.com/sonata-project/SonataAdminBundle/pull/6509)] Passing an empty array as argument 3 for implementations of `ModelManagerInterface::addIdentifiersToQuery()` ([@phansys](https://github.com/phansys)) +- [[#6507](https://github.com/sonata-project/SonataAdminBundle/pull/6507)] Pool support of group without admin ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6320](https://github.com/sonata-project/SonataAdminBundle/pull/6320)] Fixed return value from `CRUDController::getRestMethod()` respecting `Request::getHttpMethodParameterOverride()` ([@phansys](https://github.com/phansys)) +- [[#6498](https://github.com/sonata-project/SonataAdminBundle/pull/6498)] Call \Knp\Menu\MenuItem::getLabel() method directly in twig template to avoid a possible side effect from \ArrayAccess ([@VincentLanglet](https://github.com/VincentLanglet)) +- [[#6525](https://github.com/sonata-project/SonataAdminBundle/pull/6525)] Missing ellipsis in some truncated word ([@phansys](https://github.com/phansys)) +- [[#6523](https://github.com/sonata-project/SonataAdminBundle/pull/6523)] fixed BC break with getting the translation domain for nested fields on a one-to-many inline edit table view ([@dmaicher](https://github.com/dmaicher)) +- [[#6438](https://github.com/sonata-project/SonataAdminBundle/pull/6438)] AdminType with CollectionType passed by reference ([@VincentLanglet](https://github.com/VincentLanglet)) + ## [3.77.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.76.0...3.77.0) - 2020-10-16 ### Added - [[#6419](https://github.com/sonata-project/SonataAdminBundle/pull/6419)] Add diff --git a/UPGRADE-3.x.md b/UPGRADE-3.x.md index 3f55ddca5b..4065ea8ae9 100644 --- a/UPGRADE-3.x.md +++ b/UPGRADE-3.x.md @@ -1,8 +1,8 @@ UPGRADE 3.x =========== -UPGRADE FROM 3.x to 3.x -======================= +UPGRADE FROM 3.77 to 3.78 +========================= ### Deprecated `Sonata\AdminBundle\Command\Validators::validateEntityName()` diff --git a/src/Admin/BaseFieldDescription.php b/src/Admin/BaseFieldDescription.php index 159377b096..8ac17371d8 100644 --- a/src/Admin/BaseFieldDescription.php +++ b/src/Admin/BaseFieldDescription.php @@ -141,7 +141,7 @@ public function __construct(?string $name = null, array $options = []) if (null === $name) { @trigger_error(sprintf( 'Omitting the argument 1 for "%s()" or passing other type than "string" is deprecated'. - ' since sonata-project/admin-bundle 3.x. It will accept only string in version 4.0.', + ' since sonata-project/admin-bundle 3.78. It will accept only string in version 4.0.', __METHOD__ ), E_USER_DEPRECATED); } else { diff --git a/src/Command/Validators.php b/src/Command/Validators.php index adf03c0042..78c2416ff8 100644 --- a/src/Command/Validators.php +++ b/src/Command/Validators.php @@ -41,7 +41,7 @@ public static function validateUsername($username) /** * NEXT_MAJOR: Remove this method. * - * @deprecated since sonata-project/admin-bundle 3.x, will be removed in version 4.0. + * @deprecated since sonata-project/admin-bundle 3.78, will be removed in version 4.0. * * @static * @@ -56,7 +56,7 @@ public static function validateUsername($username) public static function validateEntityName($shortcut) { @trigger_error(sprintf( - 'Method "%s()" is deprecated since sonata-project/admin-bundle 3.x' + 'Method "%s()" is deprecated since sonata-project/admin-bundle 3.78' .' and will be removed in version 4.0.', __METHOD__ ), E_USER_DEPRECATED); diff --git a/src/Controller/CRUDController.php b/src/Controller/CRUDController.php index 1d0e5f031e..6ece1fed01 100644 --- a/src/Controller/CRUDController.php +++ b/src/Controller/CRUDController.php @@ -981,7 +981,7 @@ public function aclAction($deprecatedId = null) // NEXT_MAJOR: Remove the unused && $this->getParameter('sonata.admin.security.fos_user_autoconfigured')) { @trigger_error(sprintf( 'Not configuring "acl_user_manager" and using ACL security handler is deprecated since' - .' sonata-project/admin-bundle 3.x and will not work on 4.x. You MUST specify the service name' + .' sonata-project/admin-bundle 3.78 and will not work on 4.0. You MUST specify the service name' .' under "sonata_admin.security.acl_user_manager" option.' ), E_USER_DEPRECATED); } @@ -1121,14 +1121,14 @@ protected function isXmlHttpRequest() * Returns the correct RESTful verb, given either by the request itself or * via the "_method" parameter. * - * @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0. Use `Request::getMethod()` instead. + * @deprecated since sonata-project/admin-bundle 3.78, to be removed in 4.0. Use `Request::getMethod()` instead. * * @return string HTTP method, either */ protected function getRestMethod() { @trigger_error(sprintf( - 'Method "%s()" is deprecated since sonata-project/admin-bundle 3.x' + 'Method "%s()" is deprecated since sonata-project/admin-bundle 3.78' .', to be removed in 4.0. Use `%s::getMethod()` instead.', __METHOD__, Request::class diff --git a/src/DependencyInjection/Compiler/CheckAclUserManagerCompilerPass.php b/src/DependencyInjection/Compiler/CheckAclUserManagerCompilerPass.php index a72556aef0..97f5bc631d 100644 --- a/src/DependencyInjection/Compiler/CheckAclUserManagerCompilerPass.php +++ b/src/DependencyInjection/Compiler/CheckAclUserManagerCompilerPass.php @@ -44,7 +44,7 @@ public function process(ContainerBuilder $container): void if (!is_a($userManagerDefinition->getClass(), AdminAclUserManagerInterface::class, true)) { @trigger_error(sprintf( 'Configuring the service in sonata_admin.security.acl_user_manager without implementing "%s"' - .' is deprecated since sonata-project/admin-bundle 3.x and will throw an "%s" exception in 4.0.', + .' is deprecated since sonata-project/admin-bundle 3.78 and will throw an "%s" exception in 4.0.', AdminAclUserManagerInterface::class, \InvalidArgumentException::class ), E_USER_DEPRECATED); diff --git a/src/Filter/FilterInterface.php b/src/Filter/FilterInterface.php index 3111b5b920..50747d6e81 100644 --- a/src/Filter/FilterInterface.php +++ b/src/Filter/FilterInterface.php @@ -27,7 +27,7 @@ interface FilterInterface /** * NEXT_MAJOR: Remove this method. * - * @deprecated since sonata-project/admin-bundle 3.x, to be removed with 4.0 + * @deprecated since sonata-project/admin-bundle 3.78, to be removed with 4.0 * * Apply the filter to the QueryBuilder instance. * diff --git a/tests/Controller/CRUDControllerTest.php b/tests/Controller/CRUDControllerTest.php index a2993a74a0..d5e4528e69 100644 --- a/tests/Controller/CRUDControllerTest.php +++ b/tests/Controller/CRUDControllerTest.php @@ -2713,7 +2713,7 @@ public function testAclTriggerDeprecationWithoutConfiguringUserManager(): void $this->container->setParameter('sonata.admin.security.fos_user_autoconfigured', true); - $this->expectDeprecation('Not configuring "acl_user_manager" and using ACL security handler is deprecated since sonata-project/admin-bundle 3.x and will not work on 4.x. You MUST specify the service name under "sonata_admin.security.acl_user_manager" option.'); + $this->expectDeprecation('Not configuring "acl_user_manager" and using ACL security handler is deprecated since sonata-project/admin-bundle 3.78 and will not work on 4.0. You MUST specify the service name under "sonata_admin.security.acl_user_manager" option.'); $this->expectException(NotFoundHttpException::class); diff --git a/tests/DependencyInjection/Compiler/CheckAclUserManagerCompilerPassTest.php b/tests/DependencyInjection/Compiler/CheckAclUserManagerCompilerPassTest.php index df9e4fe6ba..7124592c4a 100644 --- a/tests/DependencyInjection/Compiler/CheckAclUserManagerCompilerPassTest.php +++ b/tests/DependencyInjection/Compiler/CheckAclUserManagerCompilerPassTest.php @@ -35,7 +35,7 @@ public function testTriggersADeprecationIfItAclUserManagerIsNotProperlyConfigure $this->setParameter('sonata.admin.security.acl_user_manager', 'acl_user_manager'); $this->setParameter('sonata.admin.security.fos_user_autoconfigured', false); - $this->expectDeprecation('Configuring the service in sonata_admin.security.acl_user_manager without implementing "Sonata\AdminBundle\Util\AdminAclUserManagerInterface" is deprecated since sonata-project/admin-bundle 3.x and will throw an "InvalidArgumentException" exception in 4.0.'); + $this->expectDeprecation('Configuring the service in sonata_admin.security.acl_user_manager without implementing "Sonata\AdminBundle\Util\AdminAclUserManagerInterface" is deprecated since sonata-project/admin-bundle 3.78 and will throw an "InvalidArgumentException" exception in 4.0.'); $this->compile(); }