Breaking: #102715 - Frontend "determineId()" related events changed
See forge#102715
Description
With the continued refactoring of \TYPO3\
,
the following events have been adapted:
\TYPO3\
CMS\ Frontend\ Event\ Before Page Is Resolved Event \TYPO3\
CMS\ Frontend\ Event\ After Page With Root Line Is Resolved Event \TYPO3\
CMS\ Frontend\ Event\ After Page And Language Is Resolved Event
The three events no longer retrieve an instance of Typo
, the
getter methods get
have been removed: The controller is instantiated
after the events have been dispatched, event listeners can no longer work with this
object.
Instead, the events now contain an instance of the new :abbr:DTO (Data Transfer Object)
:
TYPO3CMSFrontendPagePageInformation`, which can be retrieved and
manipulated by event listeners if necessary.
Impact
Calling get
by consumers of above events will raise a fatal
PHP error.
Also note the events may not be dispatched anymore when the middleware
\TYPO3\
creates
early responses.
Affected installations
Those events are in place for a couple of special cases during early frontend rendering. Most instances will not be affected, but some extensions may register event listeners.
Migration
Use method get
instead to retrieve calculated page state at
this point in the frontend rendering chain. Event listeners that manipulate that
object should set it again within the event using set
.
In case middleware Typo
no longer dispatches an event
when it created an early response on its own, an own middleware can be added around
that middleware to retrieve and further manipulate a response if needed.