Skip to content

CDATA used in baseline in a lot more cases than before PHP 8.1 #10632

@come-nc

Description

@come-nc

Not sure if this is a big deal, but because of a change in PHP 8.1, psalm is now using CDATA in a lot more cases.

https://github.com/vimeo/psalm/pull/9184/files#diff-616aac909b305fdec9286d185e99df879c5d48db6886a8ac7eee4e6e58a181ce uses htmlspecialchar to decide if it should use CDATA.

See on https://www.php.net/manual/en/function.htmlspecialchars.php:

8.1.0 flags changed from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.

So CDATA is now applied as soon as there is a ' or " in the code.

Took me a long time to understand why my baseline changed so much.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions