Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294323

Replace REQUEST_TIME in services

$
0
0

Problem/Motivation

A time service was added to 8.3.x in #2717207: Add a time service to provide consistent interaction with time()/microtime() and superglobals.

Core code should be updated to remove deprecated uses of REQUEST_TIME and time() and others.

For more informations, see the change record.

This issue deals specifically with replace those calls in services.

The services that were identified to have those calls are:

  • \Drupal\Core\Asset\JsCollectionRenderer
  • \Drupal\Core\Cache\ApcuBackend
  • \Drupal\Core\Cache\ApcuBackendFactory
  • \Drupal\Core\Cache\DatabaseBackend
  • \Drupal\Core\Cache\DatabaseBackendFactory
  • \Drupal\Core\Cache\MemoryBackend
  • \Drupal\Core\Cache\MemoryBackendFactory
  • \Drupal\Core\Cache\MemoryCounterBackendFactory
  • \Drupal\Core\Cache\PhpBackend
  • \Drupal\Core\Cache\PhpBackendFactory
  • \Drupal\Core\EventSubscriber\FinishResponseSubscriber
  • \Drupal\Core\Flood\DatabaseBackend
  • \Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory
  • \Drupal\Core\Session\SessionHandler
  • \Drupal\Core\Session\SessionManager
  • \Drupal\comment\CommentStatistics
  • \Drupal\path_alias\AliasManager
  • \Drupal\search\SearchIndex
  • \Drupal\update\UpdateProcessor
  • \Drupal\user\EventSubscriber\UserRequestSubscriber

Proposed resolution

- Remove deprecated uses of REQUEST_TIME and time() and others.
- When this issue is successful, there should be no suppressions left in core/phpstan-baseline.neon for the above mentioned classes with the message Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:11.0.0. Use \Drupal::time()->getRequestTime();

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 294323

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>