Review 12.4 Merged

82152[FEATURE] Introduce AsController attribute for auto configuration

Christian Kuhn CR +2 V +2 Easy +25 −5 updated 01/18/24, 10:06

Commit message

This introduces a new PHP attribute `AsController`,
which serves as a drop-in replacement for the former
introduced `Controller` attribute (#99055), which is
now deprecated.

This is done to unify the naming of our attributes.

The old `Controller` attribute is still working using
class alias mapping.

For upwards compatibility, the #[AsController] attribute
will be backported to v12 with a more slim variant of
this patch.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 5

Review log 56

  1. Christian Kuhn uploaded patch set 1 12/08/23, 13:37

  2. core-ci voted on patch set 1 V +1 12/08/23, 13:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50502

  3. Christian Kuhn voted on patch set 1 CR +1 V +1 12/08/23, 13:43

  4. Oli Bartsch voted on patch set 1 CR +2 V +2 12/08/23, 15:36

  5. Oli Bartsch merged patch set 2 12/08/23, 15:36

  6. Benjamin Franzke commented on patch set 2 01/18/24, 10:06

    Note: we can not assume that class alias maps (inteded for deprecated codebases) are always loaded, that means our code needs to be able to run without aliased classes (=must not use deprecated/aliases classes itself). I think we should have left `Controller` in place. This caused a slight regression for some users, see https://forge.typo3.org/issues/102858