Skip to content

Deprecation notices on PHP 8.4 when flushing caches #179

@indigoxela

Description

@indigoxela

On a dev site with error display turned on, when flushing caches, or when doing something that flushes (like saving a Layout), I'm getting a bunch of deprecation notices:

    Deprecated function: EntityPlusController::resetCache(): Implicitly marking parameter $ids as nullable is deprecated, the explicit nullable type must be used instead in require_once() (line 4157 of .../core/includes/bootstrap.inc).
    Deprecated function: EntityPlusController::delete(): Implicitly marking parameter $transaction as nullable is deprecated, the explicit nullable type must be used instead in require_once() (line 4157 of .../core/includes/bootstrap.inc).
    Deprecated function: EntityPlusController::save(): Implicitly marking parameter $transaction as nullable is deprecated, the explicit nullable type must be used instead in require_once() (line 4157 of .../core/includes/bootstrap.inc).
    Deprecated function: EntityPlusControllerExportable::resetCache(): Implicitly marking parameter $ids as nullable is deprecated, the explicit nullable type must be used instead in require_once() (line 4157 of .../core/includes/bootstrap.inc).
    Deprecated function: EntityPlusControllerExportable::delete(): Implicitly marking parameter $transaction as nullable is deprecated, the explicit nullable type must be used instead in require_once() (line 4157 of .../core/includes/bootstrap.inc).
    Deprecated function: EntityPlusControllerExportable::save(): Implicitly marking parameter $transaction as nullable is deprecated, the explicit nullable type must be used instead in require_once() (line 4157 of .../core/includes/bootstrap.inc).

See https://wiki.php.net/rfc/deprecate-implicitly-nullable-types for some background.

Something like

public function resetCache(array $ids = NULL) {

should be converted to

public function resetCache(?array $ids = NULL) {

The tiny difference is the question mark.

That's no problem, since core requires PHP 7.1 in the meantime - actually just because of the same problem. 😉

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