Skip to content

Pass explicit $escape argument to fgetcsv/fputcsv for PHP 8.4 compatibility#40

Open
jbrada wants to merge 1 commit into
experius:masterfrom
jbrada:bugfix/php84-fgetcsv-fputcsv-escape-deprecation
Open

Pass explicit $escape argument to fgetcsv/fputcsv for PHP 8.4 compatibility#40
jbrada wants to merge 1 commit into
experius:masterfrom
jbrada:bugfix/php84-fgetcsv-fputcsv-escape-deprecation

Conversation

@jbrada
Copy link
Copy Markdown

@jbrada jbrada commented Apr 22, 2026

Summary

On PHP 8.4, fgetcsv()/fputcsv() deprecate the implicit default $escape.

Pass '\\' (the current default) explicitly in both the writer and loader. No behavior change ... just silences the deprecation.

Reproduction

bin/magento experius_missingtranslations:collect --magento --locale cs_CZ

Deprecated Functionality: fputcsv(): the $escape parameter must be provided
as its default value will change in .../Dictionary/Writer/Csv.php on line 52

Btw, great module - it just saved me a lot of headache :-). Cheers 👍

…bility

As of PHP 8.4.0, relying on the default value of the $escape parameter
in fgetcsv()/fputcsv() is deprecated. Pass '\\' explicitly to silence
the deprecation notice and keep existing behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant