Closed (fixed)
Project:
Meta Entity
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2021 at 12:44 UTC
Updated:
4 Mar 2021 at 08:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
claudiu.cristeaPatch
Comment #4
claudiu.cristeaFixing tests.
Comment #5
claudiu.cristeaMore tests fixes.
Comment #6
pfrenssenSmall typo "A list _of_ meta entity type IDs".
What motivated you to distrust the value returned by
$entity->bundle()and provide a fallback to the entity type ID? Did you see a case where a certain entity type returnsNULLfor the bundle?The method as described in
EntityInterface::bundle()already specifies that the entity type ID is returned as a fallback, and returningNULLis not allowed according to the interface:Of course in Drupal core this is not enforced yet (it lacks strict return types), but it seems to me if you found a case where this returns
NULLthen this is probably a bug in the entity type, and not strictly needed for us to provide a fallback.Small typo: double space after "Settings for ".
Comment #7
ankithashettyUpdated the patch in #5 addressing #6.1 and #6.3. Retaining status as "Needs work" to address #6.2... Thanks!
Comment #8
claudiu.cristea@pfrenssen #6.2, very good observation. Fixed.
@ankithashetty, thank you for fixing.
Comment #10
claudiu.cristeaFixing test failure and coding standards. Adding credits.
Comment #11
claudiu.cristeaReroll.
Comment #12
claudiu.cristeaCS fix.
Comment #13
claudiu.cristeaThe interdiff was correct in #12 but not the patch.
Comment #14
pfrenssenThanks for the fast fixes @ankithashetty and @claudiu.cristea!
It's looking good now, thanks a lot!
Comment #16
pfrenssen