Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / user / src / UserServiceProvider.php
index 49537e56a6100dda9ccdc6e10fb1aa5a899ae70f..6a23734b617d41f58bdd8998d6bcf5ef9e13889c 100644 (file)
@@ -1,8 +1,25 @@
 <?php
-// @codingStandardsIgnoreFile
-// This class is intentionally empty so that it overwrites when sites are
-// updated from a zip/tarball without deleting the /core folder first.
-// @todo: remove in 8.3.x
-//
+
 namespace Drupal\user;
-class UserServiceProvider {}
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceModifierInterface;
+
+class UserServiceProvider implements ServiceModifierInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+    if ($container->hasParameter('user.tempstore.expire')) {
+      @trigger_error('The container parameter "user.tempstore.expire" is deprecated. Use "tempstore.expire" instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
+      $container->setParameter('tempstore.expire', $container->getParameter('user.tempstore.expire'));
+    }
+    else {
+      // Ensure the user.tempstore.expire parameter is set to the same value
+      // for modules that still rely on it.
+      $container->setParameter('user.tempstore.expire', $container->getParameter('tempstore.expire'));
+    }
+  }
+
+}