Skip to content

Conversation

@derrabus
Copy link
Member

Q A
Branch? 6.0
Bug fix? yes
New feature? no
Deprecations? no
Tickets Part of #41552
License MIT
Doc PR N/A

This PR removes a test that triggers a deprecation warning on PHP 8.1. On 5.4 and below, the test made sure that if the caller passed a float value (despite the doc block demanding an integer) an explicit cast to int would be performed.

On the 6.0 branch, that cast has been removed because we've added a parameter type declaration that does not allow floats. Because the type cast is implicit now, PHP 8.1 triggers a deprecation when the case would mean a loss of precision. Since the test tested undocumented behavior anyway, I decided to remove it.

@fabpot
Copy link
Member

fabpot commented Aug 30, 2021

Thank you @derrabus.

@fabpot fabpot merged commit 94856e5 into symfony:6.0 Aug 30, 2021
@derrabus derrabus deleted the bugfix/remove-test-for-deprecated-behavior branch August 30, 2021 07:17
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.

3 participants