Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

tenderfoot picture tenderfoot · Jan 14, 2019 · Viewed 129.3k times · Source

I have php7.3 and symfony2.8 When I try to create the classes with the console I get this error:

[Symfony\Component\Debug\Exception\ContextErrorException]Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Answer

Miftah Mizwar picture Miftah Mizwar · Jan 15, 2019

I've got same problem and got this error too, but in my case this error shows when i'm trying to run composer install or composer update.

and i solve this issue by running composer self-update. it works on my project.