Download the PHP package mediamonks/composer-vendor-cleaner without Composer

On this page you can find all versions of the php package mediamonks/composer-vendor-cleaner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-vendor-cleaner

Total Downloads Latest Stable Version Latest Unstable Version License

MediaMonks Composer Vendor Cleaner

Sometimes there are still some unfortunate cases when you need to send your vendor dir to some place and you want it to go as fast as possible. This package provides a simple script which will try to remove as much stuff as possible without breaking your app.

Don't forget to run composer install with --no-dev when creating a package for non-development environments, it will already save you loads space and files if you have packages defined in require-dev!

How it works

The script simply reads all package dirs within the vendor dir (<vendor>/<package>) and removed files from that dir which are not used for running your project. For most packages this means it will remove docs and tests but also the composer files, licenses and readme's.

Since not all packages can be cleaned the same way the type in composer.json of the package is used to determine the cleaning handler.

Currently these handlers are available:

SymfonyBundleHandler

Used when the type is set to symfony-bundle, removes the Tests dir if it's present

DefaultHandler

For all other types, removes all folders except the ones that are defined in the autoload section of the composer.json

Usage

Clean up current vendor dir:

Clean up specific vendor dir:

To just view what it will do without removing the actual files you can do a dry run:

Options

You pass the location of a json file to set some options which can influence the cleaning process:

The current supported options are:

You can simply look at the provided options.json (which is used by default) to see how the options are defined.

Disclaimer

This script is under development and is not tested extensively yet so use at your own risk!

We can use your help!

This script was mainly created to clean up Symfony Framework projects but with your help we can make it work for other frameworks too. Please create your own handlers, improve the cleaning on current handlers and send in a PR.


All versions of composer-vendor-cleaner with dependencies

PHP Build Version
Package Version
Requires php Version ^5.4|^7.0
symfony/finder Version ^2.4|^3.0|^4.0
symfony/filesystem Version ^2.4|^3.|^4.0
symfony/console Version ^2.4|^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mediamonks/composer-vendor-cleaner contains the following files

Loading the files please wait ....