Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Symfony Blog:
Creating and updating Symfony projects much faster
Jul 13, 2018 @ 14:58:58

On the Symfony blog there's a post covering some of the recent improvements in the framework that can help to make creating and updating Symfony projects faster via some recent changes speeding up the Composer installation.

A few years ago, we introduced the Symfony Installer as the fastest way to create new Symfony projects. While Composer took up to several minutes to create a new project, Symfony Installer did the same in less than ten seconds.

The trick was that the installer downloaded a ZIP archive with all the dependencies required by the specific Symfony version you were installing, so it was not necessary that Composer resolved the project dependencies.

However, with the release of Symfony 4 we deprecated the Symfony Installer in favor of Composer, because we wanted to use standard development tools as much as possible. Sadly this made creating new Symfony projects slower and, in some cases, it triggered "out of memory" exceptions while Composer was resolving the dependencies.

The post talks about the changes they made to the Composer installation process, mentioning the two major changes: including a composer.lock to prevent version resolution and removal of all legacy Composer tags. They also share some benchmarks for the installation both before and after the changes showing a jump of at least ten seconds post-changes.

tagged: symfony project speed install composer lock tags framework

Link: https://symfony.com/blog/creating-and-updating-symfony-projects-much-faster


Trending Topics: