Skip to content
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

"Cannot autowire service" error, when you have a syntax error in an extension. #2586

Closed
bobdenotter opened this issue May 14, 2021 · 0 comments · Fixed by #2623
Closed

"Cannot autowire service" error, when you have a syntax error in an extension. #2586

bobdenotter opened this issue May 14, 2021 · 0 comments · Fixed by #2623
Labels
🐛 tag: bug This is a bug. topic: DX Improving code quality, tests coverage, making codebase more intuitive

Comments

@bobdenotter
Copy link
Member

When you're developing an extension, and have a file in that extension with a Syntax error, you might get this confusing error:

Cannot autowire service "Bolt\Article\Controller\Upload": argument "$articleConfig" of method "__construct()" references class "Bolt\Article\ArticleConfig" but no such service exists.

This is confusing, because Bolt\Article seems unrelated. Working theory is that it breaks adding the Bolt extensions to the container, and that "Article" happens to be the first it then tries to instantiate.

Schermafbeelding 2021-05-14 om 14 13 43

@bobdenotter bobdenotter added topic: DX Improving code quality, tests coverage, making codebase more intuitive 🐛 tag: bug This is a bug. 👻 Not a bug Things that seem quirky at first, but are (probably) not actual bugs and removed 👻 Not a bug Things that seem quirky at first, but are (probably) not actual bugs labels May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 tag: bug This is a bug. topic: DX Improving code quality, tests coverage, making codebase more intuitive
Projects
None yet
1 participant