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

Cache clear, cannot declare class #25576

Closed
KDederichs opened this issue Dec 21, 2017 · 8 comments
Closed

Cache clear, cannot declare class #25576

KDederichs opened this issue Dec 21, 2017 · 8 comments

Comments

@KDederichs
Copy link
Contributor

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.14

Hey,
I've been seeing a strange thing where the clear cache command cannot declare classes on it's first execution if there is no previous cache.

On the first execution it will always fail with something like
PHP Fatal error: Cannot declare class EnhancedProxy_84f26540d03882f66a8da2bedf47ccf4f27752f4\__CG__\TaskBundle\Controller\SupervisionController, because the name is already in use in /home/kai/public_html/washeroo/var/cache/tes_/jms_diextra/lookup_method_classes/TaskBundle-Controller-SupervisionController.php on line 11 14:33:41 CRITICAL [php] Fatal Compile Error: Cannot declare class EnhancedProxy_84f26540d03882f66a8da2bedf47ccf4f27752f4\__CG__\TaskBundle\Controller\SupervisionController, because the name is already in use ["exception" => Symfony\Component\Debug\Exception\FatalErrorException { …}] []
On any subsequent run of the clean cache command it will be successful though.
I'm not exactly sure if it is a bug in the clear cache command or if the jms_diextra bundle is causing it.

Another thing is that the class it seems to have an issue with doesn't have a method that's annotates the lookup_method from jms_diextra but its parent class does.

@xabbuh
Copy link
Member

xabbuh commented Dec 22, 2017

Can you provide steps that allow to reproduce your issue?

@nicolas-grekas
Copy link
Member

@KDederichs the fact this in on branch 3.3 means this bug is unseen to me.
I'd be happy to try a reproducer you could provide. Thanks.

@Simperfit
Copy link
Contributor

@KDederichs Could you please help us reproducing the bug by providing a little project.

In case you need some help you can read this blog post : https://symfony.com/doc/current/contributing/code/reproducer.html

@KDederichs
Copy link
Contributor Author

Hey sorry for the lack of replies, Christmas and such.
Here is a link with the minimum modification I needed to reproduce the bug:

https://github.com/KDederichs/symfony-standard/tree/issue_25576

It will occur when you do a bin/console cache:clear on a fresh cache or if you previously deleted the cache.

@KDederichs
Copy link
Contributor Author

So it's their bug and not cache:clear related?

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Dec 28, 2017

I managed to reproduce. As far as I tried correctly, the issue is not new to 3.3.14 specifically. On which version of Symfony did this work last? I would suggest to open an issue on JMS Di-extra instead, as I'm not sure the issue is on symfony/symfony's side.

@mvrhov
Copy link

mvrhov commented Dec 28, 2017

Oh, he's using JMS di-extra. IMO he should get rid of it.

@nicolas-grekas
Copy link
Member

Closing as this is an issue with JMS di-extra.

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

6 participants