-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 AdminExtractor #6040
Add AdminExtractor #6040
Conversation
6249612
to
15e199a
Compare
Please have a look at the FlintCI failures |
I removed the logger since I think it's not useful here. The FlintCI failures are #6039. |
25f7f51
to
e6839f0
Compare
6d60490
to
d2788a3
Compare
} | ||
} | ||
|
||
public function setPrefix($prefix): void |
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.
Can we add string typehint here?
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 is from ExtractorInterface.
$this->prefix = $prefix; | ||
} | ||
|
||
public function getLabel($label, $context = '', $type = ''): 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.
Typehints?
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 is from LabelTranslatorStrategyInterface.
d2788a3
to
664ff13
Compare
664ff13
to
442e5ef
Compare
19b7485
to
f68066d
Compare
f68066d
to
728bec7
Compare
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.
Regardless the small comments I've left, I think it is RTM.
728bec7
to
4b3ce7f
Compare
Thank you @franmomu |
Subject
The current
AdminExtractor
is usingJMSTranslationBundle
. I added a newAdminExtractor
that usestranslation.extractor
Symfony tag, so there is no need of the JMS bundle dependency.The class is a copy of the other one with some changes. The old one implements
TranslatorInterface
so it's injected to the admin instances and whenAdminInterface::trans
is called, it registers it into the catalogue. SinceAdminInterface::trans
is deprecated, the new extractor does not look into these calls anymore, just to the ones made by theLabelTranslatorStrategy
.I am targeting this branch, because this is BC.
Changelog