UserServiceProvider.php 897 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Drupal\user;
  3. use Drupal\Core\DependencyInjection\ContainerBuilder;
  4. use Drupal\Core\DependencyInjection\ServiceModifierInterface;
  5. class UserServiceProvider implements ServiceModifierInterface {
  6. /**
  7. * {@inheritdoc}
  8. */
  9. public function alter(ContainerBuilder $container) {
  10. if ($container->hasParameter('user.tempstore.expire')) {
  11. @trigger_error('The container parameter "user.tempstore.expire" is deprecated. Use "tempstore.expire" instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
  12. $container->setParameter('tempstore.expire', $container->getParameter('user.tempstore.expire'));
  13. }
  14. else {
  15. // Ensure the user.tempstore.expire parameter is set to the same value
  16. // for modules that still rely on it.
  17. $container->setParameter('user.tempstore.expire', $container->getParameter('tempstore.expire'));
  18. }
  19. }
  20. }