Skip to content

Fix PHP 8.4 implicit nullable parameter deprecation #43

Description

@ludiaz

When running on PHP 8.4, the following deprecation notice is triggered during cache warmup:

Acsiomatic\DeviceDetectorBundle\CacheWarmer\ProxyCacheWarmer::warmUp(): Implicitly marking parameter $buildDir as nullable is deprecated, the explicit nullable type must be used instead

This happens because PHP 8.4 no longer supports implicitly nullable parameter types.

Location: src/CacheWarmer/ProxyCacheWarmer.php

Suggested Fix: Add the explicit nullable type ? to the parameter.

Diff:

  • public function warmUp(string $cacheDir, string $buildDir = null)
  • public function warmUp(string $cacheDir, ?string $buildDir = null)

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