All Projects → rubenrua → symfony-clean-tags-composer-plugin

rubenrua / symfony-clean-tags-composer-plugin

Licence: MIT license
No description or website provided.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to symfony-clean-tags-composer-plugin

Studio
A workbench for developing Composer packages.
Stars: ✭ 1,021 (+4154.17%)
Mutual labels:  composer-plugin
Composer Preload
Preload your sweet sweet code to opcache with a composer command, making your code faster to run.
Stars: ✭ 173 (+620.83%)
Mutual labels:  composer-plugin
composer-plugin-qa
Comprehensive Plugin for composer to execute PHP Quality assurance Tools
Stars: ✭ 25 (+4.17%)
Mutual labels:  composer-plugin
Skrub
A package to remove junk from Composer installations and trim build sizes.
Stars: ✭ 91 (+279.17%)
Mutual labels:  composer-plugin
Foxy
A fast, reliable, and secure NPM/Yarn bridge for Composer
Stars: ✭ 137 (+470.83%)
Mutual labels:  composer-plugin
preserve-paths
A composer plugin for keeping specified files and directories when installing/updating new composer packages. Can be used to supported nested packages.
Stars: ✭ 27 (+12.5%)
Mutual labels:  composer-plugin
Store Plugin Installer
Install store.shopware.com Plugins automatically in your Shopware Composer Setup
Stars: ✭ 37 (+54.17%)
Mutual labels:  composer-plugin
drupal-composer-init
Initialise a Drupal composer setup
Stars: ✭ 43 (+79.17%)
Mutual labels:  composer-plugin
Private Composer Installer
Composer install helper outsourcing sensitive keys from the package URL into environment variables
Stars: ✭ 168 (+600%)
Mutual labels:  composer-plugin
composer-packages
Composer Packages is a Composer plugin for getting information about installed packages in your project.
Stars: ✭ 32 (+33.33%)
Mutual labels:  composer-plugin
Beetbox
Pre-provisioned L*MP stack
Stars: ✭ 94 (+291.67%)
Mutual labels:  composer-plugin
Composer Custom Directory Installer
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.
Stars: ✭ 117 (+387.5%)
Mutual labels:  composer-plugin
composer-asset-compiler
Composer plugin that installs dependencies and compiles assets based on configuration.
Stars: ✭ 19 (-20.83%)
Mutual labels:  composer-plugin
Imposter Plugin
Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.
Stars: ✭ 90 (+275%)
Mutual labels:  composer-plugin
package-wizard
Package Wizard is a library for creating a new packages using CLI tool.
Stars: ✭ 61 (+154.17%)
Mutual labels:  composer-plugin
Composer Notifier
💬 Display desktop notification after Composer install / update
Stars: ✭ 42 (+75%)
Mutual labels:  composer-plugin
Composer Patches
Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and composer command for testing/troubleshooting patches.
Stars: ✭ 196 (+716.67%)
Mutual labels:  composer-plugin
composer-localdev-plugin
Composer Plugin for local development
Stars: ✭ 31 (+29.17%)
Mutual labels:  composer-plugin
composer-backslasher
Composer plugin that speeds up your application by adding backslashes to all PHP internal functions and constants.
Stars: ✭ 39 (+62.5%)
Mutual labels:  composer-plugin
logSys
PHP Secure, Advanced Login System
Stars: ✭ 80 (+233.33%)
Mutual labels:  composer-plugin

Symfony Clean Tags Composer Plugin

Motivation

It was recently identified that Composer consumes high CPU + memory on packages that have a lot of historical tags. See composer/composer#7577

This means the composer+packagist infrastructure has a scalability issue: as time passes, the list of tags per packages grows, and the "Composer experience" degrades. This is significant for symfony/* today, and will become also a pain for any other packages over time.

symfony/flex solves this issue with a patch from @nicolas-grekas using a new extra parameter extra.symfony.require: symfony/flex#378 and symfony/flex#409

This project extracts this patch into a separete composer plugin for legacy projects (PHP5 and Symony 2/3)

Internal big project Sylius/Sylius-Standard laravel/laravel
extra.symfony.require "2.8.*" "^3.4|^4.1" "~4.0"
Before Memory: 337.9MB (peak: 1582.09MB), time: 31.84s Memory: 384.84MB (peak: 1670.44MB), time: 28.11s Memory: 265.09MB (peak: 417.44MB), time: 6.57s
After Memory: 183.05MB (peak: 286.56MB), time: 11.04s Memory: 218.76MB (peak: 251.73MB), time: 5.02s Memory: 210.17MB (peak: 236.37MB), time: 4.38s

Installation

Step 1: Profile application without the plugin

Open a command console, enter your project directory and execute the following command to profile the current memory and CPU time usage.

$ composer update --profile --ignore-platform-reqs --dry-run
....
[833.9MB/199.98s] Memory usage: 833.86MB (peak: 2811.34MB), time: 199.98s

Write down it to compare with the final step.

Step 2: Download the Bundle

Execute the following command to installs the composer plugin:

$ composer require rubenrua/symfony-clean-tags-composer-plugin

or globally with:

$ composer global require rubenrua/symfony-clean-tags-composer-plugin

Step 3: Configure the new extra parameter

Configure extra.symfony.require with the same symfony version constraints used in the application. For instance, if you are using symfony 2.8, execute the following command to modify the config composer section:

$ composer config extra.symfony.require 2.8.*

Also the SYMFONY_REQUIRE environment variable can be used instead of extra.symfony.require. See symfony/symfony travis configuration for a example.

Step 4: Profile application with the plugin

Finally profile the current memory and CPU time usage. Execute again the following command:

$ composer update --profile --ignore-platform-reqs --dry-run
....
[230.7MB/31.02s] Memory usage: 230.67MB (peak: 387.3MB), time: 31.02s

Please, feel free to comment the issue #3 with your improvement.

Notes

  • MIT license.
  • Thank you @nicolasgrekas
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].