Closed (fixed)
Project:
Ridiculously Responsive Social Sharing Buttons
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 May 2024 at 15:03 UTC
Updated:
31 May 2026 at 23:45 UTC
Jump to comment: Most recent
Comments
Comment #3
ptmkenny commentedThe DI adds a lot of lines, but once D9 support is dropped and PHP 8 is required, we can make use of php 8 constructor property promotion.
Comment #4
ptmkenny commentedComment #5
adamps commentedSo this first one is presumably a bug.
The other 3 are all insisting on DI. Personally I don't really agree when it adds loads of code and anyway does anyone care😃? It seems like we are responding to the automatic warning rather than changing it because someone actually wants it. Also the constructor change would break any code that extends the class.
D9 is already EOL and no longer supported and it could safely be removed from the info file.
Comment #6
ptmkenny commentedIf D9 support is dropped we can do constructor promotion to wipe out most of the boilerplate code, but that will still change the constructor, breaking the class for anyone extending it.
Since this needs discussion, I'll open a separate issue to fix the query access check.
Comment #7
ptmkenny commentedComment #8
adamps commentedIn theory we ought to create a major release for a non-BC change, however it seems a bit excessive in this case.
Comment #9
adamps commentedOK here's as idea. I feel that it would be worth creating a new major release if we did a more widespread update of the entire module to use PHP8. We could adopt constructor promotion, add types to class variable and function returns, and anything else relevant. It's not a big module so it probably wouldn't take very long.
Otherwise we could postpone this issue for now until there is another reason to create a major release.
Comment #10
ptmkenny commented@AdamPS: Agreed, going full PHP 8 seems worthy of a new major release. Having done this with a few other modules recently, it should be quite easy. I assume that should be a new issue ("require php 8")?
Comment #11
adamps commentedA new issue sounds good to me thanks
Comment #12
ptmkenny commentedLet's handle this in 3.x. There are now some Drupal 12/13 deprecations to address as well.
Comment #15
ptmkenny commentedComment #16
ptmkenny commentedComment #18
ptmkenny commented