Problem/Motivation
Amongst of the errors in found in the current PHPStan baseline core/phpstan-baseline.neon is: #do callback class 'Bar\Baz')' at key 'X' does not implement Drupal\Core\Security\TrustedCallbackInterface. .
This issue exists to fix all of those.
Steps to reproduce
Proposed resolution
- Solve all of the above reported errors.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff.4-8.txt | 1.68 KB | spokje |
| #8 | 3335110-8.patch | 2.95 KB | spokje |
Comments
Comment #2
spokjeSince all, or rather both, occurrences are deliberate callbacks with invalid Classes to test the Exception to catch invalid callbacks, I think the only way to "fix" this error is to
@phpstan-ignorethem.Comment #3
spokjeComment #4
spokjeAh, it is already a base-lined error at PHPStan level 1.
Comment #5
spokjeComment #6
spokjeComment #7
mondrakeI suggest adding a comment as to why we are phpstan-ignoring those lines. It's actually what @Spokje said in #2 I think.
Comment #8
spokjeComment #9
mondrakeLGTM
Comment #10
kleiton_rodrigues commentedThe #8 patch applies cleanly and works as expected.
LGTM.
Comment #12
catchCommitted 60c2916 and pushed to 10.1.x. Thanks!