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.
Issue fork poll-3592648
Show commands
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