Skip to content

Commit

Permalink
Issue #3153565 by vijaycs85: Update instances of Drupal\Core\Pager\Re…
Browse files Browse the repository at this point in the history
…questPagerInterface with Drupal\Core\Pager\PagerParametersInterface
  • Loading branch information
catch committed Jul 13, 2020
1 parent 07c7df6 commit fc5fc56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions includes/pager.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ use Drupal\Component\Utility\Html;
* displays the third page of search results at that URL.
*
* @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use
* \Drupal\Core\Pager\RequestPagerInterface->findPage() instead.
* \Drupal\Core\Pager\PagerParametersInterface->findPage() instead.
*
* @see https://www.drupal.org/node/2779457
* @see \Drupal\Core\Pager\PagerParametersInterface::findPage()
*/
function pager_find_page($element = 0) {
@trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\RequestPagerInterface->findPage() instead. See https://www.drupal.org/node/2779457', E_USER_DEPRECATED);
@trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->findPage() instead. See https://www.drupal.org/node/2779457', E_USER_DEPRECATED);
/* @var $pager_parameters \Drupal\Core\Pager\PagerParametersInterface */
$pager_parameters = \Drupal::service('pager.parameters');
return $pager_parameters->findPage($element);
Expand Down Expand Up @@ -150,13 +150,13 @@ function pager_default_initialize($total, $limit, $element = 0) {
* page request except for those pertaining to paging.
*
* @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use
* \Drupal\Core\Pager\RequestPagerInterface->getQueryParameters() instead.
* \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead.
*
* @see https://www.drupal.org/node/2779457
* @see \Drupal\Core\Pager\PagerParametersInterface::getQueryParameters()
*/
function pager_get_query_parameters() {
@trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\RequestPagerInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457', E_USER_DEPRECATED);
@trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457', E_USER_DEPRECATED);
/* @var $pager_params \Drupal\Core\Pager\PagerParametersInterface */
$pager_params = \Drupal::service('pager.parameters');
return $pager_params->getQueryParameters();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class PagerDeprecationTest extends KernelTestBase {

/**
* @expectedDeprecation pager_find_page is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\RequestPagerInterface->findPage() instead. See https://www.drupal.org/node/2779457
* @expectedDeprecation pager_find_page is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->findPage() instead. See https://www.drupal.org/node/2779457
*/
public function testFindPage() {
$this->assertInternalType('int', pager_find_page());
Expand All @@ -27,7 +27,7 @@ public function testDefaultInitialize() {
}

/**
* @expectedDeprecation pager_get_query_parameters is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\RequestPagerInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457
* @expectedDeprecation pager_get_query_parameters is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457
*/
public function testGetQueryParameters() {
$this->assertInternalType('array', pager_get_query_parameters());
Expand Down

0 comments on commit fc5fc56

Please sign in to comment.