symfony / polyfill

PHP polyfills

Home Page:https://symfony.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

normalizer_is_normalized has nullable string parameter

othercorey opened this issue · comments

The normalizer_is_normalized pollyfill string parameter is nullable while php implementation is not.

https://github.com/symfony/polyfill-intl-normalizer/blob/main/bootstrap80.php#L14-L16

https://www.php.net/manual/en/normalizer.isnormalized.php

This is done because in non-strict mode, PHP accepts strings in core functions using a string typehint (triggering a deprecation in PHP 8.1+), which we cannot fully emulate in userland (that's part of the reasons why this behavior is deprecated in PHP 8.1 btw). See #330

Thanks for explaining! This definitely sounds correct for pollyfill and the issue I ran into updating psalm callmap can be handled differently.