Skip to content

more precise Superglobals / readonlySuperglobals #8037

@staabm

Description

@staabm

Feature request

in psalm with vimeo/psalm#8473 recently more precise Superglobals were added.
I am thinking about doing the same for phpstan behind a readonlySuperglobals feature flag.

in tandem I would implement a new Rule which errors when code modifies one of the superglobal arrays.
(so we can "prevent" people writing types into a superglobal which don't fit the intended types)

https://phpstan.org/r/e99e22a3-014d-4edf-85ed-969857a34af5

wdyt?

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