Skip to content

Commit

Permalink
3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Sep 24, 2020
1 parent 43da623 commit a9d2a58
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 44 deletions.
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.4.0](https://github.com/SonataDoctrineMongoDBAdminBundle/compare/3.3.0...3.4.0) - 2020-09-24
### Added
- [[#353](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/353)] Allow `_sort_by` filter to not be initially defined ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#420](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/420)] Added returning the own instance in `ProxyQuery` based on PHPDoc of `ProxyQueryInterface` ([@franmomu](https://github.com/franmomu))
- [[#408](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/408)] Added support for symfony/options-resolver:^5.1 ([@franmomu](https://github.com/franmomu))
- [[#408](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/408)] Added support for twig 3 ([@franmomu](https://github.com/franmomu))
- [[#409](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/409)] Added doctrine/persistence as a dependency ([@franmomu](https://github.com/franmomu))
- [[#379](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/379)] Added `ModelManager::getDefaultPerPageOptions()` ([@franmomu](https://github.com/franmomu))
- [[#379](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/379)] Added `FieldDescription::getTargetModel()` ([@franmomu](https://github.com/franmomu))
- [[#378](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/378)] Added `doctrine/collections` dependency ([@franmomu](https://github.com/franmomu))
- [[#375](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/375)] Added `sonata-project/form-extensions` dependency ([@franmomu](https://github.com/franmomu))
- [[#346](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/346)] "sonata.admin.manager" tag to "sonata.admin.manager.doctrine_mongodb" service ([@phansys](https://github.com/phansys))

### Changed
- [[#380](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/380)] Changed `DatagridBuilder` constructor's first parameter typehint from `Symfony\Component\Form\FormFactory` to `Symfony\Component\Form\FormFactoryInterface` ([@franmomu](https://github.com/franmomu))
- [[#373](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/373)] Use `deprecated` tag instead of `sonata_template_deprecate` to not throw unwanted deprecation notices ([@franmomu](https://github.com/franmomu))
- [[#373](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/373)] Bump Twig to 2.6 ([@franmomu](https://github.com/franmomu))
- [[#374](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/374)] Bump Symfony to 4.4 ([@franmomu](https://github.com/franmomu))

### Deprecated
- [[#414](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/414)] Deprecate creating `ObjectAclManipulator` without passing a `ManagerRegistry` object ([@franmomu](https://github.com/franmomu))
- [[#415](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/415)] Deprecate `ModelManager::getModelCollectionInstance()` ([@franmomu](https://github.com/franmomu))
- [[#415](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/415)] Deprecate `ModelManager::collectionClear()` ([@franmomu](https://github.com/franmomu))
- [[#415](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/415)] Deprecate `ModelManager::collectionHasElement()` ([@franmomu](https://github.com/franmomu))
- [[#415](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/415)] Deprecate `ModelManager::collectionAddElement()` ([@franmomu](https://github.com/franmomu))
- [[#415](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/415)] Deprecate `ModelManager::collectionRemoveElement()` ([@franmomu](https://github.com/franmomu))
- [[#415](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/415)] Deprecate `ModelManager::getPaginationParameters()` ([@franmomu](https://github.com/franmomu))
- [[#415](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/415)] Deprecate `ModelManager::getSortParameters()` ([@franmomu](https://github.com/franmomu))
- [[#384](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/384)] Deprecate `ModelManager::getParentFieldDescription()` ([@franmomu](https://github.com/franmomu))
- [[#381](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/381)] Deprecated passing arguments to`ProxyQuery::execute()` ([@franmomu](https://github.com/franmomu))
- [[#368](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/368)] Deprecated `AbstractDateFilter::typeRequiresValue` ([@franmomu](https://github.com/franmomu))
- [[#368](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/368)] Deprecated `ModelManager::camelize` ([@franmomu](https://github.com/franmomu))
- [[#368](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/368)] Deprecated constructing `ModelManager` without passing an instance of `PropertyAccessorInterface` as second argument ([@franmomu](https://github.com/franmomu))
- [[#379](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/379)] Deprecated `FieldDescription::getTargetEntity()` in favor of `FieldDescription::getTargetModel()` ([@franmomu](https://github.com/franmomu))

### Fixed
- [[#385](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/385)] Fixed exception captured when creating `ObjectId` ([@franmomu](https://github.com/franmomu))
- [[#377](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/377)] Replace deprecated operator constants ([@franmomu](https://github.com/franmomu))
- [[#372](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/372)] Fixed passing `null` to `Doctrine\ODM\MongoDB\Query\Builder::skip` and `Doctrine\ODM\MongoDB\Query\Builder::limit` ([@franmomu](https://github.com/franmomu))
- [[#359](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/359)] Fixed returning `void` from methods which are intended to return values and returning values from methods which are intended to return `void`; ([@phansys](https://github.com/phansys))
- [[#359](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/359)] Fixed weak check at `ModelManager::getNormalizedIdentifier()` ([@phansys](https://github.com/phansys))

### Removed
- [[#358](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/358)] Drop support of php 7.1 ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#424](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/424)] Remove support for `doctrine/mongodb-odm` <2.0 ([@franmomu](https://github.com/franmomu))
- [[#409](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/409)] Removed deprecations coming from doctrine/common namespace ([@franmomu](https://github.com/franmomu))
- [[#378](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/378)] Removed `twig/extensions` dependency ([@franmomu](https://github.com/franmomu))
- [[#378](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/378)] Removed `jmikola/geojson` dependency ([@franmomu](https://github.com/franmomu))
- [[#375](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/375)] Removed SonataCoreBundle dependency ([@franmomu](https://github.com/franmomu))

## [3.3.0](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/compare/3.2.2...3.3.0) - 2020-01-08
### Fixed
- Fixed filtering by a field of an embedded object
Expand Down
3 changes: 3 additions & 0 deletions UPGRADE-3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ UPGRADE 3.x
UPGRADE FROM 3.x to 3.x
=======================

UPGRADE FROM 3.3 to 3.4
=======================

### Sonata\DoctrineMongoDBAdminBundle\Model\ModelManager

- Deprecated `ModelManager::getModelCollectionInstance()`.
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-mongodb-admin-bundle 3.x and will be removed in version 4.0. Use FieldDescription::getTargetModel() instead.
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4 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-mongodb-admin-bundle 3.x and will be removed in version 4.0.'
'Method %s() is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4 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-mongodb-admin-bundle 3.x.
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.4.
*/
public function getTargetModel(): ?string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Datagrid/ProxyQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function execute(array $params = [], $hydrationMode = null)
// NEXT_MAJOR : remove the `trigger_error()` call and uncomment the exception
@trigger_error(sprintf(
'Passing a value different than an empty array as argument 1 or "null" as argument 2 for "%s()" is'
.' deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x and will throw an exception'
.' deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4 and will throw an exception'
.' in 4.0. The values provided in this array are not used.',
__METHOD__
), E_USER_DEPRECATED);
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/AbstractDateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ protected function applyType(ProxyQueryInterface $queryBuilder, $operation, $fie
*
* @param int $type
*
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
*
* @return bool
*/
protected function typeRequiresValue($type)
{
@trigger_error(sprintf(
'"%s()" is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x and will be removed in version 4.0.',
'"%s()" is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4 and will be removed in version 4.0.',
__METHOD__
), E_USER_DEPRECATED);

Expand Down
10 changes: 5 additions & 5 deletions src/Guesser/FilterTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess(BooleanFilter::class, $options, Guess::HIGH_CONFIDENCE);
case 'datetime':
@trigger_error(
'The datetime type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The datetime type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -106,7 +106,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess(DateFilter::class, $options, Guess::HIGH_CONFIDENCE);
case 'decimal':
@trigger_error(
'The decimal type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The decimal type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -115,7 +115,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess(NumberFilter::class, $options, Guess::MEDIUM_CONFIDENCE);
case 'bigint':
@trigger_error(
'The bigint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The bigint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -124,7 +124,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess(NumberFilter::class, $options, Guess::MEDIUM_CONFIDENCE);
case 'smallint':
@trigger_error(
'The smallint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The smallint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -139,7 +139,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess(NumberFilter::class, $options, Guess::MEDIUM_CONFIDENCE);
case 'text':
@trigger_error(
'The text type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The text type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand Down
18 changes: 9 additions & 9 deletions src/Guesser/TypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess('array', [], Guess::HIGH_CONFIDENCE);
case 'array':
@trigger_error(
'The array type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The array type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -57,21 +57,21 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess('boolean', [], Guess::HIGH_CONFIDENCE);
case 'datetime':
@trigger_error(
'The datetime type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The datetime type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

return new TypeGuess('datetime', [], Guess::HIGH_CONFIDENCE);
case 'vardatetime':
@trigger_error(
'The vardatetime type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The vardatetime type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

return new TypeGuess('datetime', [], Guess::HIGH_CONFIDENCE);
case 'datetimetz':
@trigger_error(
'The datetimetz type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The datetimetz type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -83,7 +83,7 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess('date', [], Guess::HIGH_CONFIDENCE);
case 'decimal':
@trigger_error(
'The decimal type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The decimal type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -95,14 +95,14 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess('integer', [], Guess::MEDIUM_CONFIDENCE);
case 'bigint':
@trigger_error(
'The bigint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The bigint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

return new TypeGuess('integer', [], Guess::MEDIUM_CONFIDENCE);
case 'smallint':
@trigger_error(
'The smallint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The smallint type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand All @@ -111,14 +111,14 @@ public function guessType($class, $property, ModelManagerInterface $modelManager
return new TypeGuess('text', [], Guess::MEDIUM_CONFIDENCE);
case 'text':
@trigger_error(
'The text type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The text type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

return new TypeGuess('textarea', [], Guess::MEDIUM_CONFIDENCE);
case 'time':
@trigger_error(
'The time type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x, to be removed in 4.0.'.
'The time type is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.4, to be removed in 4.0.'.
E_USER_DEPRECATED
);

Expand Down
Loading

0 comments on commit a9d2a58

Please sign in to comment.