Use dependency injection in StaticPageSubscriber

Created on 13 December 2025, about 1 month ago

Problem/Motivation

While fixing πŸ› Revision object is returned instead of revision id due to core type upcasting change. Needs review , eager contributors wanted to convert StaticPageSubscriber to use DI. I also ran into this while getting a green pipeline at πŸ“Œ Enable GitLab CI for static_page Active since phpstan was complaining about the \Drupal:: calls.

Steps to reproduce

Proposed resolution

  1. Use DI not \Drupal:: in src/EventSubscriber/StaticPageSubscriber.php
  2. Remove that warning from phpstan-baseline.neon

Remaining tasks

Move commits/diff about DI from πŸ› Revision object is returned instead of revision id due to core type upcasting change. Needs review into here.

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dww

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024