Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] Improve class named servics error message#28057
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ro0NL commentedJul 25, 2018
| Q | A |
|---|---|
| Branch? | 3.4 |
| Bug fix? | no |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #28006 |
| License | MIT |
| Doc PR | symfony/symfony-docs#... |
| if (0 ===strpos($id,'\\') &&1 <substr_count($id,'\\')) { | ||
| thrownewRuntimeException(sprintf( | ||
| 'The definition for "%s" has no class attribute, and appears to reference a' | ||
| .'class or interface. Please specify the class attribute explicitly or rename' |
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.
how about "... or remove the leading backslash by renaming the service to ..." to explain the difference. otherwise it's not obvious what the change actually is.
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.
agree, will do :) also i was wondering if we should include thewhy. If so,@nicolas-grekas how would you explain this?
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.
because it doesn't work otherwise :) no reason to give 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.
works for me 👍
nicolas-grekas commentedJul 29, 2018
Thank you@ro0NL. |
This PR was squashed before being merged into the 3.4 branch (closes#28057).Discussion----------[DI] Improve class named servics error message| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | no| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets |#28006| License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->Commits-------61de060 [DI] Improve class named servics error message