Closed (fixed)
Project:
Poll
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 May 2026 at 05:27 UTC
Updated:
12 Jun 2026 at 14:10 UTC
Jump to comment: Most recent
We should update the module's dependency injection and class constructors to use PHP 8.0 Constructor Property Promotion.Since Drupal 10+ requires PHP 8.1+, we can safely leverage this modern syntax across the codebase to reduce boilerplate code.
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
berdirYou could also combine it with autowire if you touch those, requiring 10.2 should be fine now if not already done: https://www.drupal.org/node/3395716
edit: that's specifically for controllers, there are also versions for plugins but they require much more recent core versions.
Comment #4
ivnishComment #5
bramdriesenComment #7
bramdriesen