Problem/Motivation
Amongst the "new" errors found when running PHPStan on level 2 is: PHPDoc tag @foo has invalid value (Bar)
This child-issue exists to fix all of those.
Steps to reproduce
- Run PHPStan on level 2 and see the above error amongst all others.
Proposed resolution
- Solve all of the the above mentioned reported errors.
- Run PHPStan on level 2 and don't see the above mentioned error any more.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3330481-nr-bot.txt | 2.65 KB | needs-review-queue-bot |
Issue fork drupal-3330481
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3330481-fix-phpstan-l2
changes, plain diff MR !3183
Comments
Comment #3
spokjeLooks like our Coder sniffs don't really like variadic functions :/
Bit unsure how to proceed, is this the correct way to persue PHPStan lvl 2?
If so, should we "fix" Coder first before we can continue here?
Comment #4
spokjeComment #5
spokjePutting on NR for more Brains/Eyes/Random Body Parts on #3.
Comment #6
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #9
quietone commentedRebased and fixed a few more.
Comment #10
smustgrave commentedOnly left 1 comment but applied to a few spots. If we are fixing the lines around @throws should they not be fully name spaced?
Comment #11
mstrelan commentedRe #10 I think you're referring to
\InvalidArgumentExceptionand\UnexpectedValueException, both of which are global.Comment #12
smustgrave commentedAh okay. Makes sense but would be in favor of full name spaced but not a hill I'll fight on.
Comment #13
mstrelan commentedTo clarify further, both \InvalidArgumentException and \UnexpectedValueException are already fully namespaced, as in they are native PHP exceptions that do not have a namespace.
Comment #16
longwaveNice to see all these little docs fixes, PHPStan always making us get better.
Committed and pushed 5a87e35f8fa to 11.x and b62ead8de53 to 11.1.x. Thanks!