- Issue created by @zniki.ru
- π·πΊRussia zniki.ru
PR created https://github.com/pfrenssen/coder/pull/260
- πΊπΈUnited States nicxvan
The problem is hooks like hook_hook_info.
Now that one won't ever be oop, but we can't guarantee contrib or custom code hasn't done something similar.
- π¦πΉAustria klausi π¦πΉ Vienna
Thanks, approach makes sense, I think we can do this. Left some comments on the PR.
Please add special handling for hook_hook_info(). There are not other hooks in core that would be falsely flagged, I don't think we need to care about other special cases in contrib or custom code (people can make PHPCS ignore directives).
- πΊπΈUnited States nicxvan
We don't need to worry about hook_hook_info, it cannot be oop anyways.
My point was we shouldn't make assumptions about contrib and custom code.
If you think the ignore rule is enough then it's ok with me, this covers the vast majority of the cases.
- π·πΊRussia zniki.ru
@klausi thanks for your review, I update PR and it's ready for review.
@nicxvan, I add special handling for hook_hook_info(). But still not sure about it.
- πΊπΈUnited States nicxvan
We don't need to handle hook_hook_info it will never be oop.
- π·πΊRussia zniki.ru
Thanks @nicxvan, I remove special handling for "hook_hook_info()".
- π·πΊRussia zniki.ru
Decide to improve Hook attribute tests π Improve HookCollectorPass test Active .
- π¦πΉAustria klausi π¦πΉ Vienna
Thanks, I think the sniff is almost ready!
- π·πΊRussia zniki.ru
Thanks for review, PR updated and ready for the review.
- d8c10bc4 committed on 8.3.x
feat(ValidHookName): Add sniff for hook name in PHP attributes (#3499291...
- d8c10bc4 committed on 8.3.x
Automatically closed - issue fixed for 2 weeks with no activity.