Problem/Motivation

#2856808: Break out the 'entity_test_update' entity type into its own module and add additional test db dumps moved the EntityTestUpdate entity type class into its own module. In comment #11 of that issue, @amateescu says

realized that I didn't delete the existing EntityTestUpdate class in the latest patches

and while the interdiff is correct, as far as I can tell, the patches do the exact opposite. The ones before this comment were removing the class, the ones after are not, including the one that was committed.

Thus, we have two EntityTestUpdate classes: the old one still in entity_test and the new one in entity_test_update. This is very confusing.

Proposed resolution

Remove the obsolete EntityTestUpdate class in entity_test.

CommentFileSizeAuthor
#5 interdiff.txt911 bytesamateescu
#5 2884894-5.patch3.56 KBamateescu
#2 2884894.patch2.67 KBamateescu

Comments

tstoeckler created an issue. See original summary.

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new2.67 KB

I was planning to remove this leftover in #2860654: Field storage CRUD operations must use the last installed entity type and field storage definitions, but that one turned out to be more than a test-only issue so it makes sense to do it here :)

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Awesome, thank you!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 2884894.patch, failed testing. View results

amateescu’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new3.56 KB
new911 bytes

Right, that hook is still needed so we just have to move it to the right place. Hope it's ok to re-rtbc this one for such a simple change :)

tstoeckler’s picture

Ahh right. Makes sense, thanks!

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review

Hm, but the two classes look strangely different. Eg. the one being removed has revisions but the one that is supposedly replacing it does not have it, etc. I would assume the feature changes (lots more code in the class that would remain) are test additions but the removed test elements, eg. revisions would also be intentional?

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

@Gábor Hojtsy, yep, all the removals were done intentionally in #2856808: Break out the 'entity_test_update' entity type into its own module and add additional test db dumps in order to have a clean entity class that can be modified to be whatever we need it to be (revisionable, translatable) "on the fly" via alter hooks and the State system.

  • Gábor Hojtsy committed fa8994b on 8.3.x
    Issue #2884894 by amateescu, tstoeckler: Remove obsolete + duplicate...

  • Gábor Hojtsy committed 1364bb6 on 8.4.x
    Issue #2884894 by amateescu, tstoeckler: Remove obsolete + duplicate...
gábor hojtsy’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Reviewed & tested by the community » Fixed

Superb, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.