Problem/Motivation
There are two reason this happens:
One, ff you run Drupal\KernelTests\Core\KeyValueStore\KeyValueContentEntityStorageTest you get deprecation errors in \Drupal\Core\Entity\EntityStorageBase::mapFromStorageRecords on PHP 8.5. because key value storage is broken.
Also, if a config entity is installed without an ID this will occur.
Steps to reproduce
Run \Drupal\KernelTests\Core\KeyValueStore\KeyValueContentEntityStorageTest
Run \Drupal\Tests\system\Functional\Module\UninstallTest::testFailedInstallStatus
Proposed resolution
The deprecations are triggered by the key value storage because its loadMultiple() is fundamentally broken. We have to fix this in 11.x but we could consider deprecating and removing in 12.x - see #2618436: Complete the KV content entity storage implementation
Installing the module_installer_config_test module is supposed to fail because of a missing ID. However before it gets to \Drupal\Core\Config\Entity\ConfigEntityStorage::save() where it throws an exception it get to \Drupal\Core\Entity\EntityStorageBase::mapFromStorageRecords() where it tries to using NULL as an ID. We should throw an exception in mapFromStorageRecords() if $entity->id() is NULL - this is always unexpected.
Remaining tasks
User interface changes
None
Introduced terminology
N/a
API changes
None
Data model changes
None
Release notes snippet
N/a
Issue fork drupal-3557333
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
Comment #2
alexpottComment #4
alexpottComment #5
alexpottComment #6
alexpottComment #7
andypostjust a nitpick to clean-up
Comment #8
andypostready to go
Comment #9
catchCommitted/pushed to 11.x and cherry-picked to 11.3.x, thanks!