Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Sep 2013 at 13:40 UTC
Updated:
29 Jul 2014 at 22:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gábor hojtsyHere is a quick untested proof of concept :) After talking to Berdir about this in IRC, he suggested we generalize the validation, so, it would look something like this I think.
Comment #2
berdirentity_load_unchanged()
Comment #3
gábor hojtsySure thing.
Comment #4
gábor hojtsyNon-empty version :D
Comment #6
twistor commentedComment #8
twistor commentedMove the validator from the entity module to Drupal\Core\Validation\Plugin\Validation\Constraint to be with the other validators.
Added EntityChangedInterface use statement.
Comment #9
gábor hojtsyIs there any test coverage for this somewhere?
Comment #10
twistor commentedNodeValidationTest checks for this explicitly. That was one of the failures in #5.
Comment #11
gábor hojtsyThat sounds great actually. So we have a test proving this works even on a general level now. IMHO we don't need a test to ensure all implementations, we don't test fieldability on all entities or other similar common APIs either. Let's get this in then :)
Comment #12
webchickLooks good.
Committed and pushed to 8.x. Thanks!
Comment #13
webchickHm. Actually.
Comment #14
gábor hojtsyI think I wrote https://drupal.org/node/2085445 which is IMHO as complete as such a change notice can get. So closing.