Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Compile error in 3.4 by using handler lowercase name in config.yml #26306

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

Closed
LaurentMarquet opened this issue Feb 25, 2018 · 8 comments
Closed

Comments

@LaurentMarquet
Copy link

Q A
Bug report? maybe
Feature request? No
BC Break report? No
RFC? No
Symfony version 3.4

I don’t know if it’s really a bug, but as stated in https://stackoverflow.com/q/48909964/6028808, when a handler for the logout is specified using a lowercase for second part of the name, i.e. Logoutlistener, symfony tries to find an unexisting file named with a 2.

I saw, after having found the solution, that declaring with lowercase is deprecated in 3.4.x and throws an error in 4.

The purpose of this issue is to, maybe, improve the error message, the error was on my side, as I had the typo in my code but was hard to find.
Furthermore, as it is deprecated but still in use in 3.4, I think it should « compile » without error, except the deprecate warning, so I think the error is not attended, that’s why I submit it as a bug, but feel free to close, if you don’t think it is.

@nicolas-grekas
Copy link
Member

Would you mind creating a small project that reproduces the issue?

@LaurentMarquet
Copy link
Author

Yes no problem, but what do you mean by « creating a small project »? That I write here the code to reproduce or something else?

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Feb 27, 2018

Yes, or better, provide a repository on github we could clone and that would allow us to easily reproduce the issue. There is some doc about that here, might help also:
https://symfony.com/doc/current/contributing/code/reproducer.html

@LaurentMarquet
Copy link
Author

Ok I’ll do a github repository, but only tomorrow. Thanks for the doc, I didn’t know about it.

@LaurentMarquet
Copy link
Author

@nicolas-grekas I've created the repository https://github.com/Laurent3170/SymfonyIssue26306, you should be able to reproduce the bug by uncomment in security.yml the handlers value

#handlers: [c975L\UserBundle\Listeners\Logoutlistener] #listener with a lowercase l -> bugs
handlers: [c975L\UserBundle\Listeners\LogoutListener] #Listener with an uppercase L -> works 

If not let me know

@nicolas-grekas
Copy link
Member

Thanks for the reproducer, see fix in #26355

nicolas-grekas added a commit that referenced this issue Mar 2, 2018
…iner (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix missing "id" normalization when dumping the container

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26306
| License       | MIT
| Doc PR        | -

Commits
-------

4a5e43e [DI] Fix missing "id" normalization when dumping the container
@LaurentMarquet
Copy link
Author

Wow! Great!
What should I do with my repository? Can I delete it or should I keep it?

@nicolas-grekas
Copy link
Member

You can delete it :)

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