Closed carnage closed 3 years ago
Marked for 2.8.0
.
Effectively, this is an improvement that mitigates the problems found in #20, and if call-site consumers of the code use declare(strict_types=0)
(equivalent to not declaring strict types), this fixes some issues for them.
In addition to that, I decided to not mark this as BC Break
, since:
string
inputs anyway (leading to crashes)string
inputs since 2.0.0-beta5
, its first release, a decade ago ( https://github.com/zendframework/zendframework/blob/18c8e223f070deb07c17543ed938b54542aa0ed8/library/Zend/Escaper/Escaper.php#L196-L199 ) - consumers were always supposed to pass in a string
I'll merge this manually after having applied some cleanup operations (CS/QA checks, mostly)
Thanks @carnage!
Thanks @Ocramius & @carnage: I can confirm that version 2.8.0 fixes the problem in Magento. Thanks for the quick action! 🙂
Signed-off-by: Carnage t.carnage@gmail.com
Description
The introduction of strict types in the file heading is propagated to calling code as the required types are missing from the method signatures. This PR adds the types and resolves the BC break.
While adding types to the methods could be considered a BC break in itself, I cannot conceive of any sensible use case that this change would impact.