Skip to content

Psalm does not operate with symfony/polyfill-php84:v1.29.0 #11344

@Ocramius

Description

@Ocramius

See Roave/infection-static-analysis-plugin#502 / https://github.com/Roave/infection-static-analysis-plugin/actions/runs/13572044993/job/37939307832?pr=502 :

<snip>
 - Downgrading symfony/polyfill-php84 (v1.31.0 => v1.29.0)
<snip>
6) Roave\InfectionStaticAnalysisTest\Psalm\RunStaticAnalysisAgainstMutantTest::testWillConsiderMutantOfAlreadyReferencedScannedClassAsValid
Error: Call to undefined function array_any()

/github/workspace/vendor/vimeo/psalm/src/Psalm/Internal/Type/TypeCombiner.php:1267
<snip>

According to ec986c5, the dependency on symfony/polyfill-php84 got relaxed from ^1.31 to * (deathstar: never ever ever ever ever use it, really @_@ )

"symfony/polyfill-php84": "*"

Without getting into the details of a library using such a polyfill (this package is both a library and a "type": "project", so it's a gray area), the dependency should be restricted to only the working range.

The array_ functions in use in Psalm were introduced in symfony/polyfill@d2b61eb (1.30.0).

The correct range to use is therefore: "symfony/polyfill-php84": "^1.31.0"

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