Need help with composer-drupal-optimizations?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

145 Stars 16 Forks 66 Commits 3 Opened issues


Saves memory and CPU cycles when you run `composer update`

Services available


Need anything else?

Contributors list

Optimize Composer for Drupal projects

Build Status Packagist


This composer-plugin contains a set of improvements that makes running heavy duty composer commands (i.e.

composer update
composer require
) much faster.

Composer 2

Since Composer 2 is quite fast by default, this plugin is not needed, and will be disabled if Composer 2 is detected. If everyone involved in development of a project is using Composer 2, this plugin becomes redundant and can be removed from the list of project dependencies.


composer require zaporylie/composer-drupal-optimizations:^1.1 --dev

No configuration required 🎊


  • Reduce memory usage and CPU usage by removing legacy symfony tags


Following numbers are for clean without and with this plugin.


Memory usage: 323.19MB (peak: 1121.09MB), time: 13.68s


Memory usage: 238.66MB (peak: 297.17MB), time: 4.84s

php 7.2, macOS High Sierra, i7, 16GB RAM


If no configuration is provided this package will provide sensible defaults based on the

version constraint in the root composer.json file. Default configuration should cover 99% of the cases. However, in case you want to manually specify the tags that should be filtered out you are welcome to use the
  "extra": {
    "composer-drupal-optimizations": {
      "require": {
        "symfony/symfony": ">3.4"

Recommendation note: Use defaults (skip config above) if possible - this package will be maintained throughout the Drupal's lifecycle in order to optimize legacy constraints in parallel with Drupal's requirements.

All you have to do is to make sure your drupal core constraint in the root composer.json is set to

drupal/core: ^8.5
or above. If you use a Drupal distribution, be sure to explicitly require
in your own project as well.


  • Symfony community - idea and development; Special thanks to @nicolas-grekas
  • Jakub Piasecki - port and maintenance

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.