Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
EntityTestTest
and FieldResolverTest
are currently failing because of #2976035: Entity type CRUD operations must use the last installed entity type and field storage definitions .
Proposed resolution
Fix them.
Remaining tasks
Review.
Comment | File | Size | Author |
---|---|---|---|
#25 | 3038668-25.patch | 2.04 KB | jibran |
#17 | 3038668-17.patch | 2.32 KB | jibran |
Comments
Comment #2
andypostLooks mostly that enough
Comment #4
andypostsomething weird in tests
Comment #6
andypostComment #7
andypostLooks core's testing module has collision now after its removal extra deprecations shown
Comment #9
andypostremoved debug
Comment #10
andypostrevert trait from 8.7
Comment #11
andypostI think that's compatible with >=8.5 at least
Comment #12
andypostComment #13
andypostI bet it because order of modules so
hook_entity_type_alter()
of test module fire lastComment #14
jibranLet's try this.
Comment #15
jibranIgnore last patch. Interdiff is from #10.
Comment #17
jibranComment #18
BerdirWhy uninstall + install and not just update? Is that not working?
Comment #19
jibranI had the same question. I think it was not fieldable before and after this change, it is but let me try that. Install is the copy of
contact_storage_test_install
from core.Comment #20
jibranComment #22
jibranAs I suspected in private chat with @andypost
it is because of
in
\Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::onEntityTypeUpdate()
Comment #23
BerdirThat's pretty weird though, because in this case, we change from null storage to having a storage, but I guess that's not possible to detect unless it that storage class is hardcoded there..
Comment #24
andypostSo it still can't run with core's testing module enabled(
Comment #25
jibranLet's try this.
Comment #27
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedYup, that's the problem :)
However, why do we need this test to install the
contact_storage_test
module from core, when #17 passed all tests?Comment #28
BerdirI have no idea, I think that was an accidental copy & paste, that line has been part of the very first commit of that test, which one students worked on, and I'm sure it was started based on a copy of the core test.
Let's just commit #17, this is fine.
Comment #30
larowlanthanks folks
Comment #31
andypostFollow-up #3039906: Properly uninstall entity types
Comment #32
phenaproximaIn my cursory manual testing (as part of Lightning development, since this module is used by Lightning Core), I discovered that this module cannot be installed on Drupal 8.7 without this fix. Any chance of a new release being rolled?
Comment #33
mpotter CreditAttribution: mpotter at Phase2 commentedA release is really needed. Using this as part of lightning and tried to add the patch in #17 or #25 to my composer.json and just get
when running composer install (error is from composer-patches). Other patches (like in drupal/core) work so not sure what composer's problem is with this. But being able to just update the module version instead of patching would be much nicer.
Comment #34
BerdirThat error typically happens if the same patch is included twice, it is possible that lightning itself already includes it?