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

Implicit param converter seems to not work anymore 4.2.2 #29925

Closed
fabienlem opened this issue Jan 18, 2019 · 5 comments
Closed

Implicit param converter seems to not work anymore 4.2.2 #29925

fabienlem opened this issue Jan 18, 2019 · 5 comments

Comments

@fabienlem
Copy link

Symfony version(s) affected: 4.2.2

Hello!

Description
I'm in pain to make the well known implicit ParamConverter trick work with Symfony 4.2.2:

/**
 * @Route("/{id}", name="admin_post_show")
 */
public function show(Post $post)

It tells that the Post argument cannot be autowired.

How to reproduce
Just follow the exemple given in the best practices guide.

Possible Solution
No idea, sorry!

Additional context
Could relate to #29819 (not sure as the ticket is closed).

Thank you for your feedback!

@xabbuh
Copy link
Member

xabbuh commented Jan 18, 2019

Can you confirm that updating the DependencyInjection component to 4.2.3@dev solves the issue?

@fabienlem
Copy link
Author

OK, I will try as soon as possible and keep you updated. Thank you!

@soullivaneuh
Copy link
Contributor

@xabbuh I have a similar issue making entity creation impossible with API platform custom controllers.

Using the 4.2 dev branch seems to fix it indeed.

@xabbuh
Copy link
Member

xabbuh commented Jan 22, 2019

Let's close here then as the issue seems to be fixed by #29853.

@xabbuh xabbuh closed this as completed Jan 22, 2019
@fabienlem
Copy link
Author

Hello @xabbuh,

I found the solution by installing a vanilla Symfony 4.2 and comparing composer.json file with the one of my project. I saw that sensio/framework-extra-bundle was missing.

I don't remember how the project was initialised, so I don't know why this vendor was missing.

Thank you again for your help.

Regards!

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

No branches or pull requests

4 participants