-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add routable prefix to methods of RoutableInterface #155
Add routable prefix to methods of RoutableInterface #155
Conversation
@@ -18,12 +18,12 @@ | |||
*/ | |||
interface RoutableInterface | |||
{ | |||
public function getResourceKey(): string; | |||
public function getRoutableResourceKey(): string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getResourceKey
method shoukd be on the same entity as the getTemplateType
and getWorkflowName
IMO.
Therefore I am thinking about moving the getResourceKey
method from the ContentRichEntityInterface
to the DimensionContentInterface
in another pull request. What do you think?
@@ -14,7 +14,6 @@ | |||
"locale": "en", | |||
"published": null, | |||
"publishedState": false, | |||
"resourceKey": "@string@", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added with #154 which was merged just an hour ago. So i think it should not be a big BC break 🙂
@@ -100,9 +100,4 @@ public static function getTemplateType(): string | |||
{ | |||
return Example::TEMPLATE_TYPE; | |||
} | |||
|
|||
public static function getContentClass(): string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we forgot about this in #154
* | ||
* @see MockWrapper to learn why this trait is needed. | ||
*/ | ||
trait ContentRichEntityMockWrapperTrait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wozld not be necessary if we move the getResourceKey
method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm definitly agains this change. We should not prefix this methods. Else he will need to implement getTemplateLocale
, getRouteLocale
, ... we should avoid the prefix. Then again the same for getTemplateResourceKey
, getRouteableResourceKey
.
Definitly a no go from my side. Sorry 👎
Not sure about that - if two behaviour interfaces (eg But i think that is a discussion for another day 🙂 I adjusted this PR to only rename the |
The issue we have with serialization is what we have documented #113 that we should define what should be serialized and not what should not be serialized. Not 100% happy with |
Do you have a better idea than |
@nnatter currently not 🙈 |
I think we should prefix the methods (and therefore the keys of the normalized array) for all behaviours included in the bundle. The
RoutableInterface
is the only interface that did not use a prefix for its methods.I see the following advantages:
getIgnoredAttributes
method of theNormalizer
classs are specific. At the moment, a project cannot normaliza acontentId
because theRoutableNormalizer
prevents it