Skip to content
Snippets Groups Projects

Issue #3443486: Remove deprecated code from lib/Batch and lib/Datetime

2 files
+ 7
59
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -15,32 +15,6 @@ class BatchStorage implements BatchStorageInterface {
@@ -15,32 +15,6 @@ class BatchStorage implements BatchStorageInterface {
*/
*/
const TABLE_NAME = 'batch';
const TABLE_NAME = 'batch';
/**
* The database connection.
*
* @var \Drupal\Core\Database\Connection
*/
protected $connection;
/**
* The session.
*
* @var \Symfony\Component\HttpFoundation\Session\SessionInterface
*/
protected $session;
/**
* The CSRF token generator.
*
* @var \Drupal\Core\Access\CsrfTokenGenerator
*/
protected $csrfToken;
/**
* The time service.
*/
protected readonly TimeInterface $time;
/**
/**
* Constructs the database batch storage service.
* Constructs the database batch storage service.
*
*
@@ -48,20 +22,17 @@ class BatchStorage implements BatchStorageInterface {
@@ -48,20 +22,17 @@ class BatchStorage implements BatchStorageInterface {
* The database connection.
* The database connection.
* @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session
* @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session
* The session.
* The session.
* @param \Drupal\Core\Access\CsrfTokenGenerator $csrf_token
* @param \Drupal\Core\Access\CsrfTokenGenerator $csrfToken
* The CSRF token generator.
* The CSRF token generator.
* @param \Drupal\Component\Datetime\TimeInterface $time
* @param \Drupal\Component\Datetime\TimeInterface $time
* The time service.
* The time service.
*/
*/
public function __construct(Connection $connection, SessionInterface $session, CsrfTokenGenerator $csrf_token, TimeInterface $time = NULL) {
public function __construct(
$this->connection = $connection;
protected Connection $connection,
$this->session = $session;
protected SessionInterface $session,
$this->csrfToken = $csrf_token;
protected CsrfTokenGenerator $csrfToken,
if (!$time) {
protected TimeInterface $time,
@trigger_error('Calling ' . __METHOD__ . '() without the $time argument is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3220378', E_USER_DEPRECATED);
) {
$time = \Drupal::service('datetime.time');
}
$this->time = $time;
}
}
/**
/**
Loading