Bug #100992
closedAvoid return type deprecation with PHP8.3 in TreeNodeCollection
100%
Description
PHP8.3 changed return type for `\ArrayObject::asort()`
from `bool` to `true` and will trigger a `E_DEPRECATED`
notice since PHP8.3 if extending classes signatures is
not compatible. Regarding the documentation the return
type changed in PHP8.2.0 already.
It's not really clear why this has not been detected
earlier. The documentation [1] states that this should
have changed with PHP 8.2.0. However, the PHP 8.2 based
testing we have in place did not picked that up yet.
Further investigation showed, that the corresponding
change on the PHP source repository is only available
on master and for the `PHP8.3.0alpha1` tag [2]3. With
that change the stub file and the argument information
header file for this and other methods has changes.
The PHP source change targets more return types, but
we did not hit yet others then the one case detected
through unit tests.
This have been discoverd by executing unit tests with
PHP8.3.0alpha1.
Build/Scripts/runTests.sh -p 8.3 -s unit
TYPO3 11.5 already have this attribute, so this issue
occures only with TYPO3 v12 and main. Reason for this
is the fact, that with #98035 that attribute has been
resolved by using compatbile return types at that moment.
[1] https://www.php.net/manual/en/arrayobject.asort.php#refsect1-arrayobject.asort-changelog
[2] https://github.com/php/php-src/commit/85338569debd3f669ef5bc793822b2d9f3f1b1ea
[3] https://github.com/php/php-src/pull/11200
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79251
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79251
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79225
Updated by Stefan Bürk over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 151eff0f81393e0bdbc33cf42273f1b571db0f23.