- Issue created by @ptmkenny
- last update
7 months ago PHPLint Failed - last update
7 months ago PHPLint Failed - last update
7 months ago PHPLint Failed - 🇯🇵Japan ptmkenny
The 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 📌 Use PHP 8 constructor property promotion for existing code Needs work .
- last update
7 months ago PHPLint Failed - Status changed to Needs review
7 months ago 4:07pm 9 May 2024 - Status changed to Needs work
6 months ago 6:09pm 6 June 2024 - 🇬🇧United Kingdom adamps
Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0.
So 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.
The DI adds a lot of lines, but once D9 support is dropped and PHP 8 is required,
D9 is already EOL and no longer supported and it could safely be removed from the info file.
- 🇯🇵Japan ptmkenny
If D9 support is dropped we can do constructor promotion 📌 Use PHP 8 constructor property promotion for existing code Needs work 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.
- 🇬🇧United Kingdom adamps
In theory we ought to create a major release for a non-BC change, however it seems a bit excessive in this case.
- 🇬🇧United Kingdom adamps
OK 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.
- Status changed to Postponed
6 months ago 1:59pm 11 June 2024 - 🇯🇵Japan ptmkenny
@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")?