Skip to content

Commit

Permalink
3.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jun 30, 2020
1 parent 6a2c100 commit 0c0ccdd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.20.0](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/compare/3.19.0...3.20.0) - 2020-06-30
### Added
- [[#1057](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1057)]
Add `StringFilter` support for `START_WITH` and `END_WITH` operator
([@napestershine](https://github.com/napestershine))
- [[#1049](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1049)]
Added `FieldDescription::getTargetModel()`.
([@phansys](https://github.com/phansys))

### Deprecated
- [[#1049](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1049)] Deprecated passing `null` as argument 2 for `ModelManager::find()`; ([@phansys](https://github.com/phansys))
- [[#1049](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1049)] Deprecated passing `null` as argument 1 for `ModelManager::getNormalizedIdentifier()`; ([@phansys](https://github.com/phansys))
- [[#1049](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1049)] Deprecated passing objects which are in state 2 (new) or 4 (removed) as argument 1 for `ModelManager::getNormalizedIdentifier()`; ([@phansys](https://github.com/phansys))
- [[#1049](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1049)] Deprecated passing other type than `object` as argument 1 for `ModelManager::getUrlSafeIdentifier()`; ([@phansys](https://github.com/phansys))
- [[#1049](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1049)] Deprecated `FieldDescription::getTargetEntity()` in favor of `FieldDescription::getTargetModel()`. ([@phansys](https://github.com/phansys))

## [3.19.0](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/compare/3.18.0...3.19.0) - 2020-06-26
### Changed
- [[#1055](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1055)]
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/FieldDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public function setAssociationMapping($associationMapping)
/**
* NEXT_MAJOR: Remove this method.
*
* @deprecated since sonata-project/doctrine-orm-admin-bundle 3.x and will be removed in version 4.0. Use FieldDescription::getTargetModel() instead.
* @deprecated since sonata-project/doctrine-orm-admin-bundle 3.20 and will be removed in version 4.0. Use FieldDescription::getTargetModel() instead.
*/
public function getTargetEntity()
{
@trigger_error(sprintf(
'Method %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.x and will be removed in version 4.0.'
'Method %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.20 and will be removed in version 4.0.'
.' Use %s::getTargetModel() instead.',
__METHOD__,
__CLASS__
Expand All @@ -53,7 +53,7 @@ public function getTargetEntity()
}

/**
* @final since sonata-project/doctrine-orm-admin-bundle 3.x.
* @final since sonata-project/doctrine-orm-admin-bundle 3.20.
*/
public function getTargetModel(): ?string
{
Expand Down
8 changes: 4 additions & 4 deletions src/Model/ModelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function find($class, $id)
{
if (null === $id) {
@trigger_error(sprintf(
'Passing null as argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.x and will be not allowed in version 4.0.',
'Passing null as argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.20 and will be not allowed in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);

Expand Down Expand Up @@ -378,7 +378,7 @@ public function getNormalizedIdentifier($entity)
// NEXT_MAJOR: Remove the following 2 checks and declare "object" as type for argument 1.
if (null === $entity) {
@trigger_error(sprintf(
'Passing null as argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.x and will be not allowed in version 4.0.',
'Passing null as argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.20 and will be not allowed in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);

Expand All @@ -401,7 +401,7 @@ public function getNormalizedIdentifier($entity)
// ));

@trigger_error(sprintf(
'Passing an object which is in state %u (new) or %u (removed) as argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.x'
'Passing an object which is in state %u (new) or %u (removed) as argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.20'
.'and will be not allowed in version 4.0.',
UnitOfWork::STATE_NEW,
UnitOfWork::STATE_REMOVED,
Expand Down Expand Up @@ -431,7 +431,7 @@ public function getUrlSafeIdentifier($entity)
// NEXT_MAJOR: Remove the following check and declare "object" as type for argument 1.
if (!\is_object($entity)) {
@trigger_error(sprintf(
'Passing other type than object for argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.x and will be not allowed in version 4.0.',
'Passing other type than object for argument 1 for %s() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.20 and will be not allowed in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);

Expand Down
4 changes: 2 additions & 2 deletions tests/Model/ModelManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ public function testRemove($exception): void
*
* @group legacy
*
* @expectedDeprecation Passing null as argument 1 for Sonata\DoctrineORMAdminBundle\Model\ModelManager::find() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.x and will be not allowed in version 4.0.
* @expectedDeprecation Passing null as argument 1 for Sonata\DoctrineORMAdminBundle\Model\ModelManager::find() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.20 and will be not allowed in version 4.0.
*/
public function testFindBadId(): void
{
Expand Down Expand Up @@ -985,7 +985,7 @@ public function getWrongEntities(): iterable
*
* @group legacy
*
* @expectedDeprecation Passing null as argument 1 for Sonata\DoctrineORMAdminBundle\Model\ModelManager::getNormalizedIdentifier() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.x and will be not allowed in version 4.0.
* @expectedDeprecation Passing null as argument 1 for Sonata\DoctrineORMAdminBundle\Model\ModelManager::getNormalizedIdentifier() is deprecated since sonata-project/doctrine-orm-admin-bundle 3.20 and will be not allowed in version 4.0.
*/
public function testGetUrlsafeIdentifierNull(): void
{
Expand Down

0 comments on commit 0c0ccdd

Please sign in to comment.