Skip to content

Commit

Permalink
3.7.0 (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Jan 27, 2021
1 parent 3436f58 commit cde48b2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.7.0](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/compare/3.6.0...3.7.0) - 2021-01-27
### Added
- [[#509](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/509)] Added implementation of `Pager::getCurrentPageResults()` method. ([@franmomu](https://github.com/franmomu))
- [[#501](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/501)] Implemented `Sonata\AdminBundle\Datagrid\PagerInterface::countResults()` ([@dmaicher](https://github.com/dmaicher))

### Deprecated
- [[#509](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/509)] Deprecated `Pager::getResults()` method in favor of `Pager::getCurrentPageResults()`. ([@franmomu](https://github.com/franmomu))
- [[#501](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/501)] `Sonata\DoctrineMongoDBAdminBundle\Datagrid\Pager::computeNbResult()` ([@dmaicher](https://github.com/dmaicher))
- [[#501](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/501)] `Sonata\DoctrineMongoDBAdminBundle\Datagrid\Pager::getNbResults()` ([@dmaicher](https://github.com/dmaicher))
- [[#501](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/501)] `Sonata\DoctrineMongoDBAdminBundle\Datagrid\Pager::setNbResults()` ([@dmaicher](https://github.com/dmaicher))

### Fixed
- [[#502](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/502)] Fixed triggering deprecations from `Pager`. ([@franmomu](https://github.com/franmomu))

## [3.6.0](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/compare/3.5.0...3.6.0) - 2021-01-04
### Added
- [[#486](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle/pull/486)] Added `DataSource` to provide a `DataSourceInterface` implementation. ([@franmomu](https://github.com/franmomu))
Expand Down
18 changes: 9 additions & 9 deletions src/Datagrid/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function countResults(): int
}

@trigger_error(sprintf(
'Relying on the protected property "%s::$nbResults" and its getter/setter is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x and will fail 4.0. Use "countResults()" and "setResultsCount()" instead.',
'Relying on the protected property "%s::$nbResults" and its getter/setter is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will fail 4.0. Use "countResults()" and "setResultsCount()" instead.',
self::class,
), \E_USER_DEPRECATED);

Expand All @@ -52,15 +52,15 @@ public function countResults(): int
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7
*
* @return int
*/
public function getNbResults()
{
if ('sonata_deprecation_mute' !== (\func_get_args()[0] ?? null)) {
@trigger_error(sprintf(
'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x and will be removed in 4.0. Use "countResults()" instead.',
'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will be removed in 4.0. Use "countResults()" instead.',
__METHOD__,
), \E_USER_DEPRECATED);
}
Expand All @@ -71,15 +71,15 @@ public function getNbResults()
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7
*
* @return int
*/
public function computeNbResult()
{
if ('sonata_deprecation_mute' !== (\func_get_args()[0] ?? null)) {
@trigger_error(sprintf(
'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x and will be removed in 4.0.',
'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will be removed in 4.0.',
__METHOD__,
), \E_USER_DEPRECATED);
}
Expand All @@ -95,12 +95,12 @@ public function getCurrentPageResults(): iterable
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x.
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7.
*/
public function getResults()
{
@trigger_error(sprintf(
'Method "%s()" is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x and will'
'Method "%s()" is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will'
.' be removed in 4.0. Use "getCurrentPageResults()" instead.',
__METHOD__,
), \E_USER_DEPRECATED);
Expand Down Expand Up @@ -143,15 +143,15 @@ public function init()
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x
* @deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7
*
* @param int $nb
*/
protected function setNbResults($nb)
{
if ('sonata_deprecation_mute' !== (\func_get_args()[1] ?? null)) {
@trigger_error(sprintf(
'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.x and will be removed in 4.0. Use "setResultsCount()" instead.',
'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will be removed in 4.0. Use "setResultsCount()" instead.',
__METHOD__,
), \E_USER_DEPRECATED);
}
Expand Down

0 comments on commit cde48b2

Please sign in to comment.