Skip to content

we should use type declarations in PHP functions #3083

@cgolubi1

Description

@cgolubi1

With more recent PHP versions, we have access to type declarations - https://www.php.net/manual/en/language.types.declarations.php - enforced type settings on function parameters which will cause failures if they mismatch.

This is great, because situations in which we're wrong about the type of the parameter we're passing to a function, are a source of bugs for us.

Once we upgrade the PHP version to 8.3 in #3075, we should define type declarations for all our functions, and figure out how to make CircleCI tests enforce that future functions will also define them.

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