Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
typed data system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Nov 2013 at 10:01 UTC
Updated:
29 Jul 2014 at 23:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mariancalinro commentedComment #2
stefan.r commentedComment #4
fagoGood work!
This shows why we should have these tests :-) This would need a re-roll to move the test to the Entity component tests once #2137301: Move entity constraints under the Entity component is in.
Comment #5
webchick#2137301: Move entity constraints under the Entity component was just committed so this will need a re-roll.
Comment #6
fagore-rolled and updated the test to work with HEAD.
Comment #7
fago6: d8_bundleconstraint_test.patch queued for re-testing.
Comment #8
yched commentedMinor stuff, otherwise RTBC.
Language seems weird ?
var is misnamed ?
Comment #9
berdir6: d8_bundleconstraint_test.patch queued for re-testing.
Comment #11
fagoRe-rolled to account for the typed data manager rename and addressed #8.
Comment #12
yched commentedSame remark as #2142991-10: Test for ComplexDataConstraintValidator about $this->typedData, but otherwise RTBC.
Comment #13
webchickCommitted and pushed to 8.x. Thanks!
Comment #14
catchThis broke HEAD, not sure if it is consistent or random:
Rolled back for now.
Comment #15
damiankloip commentedHere is patch rerolled with fix. We had the fix but couldn't beat catch to the revert :)
Comment #16
fagoLooks like things changed a bit since when the patch got re-rolled :-/
Comment #17
berdirLooks like the following change broke it:
Which is quite interesting, because this does apparently not cause any php warnings or notices at all:
It just says bool(false).
Anyway, the fix is correct and should have been there from the beginning.
Comment #18
yched commentedGot bitten by this too in #2144919-95: Allow widgets and formatters for base fields to be configured in Field UI
It's a case where $target_type_info is NULL, because the test doesn't enable the module that defines the entity type.
Before #2005716: Promote EntityType to a domain object, the old code did :
is_subclass_of($target_type_info['class'], 'ContentEntityInterface')
i.e is_subclass_of(NULL['class'], 'ContentEntityInterface')
i.e is_subclass_of(NULL, 'ContentEntityInterface')
i.e FALSE
The new code does :
$target_type_info->isSubclassOf('ContentEntityInterface')
i.e NULL->isSubclassOf('ContentEntityInterface')
i.e fatal error
Comment #19
webchickOk, let's try this again. :)
Committed and pushed to 8.x. Thanks!