Learn how to execute symfony 3 commands from the command prompt of windows.

As you may noticed, with the new symfony 3, the project structure has changed. The new folders are var (cache,logs and sessions are now located in this folder) and bin (the console file is now located in this folder). Therefore we need to change the path where the commands are targetting.

In netbeans we used to execute commands using the contextual menu of the symfony 2 projects :

Netbeans symfony commands

But with symfony 3, netbeans will not work (at less till a new update) for symfony 3 projects.

And without a graphic interface we used to execute in the command prompt :

php app/console generate:bundle

Executing commands

You need to be located in the project folder, therefore use cd command to locate yourself in the project folder :

cd c:/path-to-project/symfonyProjectFolder

Then execute a command as you always do, but simply change the console path using :

php bin/console generate:bundle

Remember to execute cmd.exe in administrator mode to prevent any misconfiguration in the process.

Windows symfony 3 commands

That's it ! Have fun !


Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Sponsors