NPM/Bower Dependency Manager for Composer
- dev-master / 1.4.x-dev
This package is auto-updated.
Last update: 2020-03-28 09:13:16 UTC
The Composer Asset Plugin allows you to manage project assets (css, js, etc.) in your
without installing NPM or Bower.
This plugin works by transposing package information from NPM or Bower to a compatible version for Composer. This allows you to manage asset dependencies in a PHP based project very easily.
The next major version of Composer Asset Plugin is so different, but also incompatible with the current version, that it became a new project named Foxy.
Foxy is the new way to manage the assets of PHP libraries, because it works nativelly with all the features of NPM or Yarn. However, this plugin will continue to be maintained by the community, without having new features.
You can read the reasons for this new version, or the difference between Foxy and Fxp Composer Asset Plugin, but also how does Foxy work.
- Works with native management system versions of VCS repository of composer
- Works with public and private VCS repositories
- Lazy loader of asset package definitions to improve performance
- Import filter with the dependencies of the root package and the installed packages, for increased dramatically the performance for the update
- Automatically get and create an Asset VCS repository defined in:
- Automatically get and create the Asset VCS repositories of dependencies defined in each asset package (dev dependencies included)
- Mapping conversion of asset package to composer package for:
- Conversion of Semver version to the composer version
- Conversion of Semver range version to the composer range version
- Conversion of dependencies with URL to the composer dependencies with the creation of VCS repositories
- Conversion of multiple versions of the same dependency to different dependencies of composer
- Add manually the multiple versions of a same dependency in the project
- Add a custom config of VCS Repository
- Override the config of VCS Repository defined by the asset registry directly in config section of root composer
- VCS drivers for:
- Local cache system for:
- package versions
- package contents
- repository redirects
- Custom asset installers configurable in the root file
- For Bower, all files defined in the section
ignorewill not be installed
- Disable or replace the deleting of the ignore files for Bower
- Enable manually the deleting of the ignore files for NPM
- Use the Ignore Files Manager in the Composer scripts
- Configure the plugin per project, globally or with the environment variables
- Compatible with all commands, including:
There already are several possibilities for managing assets in a PHP project:
- Install Node.js and use NPM or Bower command line in addition to Composer command line
- Do #1, but add Composer scripts to automate the process
- Include assets directly in the project (not recommended)
- Create a repository with all assets and include the
composer.jsonfile (and use Packagist or an VCS Repository)
- Add a package repository in
composer.jsonwith a direct download link
- Create a Satis or Packagist server
This plugin has been created to address these issues. Additionally, most developers will not add a
file to their projects just to support php based projects, especially when npm and/or bower already exist and are
The bulk of the documentation is located in
All the installation instructions are located in documentation.
This composer plugin is under the MIT license. See the complete license in:
Issues and feature requests are tracked in the Github issue tracker.