Issue Task Closed

#105155Explicitly provide all `str_getcsv()` arguments

Stefan Bürk 09/29/24, 10:15 updated 10/15/24, 09:05

Description

PHP 8.4.0 RC1 emits E_DEPRECATED when the fourth paramater
@$escape@ is not explicitly set and the default value used
for str_getcsv().

See: https://github.com/php/php-src/blob/ebee8df27edf7ecfbdc7ff87662f2f0d30859120/UPGRADING#L617-L622

Using the default value for $escape parameter of:
 - fputcsv()
 - fgetcsv()
 - str_getcsv()
 is now deprecated. It must be passed explicitly either positionally or via named arguments.
 RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_proprietary_csv_escaping_mechanism

[1] https://github.com/php/php-src/pull/15569
2 https://github.com/php/php-src/blob/ebee8df27ed/UPGRADING#L617-L622

Reviews 7