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

Using Autowiring with your routing #1

Open
Bjoern3003 opened this issue Sep 20, 2020 · 1 comment
Open

Using Autowiring with your routing #1

Bjoern3003 opened this issue Sep 20, 2020 · 1 comment

Comments

@Bjoern3003
Copy link

Hi,

you example is very well and working fine.

Can you maybe extend your example with a new method, using autowiring (for example pass the request class).

If I extend the DefaultController class with AbstractController, I get a Fatal Error
Uncaught Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@required" in method Symfony\Bundle\FrameworkBundle\Controller\AbstractController::setContainer() was never imported

Maybe you have an Idea or an Example for me. Thank you.

@ahundiak
Copy link
Member

Autowire is challenging without a container. Humor. The example shows how to use annotation based routing outside of the Symfony framework. If you want things like autowire then use the actual framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants