annotate core/modules/user/src/UserServiceProvider.php @ 5:12f9dff5fda9
tip
Update to Drupal core 8.7.1
author |
Chris Cannam |
date |
Thu, 09 May 2019 15:34:47 +0100 |
parents |
c75dbcec494b |
children |
|
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\user;
|
Chris@0
|
4
|
Chris@0
|
5 use Drupal\Core\DependencyInjection\ContainerBuilder;
|
Chris@0
|
6 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
|
Chris@0
|
7
|
Chris@0
|
8 class UserServiceProvider implements ServiceModifierInterface {
|
Chris@0
|
9
|
Chris@0
|
10 /**
|
Chris@0
|
11 * {@inheritdoc}
|
Chris@0
|
12 */
|
Chris@0
|
13 public function alter(ContainerBuilder $container) {
|
Chris@0
|
14 if ($container->hasParameter('user.tempstore.expire')) {
|
Chris@0
|
15 @trigger_error('The container parameter "user.tempstore.expire" is deprecated. Use "tempstore.expire" instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
|
Chris@0
|
16 $container->setParameter('tempstore.expire', $container->getParameter('user.tempstore.expire'));
|
Chris@0
|
17 }
|
Chris@0
|
18 else {
|
Chris@0
|
19 // Ensure the user.tempstore.expire parameter is set to the same value
|
Chris@0
|
20 // for modules that still rely on it.
|
Chris@0
|
21 $container->setParameter('user.tempstore.expire', $container->getParameter('tempstore.expire'));
|
Chris@0
|
22 }
|
Chris@0
|
23 }
|
Chris@0
|
24
|
Chris@0
|
25 }
|