On PHP 8.5, saving an ECK entity type triggers:

Deprecated function: Method ReflectionMethod::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in Drupal\eck\EntityUpdateService->applyUpdates() (line 111)

Steps to reproduce:

On PHP 8.5, go to /admin/structure/eck → Add entity type, enter a name, and save.

Proposed solution:

Remove the reflection and call $this->entityDefinitionUpdateManager->getChangeList() directly

Issue fork eck-3626504

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ioana apetri created an issue. See original summary.

ioana apetri’s picture

Status: Active » Needs review
ioana apetri’s picture

Version: 2.1.0 » 2.x-dev
ioana apetri’s picture

Assigned: ioana apetri » Unassigned

ioana apetri changed the visibility of the branch 3626504-php-8.5-reflectionmethodsetaccessible to hidden.

dieterholvoet’s picture

Status: Needs review » Reviewed & tested by the community

It seems like EntityDefinitionUpdateManagerInterface::getChangeList() has been public since at least Drupal 8.9 and the minimum supported version is currently 9.4, so this is safe to remove.

dieterholvoet’s picture

Category: Bug report » Task

dieterholvoet’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.