- Issue created by @renatog
- @renatog opened merge request.
- Status changed to Needs review
about 2 years ago 2:27am 16 March 2023 - ๐ง๐ทBrazil renatog Campinas
MR with the fix: https://git.drupalcode.org/project/hook_event/-/merge_requests/3
- Status changed to Needs work
about 2 years ago 3:55am 16 March 2023 - ๐ฎ๐ณIndia hardikpandya
I agree on the points for README and mixed typehint. I did found a couple of other phpcs issues pending related to DI.
FILE: src/Discovery/HookEventsDiscovery.php --------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES --------------------------------------------------------------------------------------------- 64 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 66 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ---------------------------------------------------------------------------------------------
- ๐ง๐ทBrazil renatog Campinas
I was thinking about fix on this current issue focus on "Coding Standards", and have a separated ticket to handle the "Best Practice" where we can fix the DI cases cited
- Status changed to RTBC
about 2 years ago 8:12am 16 March 2023 -
RenatoG โ
authored 7cb4ac78 on 1.x
Issue #3348338: Fixed phpcs recommendations
-
RenatoG โ
authored 7cb4ac78 on 1.x
- Status changed to Fixed
about 2 years ago 7:44pm 16 March 2023 - ๐ต๐ฑPoland sayco Toruล
Thx, RenatoG! For the mixed type, it's as you said - the PHP 8.0+ feature, so it should stay as it is.
I also understand the point of ignoring the README.md, having code samples makes it almost impossible to keep with that limit (I tend to like the PSR-12 120 chars limit BTW).Regarding the DI, I really wanted to push this module to the stable release.
This was the only piece of the puzzle that I couldn't figure out. I was trying to make it
the same way as the circular reference is done at the core for the theme.managertheme.manager: class: Drupal\Core\Theme\ThemeManager arguments: ['%app.root%', '@theme.negotiator', '@theme.initialization', '@module_handler'] calls: - [setThemeRegistry, ['@theme.registry']]
strangely without any luck.
I don't have that much time recently so any help on this issue will be appreciated. Automatically closed - issue fixed for 2 weeks with no activity.