Review main Merged

87979[TASK] Provide public method to create anonymous user session

Torben Hansen CR +2 V +2 Easy +15 −3 updated 02/05/25, 07:29

Commit message

With #100307 new PSR-14 events have been introduced to
allow implementation of custom logic for classes extending
`\TYPO3\CMS\Core\Authentication\AbstractUserAuthentication`.

The PSR-14 event `BeforeUserLogoutEvent` allows to control,
if the logout process should be handled by
`AbstractUserAuthentication`. If an extension author decides
to implement a custom logout process by using the PSR-14
event `AfterUserLoggedOutEvent`, it is currently not possible
to use a public API method to create an anonymous user
session. Instead, extension authors can use the internal
method `initializeUserSessionManager` to.

In order to provide a public API method to create an
anonymous user session, this change adds the method
`createAnonymousSession` to `AbstractUserAuthentication`.
The method is now additionally used internally in the class
to create an anonymous user session where required.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1013

  1. Torben Hansen uploaded patch set 1 02/02/25, 14:04

  2. Torben Hansen updated the commit message in patch set 2 02/02/25, 14:05

  3. core-ci voted on patch set 1 V +1 02/02/25, 14:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73334

  4. core-ci voted on patch set 2 V +1 02/02/25, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73335

  5. Jörg Bösche voted on patch set 2 CR +1 02/03/25, 10:47

  6. Alexander Frey voted on patch set 2 CR +1 02/03/25, 13:13

  7. Benni Mack commented on patch set 3 CR +1 V +1 02/03/25, 20:46

    Published edit on patch set 2.
  8. core-ci voted on patch set 3 V +1 02/03/25, 20:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73446

  9. Christian Kuhn commented on patch set 3 CR +1 V +1 02/04/25, 10:45

    i don't like it much, but i aligned with benni on this and it seems to be the most easy and pragmatic solution for now.
  10. Garvin Hicking voted on patch set 3 CR +1 V +1 02/04/25, 21:21

  11. Benni Mack commented on patch set 3 CR -2 02/04/25, 22:57

    will take care...
  12. Benni Mack voted on patch set 3 CR +2 V +2 02/05/25, 07:29

  13. Benni Mack merged patch set 4 02/05/25, 07:29