#103926Avoid implicitly nullable parameter on DatabaseRecordException
Description
With PHP 8.4 marking method parameter implicitly nullable
is depreacted and will emit a `E_DEPRECATED` warning. One
recommended way to resolve this, is making it explicitly
nullable using the `?` nullable operator. [1]
In cases, where are implicitly nullable parameter exists
before not-nullable parameters in a method or constructor,
making it explicitly nullable will emit a
Optional parameter <paramname> declared before required
parameter <paramname> is implicitly treated as a required
parameter
since PHP 8.0 [2].
This change modifies the class constructor signature of
`\TYPO3\CMS\Backend\Form\Exception\DatabaseRecordException`
and moves the required parameter before the optional and
nullable previous execption parameter and adjust the
core place throwing this exception to follow that pattern.
[1] https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated
2 https://php.watch/versions/8.0/deprecate-required-param-after-optional
Reviews 3
History 39
-
Stefan Bürk changed tracker
BugTask 05/26/24, 20:24 -
Gerrit Code Review pushed patch set 1 for main to change 84415 status
NewUnder Review 05/26/24, 20:24 -
Gerrit Code Review pushed patch set 2 for main to change 84415 05/26/24, 20:28
-
Gerrit Code Review pushed patch set 3 for main to change 84415 05/27/24, 10:36
-
Gerrit Code Review pushed patch set 4 for main to change 84415 05/27/24, 12:06
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 84360 05/27/24, 12:11
-
Gerrit Code Review pushed patch set 1 for 11.5 to change 84361 05/27/24, 12:12
-
Stefan Bürk commented and changed status
Under ReviewResolved done0 %100 % 05/27/24, 12:25 -
Benni Mack changed status
ResolvedClosed 07/09/24, 15:35
Applied in changeset commit:577864d14a26ea9914db7c8efba48170b43e594d.