In 2011, we developed a revolutionary installation method for the Symfony 2.0 version which ultimately resulted in the creation of the Composer project. Throughout subsequent versions of Symfony, we leveraged Composer and pushed it to its limits. Having done so, it's time to introduce a new way to install Symfony: the Symfony Installer.
The Symfony Installer is a small PHP application that requires one-time installation and allows you to create multiple new projects based on any Symfony version. Check out the new Symfony download page to learn how to install it as per your operating system.
Once installed, creating a new Symfony application becomes a simple matter of executing:
1
$ symfony new my_project_name
Wait for a few seconds and your new Symfony project will be ready. The following image shows the blazing-fast Symfony installer in action:
By default, new projects are always based on the latest stable version of Symfony. Don't worry, the installer is flexible enough to adapt to your particular needs:
1 2 3 4 5 6 7 8 9 10 11
# use the latest version of any branch
$ symfony new my_project_name 2.3
$ symfony new my_project_name 2.6
# use a specific version
$ symfony new my_project_name 2.3.26
$ symfony new my_project_name 2.5.10
$ symfony new my_project_name 2.6.4
# use the most recent LTS (long term support) version
$ symfony new my_project_name lts
Execute the symfony
command without any option or argument to check out all
its features.
What will happen to Composer installation?
As of today, the traditional Symfony installation based on Composer has been deprecated. Although you can still use Composer to install Symfony, the new Symfony Installer is the only recommended way to install Symfony, whether you are a newcomer or an experienced developer.
Of course we'll still continue to use (and love) Composer for managing dependencies in your Symfony projects as well as for updating Symfony versions.
Rest assured, we've been working on this installer for months, and hundreds of developers have already tested it successfully on their systems. However, if you do happen to find a bug, please open an issue report at the Symfony Installer repository.
Maybe I'm missing something, but does it basically replace cloning, tweaking and updating the symfony/symfony-standard parts?
I presume that after that, it will still use composer to fetch Symfony and everything else into vendor/?
@Matthias Yes, you still rely on composer after that. What makes the installer so fast is that it downloads an archive which already contains the vendors of the standard edition, meaning you don't need to run composer during the initial project creation (it was already done on symfony's servers for you)
@Matthias and the new installer has some goodies to make your life easier:
It doesn't ask any questions (about AcmeDemoBundle, config parameters, etc.)
It support "smart versions". E.g. "symfony new 2.6" installs the latest version available in 2.6 branch, whichever it is
The resulting application is "cleaner" than with Composer. For example you won't see the "UPGRADE" files from Symfony, all the values in "composer.json" are appropriate for your project, a good "secret" option value is generated for you, etc.
Also, this installer is much better than the simple Composer installation, because it has its own Github repository, so we can propose and discuss new potential features on how to install Symfony the best way ! :D
That's a great news ! Thanks.
Great work, but why don't use https for secure the installer ?
Looks much faster than composer, nice! It makes me think of Laravel installer, you still need composer afterwards.
@Bertrand we are aware of this problem and we're working on it. Sadly, there are some "circumstances" that make this change more difficult than it should be.
@Loïc this is mostly the same concept as Laravel's one, but Javier and others contributors have worked a lot on this to make this installer far better and smart than Laravel's one.
Next step: accept some templates ? (like a REST edition ?)
nice feature but code in Commands is messy and not tested :-(
I'm recorded a video https://www.youtube.com/watch?v=eBI5nTH2G3M
@Konrad you are right, but we have a pending pull request (https://github.com/symfony/symfony-installer/pull/89) to add some tests.
Will it be possible to upgrade Symfony from the new installer?
@Kevin not really. You still have to use Composer to manage dependencies in your project and for upgrading Symfony versions.
Nice tool thank you.
Thanks for this great tool. Speed improvement is just amazing compared to composer installation method. Would be nice though if the legacy oh-my-zsh plugin here: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins would be replaced or bundled together with this command so oh-my-zsh will also work for the symfony installer.
Great tool! Are there any plans to integrate the installer in yeoman?
Not really convinced. The benefices seems too light (for now)
How can I create Symfony2 project with Symfony3 directory structure? It's so easy with Composer!
@Dominik there are no plans yet to integrate it with yeoman.
@Thomas B. we'll work hard to improve the installer and convince you to make the switch.
@Tu Nguyen, your need is an edge case that is not supported by the installer. The installer uses the Symfony 2 directory structure for Symfony 2 applications and the Symfony 3 directory structure for Symfony 3 application.
@Tu Nguyen I think you can't, as it's not an officially supported feature. But you can do this manually, changing the project config I guess
Will there be support for proxy servers? When using composer we could use a workaround (satis), but with this solution it would be cool to have a proxy support.
@Javier Eguiluz Yes for sure, the system can give powerful features :)
And it is not clear to me yet, why not use a composer? Why produce "excess entities"?
Symfony2 installer behind proxy, PHP config error... "failed to open stream: Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?"
It seems alight, but almost premature. It looks like the only main advantage is the speed (which big deal , you're only doing it once). If you still updating and managing dependencies through composer, I just don't see the point. It honestly seems like someone was bored and had a case of NIH syndrome.
I think an awesome installer would be this as a base, but then have a web frontend manager. Where you can do updates, add dependencies, change folder structure, also be a front end for doctrine for creating basic ORM, etc... essentially a front end for all the boilerplate stuff.
Nice, Great job, but i prefer composer installation :)