Skip to content
Snippets Groups Projects

Replace REQUEST_TIME in plugins with direct container access

Closed quietone requested to merge issue/drupal-3395986:3395986-replace-requesttime-in into 11.x
7 unresolved threads

Closes #3395986

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
38 39 /**
39 40 * {@inheritdoc}
40 41 */
41 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, DateFormatterInterface $date_formatter) {
42 parent::__construct($configuration, $plugin_id, $plugin_definition, $route_match, $date_formatter);
42 public function __construct(
43 array $configuration,
44 $plugin_id,
45 $plugin_definition,
46 RouteMatchInterface $route_match,
47 DateFormatterInterface $date_formatter,
48 TimeInterface $time = NULL,
  • 27 29
    30 /**
    31 * Constructs a HistoryUserTimestamp object.
    32 *
    33 * @param array $configuration
    34 * A configuration array containing information about the plugin instance.
    35 * @param string $plugin_id
    36 * The plugin_id for the plugin instance.
    37 * @param mixed $plugin_definition
    38 * The plugin implementation definition.
    39 * @param \Drupal\Component\Datetime\TimeInterface|null $time
    40 * The time service.
    41 */
    42 public function __construct(array $configuration, $plugin_id, $plugin_definition, protected ?TimeInterface $time = NULL) {
    43 parent::__construct($configuration, $plugin_id, $plugin_definition);
    44 if ($this->time === NULL) {
  • 38 39 /**
    39 40 * {@inheritdoc}
    40 41 */
    41 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, DateFormatterInterface $date_formatter) {
    42 parent::__construct($configuration, $plugin_id, $plugin_definition, $route_match, $date_formatter);
    42 public function __construct(
    43 array $configuration,
    44 $plugin_id,
    45 $plugin_definition,
    46 RouteMatchInterface $route_match,
    47 DateFormatterInterface $date_formatter,
    48 TimeInterface $time = NULL,
    49 ) {
    50 if ($time === NULL) {
  • 75 * The time service.
    73 76 */
    74 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, DateFormatterInterface $date_formatter) {
    77 public function __construct(
    78 array $configuration,
    79 $plugin_id,
    80 $plugin_definition,
    81 RouteMatchInterface $route_match,
    82 DateFormatterInterface $date_formatter,
    83 protected ?TimeInterface $time = NULL,
    84 ) {
    75 85 parent::__construct($configuration, $plugin_id, $plugin_definition);
    76 86
    77 87 $this->routeMatch = $route_match;
    78 88 $this->dateFormatter = $date_formatter;
    89 if ($this->time === NULL) {
  • 43 44 * The plugin implementation definition.
    44 45 * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
    45 46 * The date formatter service.
    47 * @param \Drupal\Component\Datetime\TimeInterface|null $time
    48 * The time service.
    46 49 */
    47 public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter) {
    48 $this->dateFormatter = $date_formatter;
    49
    50 public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter, protected ?TimeInterface $time = NULL) {
    50 51 parent::__construct($configuration, $plugin_id, $plugin_definition);
    52 $this->dateFormatter = $date_formatter;
    53 if ($this->time === NULL) {
  • 50 * The time service.
    48 51 */
    49 public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter, EntityStorageInterface $date_format_storage) {
    52 public function __construct(
    53 array $configuration,
    54 $plugin_id,
    55 $plugin_definition,
    56 DateFormatterInterface $date_formatter,
    57 EntityStorageInterface $date_format_storage,
    58 protected ?TimeInterface $time = NULL,
    59 ) {
    50 60 parent::__construct($configuration, $plugin_id, $plugin_definition);
    51 61
    52 62 $this->dateFormatter = $date_formatter;
    53 63 $this->dateFormatStorage = $date_format_storage;
    64 if ($this->time === NULL) {
  • added 1 commit

    Compare with previous version

  • 48 51 */
    49 public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter, EntityStorageInterface $date_format_storage) {
    52 public function __construct(
    53 array $configuration,
    54 $plugin_id,
    55 $plugin_definition,
    56 DateFormatterInterface $date_formatter,
    57 EntityStorageInterface $date_format_storage,
    58 protected ?TimeInterface $time = NULL,
    59 ) {
    50 60 parent::__construct($configuration, $plugin_id, $plugin_definition);
    51 61
    52 62 $this->dateFormatter = $date_formatter;
    53 63 $this->dateFormatStorage = $date_format_storage;
    64 if (!$time) {
    65 @trigger_error('Calling ' . __METHOD__ . ' without the $time argument is deprecated in drupal:10.3.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3301971', E_USER_DEPRECATED);
  • added 1 commit

    Compare with previous version

  • Roman Paska added 1 commit

    added 1 commit

    • 212e1376 - Replace REQUEST_TIME in one more plugin

    Compare with previous version

  • Roman Paska added 1 commit

    added 1 commit

    Compare with previous version

  • Roman Paska added 1 commit

    added 1 commit

    • 7984e5a6 - Seems like there are more changes to Update processor than I expected

    Compare with previous version

  • Roman Paska added 1 commit

    added 1 commit

    Compare with previous version

  • spokje added 27 commits

    added 27 commits

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading