Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate @method docblock tag in CI #171

Closed
4 tasks done
emteknetnz opened this issue Dec 12, 2023 · 2 comments
Closed
4 tasks done

Validate @method docblock tag in CI #171

emteknetnz opened this issue Dec 12, 2023 · 2 comments

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Dec 12, 2023

Split off from #163

Acceptance criteria

  • Missing @method annotations are picked up by CI (e.g. using phpstan or psalm)
  • Extra @method annotations that don't relate to anything on the class are picked up by CI (e.g. using phpstan or psalm)
  • Update PHP Codding standards to mentioned @method annotation.
  • All supported modules run this new check in CI for their CMS 5 compatible versions (not CMS 4)

Notes

PRs

Note: After merging the below, reassign to Guy so they can add this to packagist and roll it out to all the CMS 5 supported modules

Module Standardiser PRs

Note: For any PR that had outstanding PHPLint issues, I've manually fixed whatever needed to be fixed as a separate commit.
Note that these had to be run against the 5 (or equivalent) branches because the @method annotation rule doesn't work correctly against the codebase if the generic types aren't available - and those were merged into the 5 (or equivalent) branches.

@GuySartorelli
Copy link
Member

GuySartorelli commented Jan 10, 2024

In order for the types to correctly resolve with PHPStan analysis of the existing @method annotations, we need generics in place. This is necessary to validate that the existing annotations are correct.

@GuySartorelli
Copy link
Member

@emteknetnz seems like you're reviewing this so assigning to you

@emteknetnz emteknetnz removed their assignment Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants