Skip to content

Unexpected Php8.4 Change Regarding CSV's #4161

@oleibman

Description

@oleibman

Very recently, the PHP nightly build has changed, and the unit test suite now has over 100 new errors and 7 new risky tests as a result:

Exception: fgetcsv(): Passing a non-empty string to the $escape parameter is deprecated since 8.4 

I am not yet sure if this is truly an exception, or if the test suite has detected a deprecation message and converted it to an exception. I think the latter is probably the case, but I wanted to document this before I started investigating.

I find no documentation that such a change is even supposed to happen with 8.4, let alone any rationale for it. For the record, while I'm not a fan of using anything other than null string for the escape character, Php did not even allow the escape parameter to be a null string until 7.4, which is why Php (and, by extension, PhpSpreadsheet) uses backslash as the default.

The short-term fix might be as simple as using an at-sign to suppress the deprecation message, while working out what a good long-term strategy might be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions