2017 © Pedro Peláez
 

composer-plugin composer-drupal-optimizations

Composer plugin to improve composer performance for Drupal projects

image

zaporylie/composer-drupal-optimizations

Composer plugin to improve composer performance for Drupal projects

  • Friday, July 20, 2018
  • by zaporylie
  • Repository
  • 1 Watchers
  • 16 Stars
  • 228 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Optimize Composer for Drupal projects

Build Status Packagist, (*1)

About

This composer-plugin contains a set of improvements that makes running heavy duty composer commands (i.e. composer update or composer require) much faster., (*2)

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., (*3)

Installation

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

No configuration required 🎊, (*4)

Optimizations

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

Benchmark

Following numbers are for clean https://github.com/drupal-composer/drupal-project/ without and with this plugin., (*5)

Before:, (*6)

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

After:, (*7)

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

php 7.2, macOS High Sierra, i7, 16GB RAM, (*8)

Configuration

If no configuration is provided this package will provide sensible defaults based on the drupal/core 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 section:, (*9)

{
  "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., (*10)

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 drupal/core in your own project as well., (*11)

Credits

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

The Versions

20/07 2018

dev-issue/3

dev-issue/3

Composer plugin to improve composer performance for Drupal projects

  Sources   Download

GPL-2.0-or-later

The Requires

 

The Development Requires

15/07 2018

dev-master

9999999-dev

Composer plugin to improve composer performance for Drupal projects

  Sources   Download

GPL-2.0-or-later

The Requires

 

The Development Requires

15/07 2018

1.0.2

1.0.2.0

Composer plugin to improve composer performance for Drupal projects

  Sources   Download

GPL-2.0-or-later

The Requires

 

The Development Requires

15/07 2018

1.0.1

1.0.1.0

Composer plugin to improve composer performance for Drupal projects

  Sources   Download

GPL-2.0-or-later

The Requires

 

The Development Requires

15/07 2018

1.0.0

1.0.0.0

Composer plugin to improve composer performance for Drupal projects

  Sources   Download

The Requires

 

The Development Requires