Skip to content

Conversation

kocsismate
Copy link
Member

No description provided.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double checked and LGTM, just seems like you misses two Intl functions/methods

function intlcal_roll(IntlCalendar $calendar, int $field, $value): bool {}

function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}
function intlcal_clear(IntlCalendar $calendar, ?int $field = null): true {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, the following functions also return only true:

  • intlcal_set()
  • intlcal_set_minimal_days_in_first_week()

Copy link
Member Author

@kocsismate kocsismate May 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I amended my first commit to include these two functions/methods as well! Nothing else changed

@kocsismate kocsismate force-pushed the narrow-bool-returns branch from a19ea46 to ca948f1 Compare May 7, 2023 16:01
@kocsismate kocsismate merged commit 281669a into php:master May 7, 2023
@kocsismate kocsismate deleted the narrow-bool-returns branch May 7, 2023 17:34
reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this pull request Jun 12, 2023
PHP8.3 changed return type for `\ArrayObject::asort()`
from `bool` to `true` and will trigger a `E_DEPRECATED`
notice since PHP8.3 for extending classes with
incompatible signature. 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 pick that up yet.

Further investigation show, 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 changed.

The PHP source change targets more return types, but
we did not hit yet others then the one case detected
through unit tests.

The return type can be only be changed when PHP8.3+ is the
minimum php version. Therefore, we add the known attribute
`#[\ReturnTypeWillChange]` to the method along with a
a comment to change this when requirements are fullfilled.

TYPO3 11.5 already have this attribute, so this issue
occurs only with TYPO3 v12 and main. Reason for this
is the fact, that with #98035 that attribute has been
resolved by using compatible return types at that moment.

This can be checked by executing unit tests with PHP8.3
with and without this change.

Use-full command:

> Build/Scripts/runTests.sh -p 8.3 -s unit

[1] https://www.php.net/manual/en/arrayobject.asort.php#refsect1-arrayobject.asort-changelog
[2] php/php-src@8533856
[3] php/php-src#11200

Resolves: #100992
Related: #98035
Releases: main, 12.4
Change-Id: Ic3b8cacdcf387a2d23eaeaf66222de6078d54f2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79251
Reviewed-by: Elias Häußler <e.haeussler@familie-redlich.de>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Elias Häußler <e.haeussler@familie-redlich.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: core-ci <typo3@b13.com>
TYPO3IncTeam pushed a commit to TYPO3-CMS/backend that referenced this pull request Jun 12, 2023
PHP8.3 changed return type for `\ArrayObject::asort()`
from `bool` to `true` and will trigger a `E_DEPRECATED`
notice since PHP8.3 for extending classes with
incompatible signature. 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 pick that up yet.

Further investigation show, 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 changed.

The PHP source change targets more return types, but
we did not hit yet others then the one case detected
through unit tests.

The return type can be only be changed when PHP8.3+ is the
minimum php version. Therefore, we add the known attribute
`#[\ReturnTypeWillChange]` to the method along with a
a comment to change this when requirements are fullfilled.

TYPO3 11.5 already have this attribute, so this issue
occurs only with TYPO3 v12 and main. Reason for this
is the fact, that with #98035 that attribute has been
resolved by using compatible return types at that moment.

This can be checked by executing unit tests with PHP8.3
with and without this change.

Use-full command:

> Build/Scripts/runTests.sh -p 8.3 -s unit

[1] https://www.php.net/manual/en/arrayobject.asort.php#refsect1-arrayobject.asort-changelog
[2] php/php-src@8533856
[3] php/php-src#11200

Resolves: #100992
Related: #98035
Releases: main, 12.4
Change-Id: Ic3b8cacdcf387a2d23eaeaf66222de6078d54f2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79251
Reviewed-by: Elias Häußler <e.haeussler@familie-redlich.de>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Elias Häußler <e.haeussler@familie-redlich.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: core-ci <typo3@b13.com>
reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this pull request Jun 12, 2023
PHP8.3 changed return type for `\ArrayObject::asort()`
from `bool` to `true` and will trigger a `E_DEPRECATED`
notice since PHP8.3 for extending classes with
incompatible signature. 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 pick that up yet.

Further investigation show, 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 changed.

The PHP source change targets more return types, but
we did not hit yet others then the one case detected
through unit tests.

The return type can be only be changed when PHP8.3+ is the
minimum php version. Therefore, we add the known attribute
`#[\ReturnTypeWillChange]` to the method along with a
a comment to change this when requirements are fullfilled.

TYPO3 11.5 already have this attribute, so this issue
occurs only with TYPO3 v12 and main. Reason for this
is the fact, that with #98035 that attribute has been
resolved by using compatible return types at that moment.

This can be checked by executing unit tests with PHP8.3
with and without this change.

Use-full command:

> Build/Scripts/runTests.sh -p 8.3 -s unit

[1] https://www.php.net/manual/en/arrayobject.asort.php#refsect1-arrayobject.asort-changelog
[2] php/php-src@8533856
[3] php/php-src#11200

Resolves: #100992
Related: #98035
Releases: main, 12.4
Change-Id: Ic3b8cacdcf387a2d23eaeaf66222de6078d54f2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79225
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
TYPO3IncTeam pushed a commit to TYPO3-CMS/backend that referenced this pull request Jun 12, 2023
PHP8.3 changed return type for `\ArrayObject::asort()`
from `bool` to `true` and will trigger a `E_DEPRECATED`
notice since PHP8.3 for extending classes with
incompatible signature. 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 pick that up yet.

Further investigation show, 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 changed.

The PHP source change targets more return types, but
we did not hit yet others then the one case detected
through unit tests.

The return type can be only be changed when PHP8.3+ is the
minimum php version. Therefore, we add the known attribute
`#[\ReturnTypeWillChange]` to the method along with a
a comment to change this when requirements are fullfilled.

TYPO3 11.5 already have this attribute, so this issue
occurs only with TYPO3 v12 and main. Reason for this
is the fact, that with #98035 that attribute has been
resolved by using compatible return types at that moment.

This can be checked by executing unit tests with PHP8.3
with and without this change.

Use-full command:

> Build/Scripts/runTests.sh -p 8.3 -s unit

[1] https://www.php.net/manual/en/arrayobject.asort.php#refsect1-arrayobject.asort-changelog
[2] php/php-src@8533856
[3] php/php-src#11200

Resolves: #100992
Related: #98035
Releases: main, 12.4
Change-Id: Ic3b8cacdcf387a2d23eaeaf66222de6078d54f2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79225
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants