Skip to content

Deprecated warnings using PHP 8+ #1079

@sirjeff

Description

@sirjeff

Version

  • Carbon Fields: 3.3.2
  • WordPress: 5.9.1
  • PHP: 8.1.2

Expected Behavior

No warnings

Actual Behavior

Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetExists($id) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \web\app\plugins\carbon-fields\core\Pimple\Container.php on line 128

Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetGet($id) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \web\app\plugins\carbon-fields\core\Pimple\Container.php on line 93

Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetSet($id, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \web\app\plugins\carbon-fields\core\Pimple\Container.php on line 74

Deprecated: Return type of Carbon_Fields\Pimple\Container::offsetUnset($id) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \web\app\plugins\carbon-fields\core\Pimple\Container.php on line 138

Container definition

Steps to Reproduce the Problem

  1. Upgrade to PHP 8.1.2
  2. Warning appears at the top of every page

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