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

CommentFileSizeAuthor
#6 3330481-nr-bot.txt2.65 KBneeds-review-queue-bot

Issue fork drupal-3330481

Command icon 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:

Comments

Spokje created an issue. See original summary.

spokje’s picture

Assigned: spokje » Unassigned
Status: Active » Needs work

Looks 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?

spokje’s picture

Assigned: Unassigned » spokje
spokje’s picture

Assigned: spokje » Unassigned
Status: Needs work » Needs review

Putting on NR for more Brains/Eyes/Random Body Parts on #3.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.65 KB

The 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.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone made their first commit to this issue’s fork.

quietone’s picture

Status: Needs work » Needs review

Rebased and fixed a few more.

smustgrave’s picture

Status: Needs review » Needs work

Only left 1 comment but applied to a few spots. If we are fixing the lines around @throws should they not be fully name spaced?

mstrelan’s picture

Status: Needs work » Needs review

Re #10 I think you're referring to \InvalidArgumentException and \UnexpectedValueException, both of which are global.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Ah okay. Makes sense but would be in favor of full name spaced but not a hill I'll fight on.

mstrelan’s picture

To clarify further, both \InvalidArgumentException and \UnexpectedValueException are already fully namespaced, as in they are native PHP exceptions that do not have a namespace.

  • longwave committed b62ead8d on 11.1.x
    Issue #3330481 by spokje, quietone, mstrelan, smustgrave: Fix PHPStan L2...

  • longwave committed 5a87e35f on 11.x
    Issue #3330481 by spokje, quietone, mstrelan, smustgrave: Fix PHPStan L2...
longwave’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Nice 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.