Initializing a Symfony sandbox with a given version

Published on 2021-09-17 • Modified on 2021-09-17

This snippet shows how to initialize a Symfony sandbox with a given version, thanks to the Symfony binary. You have to use the --version option to pass the minor Symfony version to operate. If you want a specific bug-fix version, open your composer.json file and in the symfony section, change "require": "5.1.*" to "require": "5.1.2", for example. Then run composer update and you are done! 🙂


symfony new sf4-4-sandbox --version=4.4
symfony new sf4-3-sandbox --version=4.3
symfony new sf5-1-sandbox --version=5.1

 More on Stackoverflow   Read the doc  Random snippet

  Work with me!