Review 11.5 Merged

75137[BUGFIX] Enhance annotation integrity test script

Stefan Bürk CR +2 V +2 Easy +18 −9 updated 07/13/22, 08:13

Commit message

Docblock annotations with more then one space between a wildcard
character `*` and the annotation start character `@` was not found.
Additionally, annotation identifiers did not regonize hyphens as
valid identifier character, thus cutting of e.g. PHPStan annotations.

This patch now properly finds annotions with multi-space separations
and annotation identifiers containing hyphens. Additionally, two
phpstan specific annotations are allowed.

> https://phpstan.org/writing-php-code/phpdoc-types#local-type-aliases

Summarized contained tasks:

> find multi-space separated annotations
  e.g. `*  @<AnnotationIdentifier>`
> properly extract full annotation identifier containing hyphens
  e.g. `* @annoation-identifier-with-hyphen`
> add `@phpstan-type` and `@phpstan-import-type` as allowed
  annotation, but only on class level, and not on class-property
  or class-method level

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2

Issues 3

Files 2

Review log 811

  1. Stefan Bürk commented on patch set 1 07/13/22, 06:59

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 07/13/22, 07:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29034

  3. Oliver Klee commented on patch set 1 07/13/22, 07:20

    phpstan -> PHPStan typo: annoations -> annotations
  4. Stefan Bürk uploaded patch set 2 07/13/22, 07:27

  5. core-ci voted on patch set 2 V +1 07/13/22, 07:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29036

  6. Stefan Bürk voted on patch set 2 V +2 CR +2 07/13/22, 08:04

  7. Stefan Bürk voted on patch set 2 V 0 CR 0 07/13/22, 08:05

  8. Stefan Bürk updated the commit message in patch set 3 07/13/22, 08:05

  9. Stefan Bürk commented on patch set 3 V +2 CR +2 07/13/22, 08:05

    Reply

    Done
  10. Stefan Bürk merged patch set 4 07/13/22, 08:05

  11. core-ci voted on patch set 3 V +1 07/13/22, 08:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29039