Closed (fixed)
Project:
Static Page
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2025 at 18:50 UTC
Updated:
28 Dec 2025 at 19:19 UTC
Jump to comment: Most recent
While fixing #3386719: Fatal error when viewing a static_page revision due to core type upcasting change, eager contributors wanted to convert StaticPageSubscriber to use DI. I also ran into this while getting a green pipeline at #3563026: Enable GitLab CI for static_page since phpstan was complaining about the \Drupal:: calls.
\Drupal:: in src/EventSubscriber/StaticPageSubscriber.phpphpstan-baseline.neonMove commits/diff about DI from #3386719: Fatal error when viewing a static_page revision due to core type upcasting change into here.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dwwMoved the DI changes from #3386719: Fatal error when viewing a static_page revision due to core type upcasting change to here. However, this is still gonna conflict with #3386719, so let's resolve that, first. Also, still need to remove the DI stuff from the phpstan baseline.
Comment #4
joelpittetIs it ok to expand the scope a bit and deal with
StaticPageSettingsFormas well @dww?Comment #5
dwwRe: #4: Slightly confused, I don't see any
\Drupal::inStaticPageSettingsForm. What else needs DI in there?Comment #6
joelpittet@dww sorry it's not
Drupalstatic. Here is what I had in mind forNodeTypethe gist as there is a constructor change too:Comment #7
dwwOh, gotcha. Sure, we can fix both in here. Thanks!
Comment #8
dwwRebased after recent merges. Fixed
StaticPageSettingsForm.Comment #11
dwwMerged. Thanks!