Skip to content
Merged

3.78 #6524

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
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/).

## [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
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.77 to 3.78
=========================

### Deprecated `Sonata\AdminBundle\Command\Validators::validateEntityName()`

Expand Down
2 changes: 1 addition & 1 deletion src/Admin/BaseFieldDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Validators.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/Controller/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/CRUDControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down