Skip to content

fix: resolve PHP 8.4 implicitly nullable parameter deprecations #27

Description

@iruzevic

PHP 8.4 deprecated implicitly nullable parameters (when a typed parameter has a null default but the type doesn't explicitly include null). Several StellarWP packages are affected:

stellarwp/arrays v1.3.2 — 2 occurrences
stellarwp/assets v1.5.1 — 3 occurrences
stellarwp/container-contract v1.0.4 — 2 occurrences
stellarwp/db v1.3.0 — 3 occurrences

  • src/DB/DB.php:409,426string $query = null -> ?string $query = null
  • src/DB/Database/Exceptions/DatabaseQueryException.php:36Throwable $previous = null -> ?Throwable $previous = null
    stellarwp/field-conditions v1.1.1 — 7 occurrences
    stellarwp/models v1.2.3 — 6 occurrences

All fixes follow the same pattern: SomeType $param = null -> ?SomeType $param = null.

No behavior change, only type signature corrections.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions