-
Notifications
You must be signed in to change notification settings - Fork 93
Correct / improve SymfonyProfilerController #370
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ services: | |
- { name: 'data_collector', template: "@Translation/SymfonyProfiler/translation.html.twig", id: "translation", priority: 200 } | ||
|
||
Translation\Bundle\Controller\SymfonyProfilerController: | ||
autowire: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about moving this to a
|
||
public: true | ||
tags: ['container.service_subscriber'] | ||
arguments: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,3 +149,8 @@ parameters: | |
message: "#^Call to an undefined method Symfony\\\\Component\\\\Translation\\\\TranslatorBagInterface\\|Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface\\:\\:transChoice\\(\\)\\.$#" | ||
count: 2 | ||
path: Twig/TranslationExtension.php | ||
|
||
- | ||
message: "#^Call to method getValue\\(\\) on an unknown class Symfony\\\\Component\\\\Translation\\\\DataCollector\\\\Data\\.$#" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will become useless once missing use will be added in symfony There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PHPStan will also give an error when a message is not used anymore 👍 Great way of gradually improving code quality compliments to @ondrejmirtes 👏 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you 😊 |
||
count: 1 | ||
path: Controller/SymfonyProfilerController.php |
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.
What about reducing fluent usage? That way you don't need to rely on the message returning itself.
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 kept the original syntax.