The Fleetbase Verdaccio Composer Middleware Plugin enables Verdaccio to serve as a repository manager for Composer packages, facilitating the publishing and management of PHP packages alongside npm packages. This integration supports the official Fleetbase registry (https://registry.fleetbase.io), which is a customized version of Verdaccio tailored to handle diverse protocols including npm and Composer, specifically designed to accommodate the needs of the Fleetbase ecosystem.
- Composer Support: Allows Verdaccio to act as a Composer repository, enabling it to manage PHP package dependencies.
- Dual Protocol Functionality: Integrates seamlessly with Verdaccio's existing npm protocol support, providing a unified approach to package management across different technology stacks within the Fleetbase ecosystem.
To install the plugin, run the following command in your terminal:
npm install @fleetbase/verdaccio-composer-middleware
After installation, add the following configuration to the config.yaml
file of your Verdaccio server to enable the plugin:
middlewares:
'@fleetbase/verdaccio-composer-middleware':
enabled: true
Ensure the plugin is enabled as shown to activate Composer support within your Verdaccio registry.
Once enabled, the plugin allows your Verdaccio server to handle Composer packages. This involves both publishing packages using Composer and fetching packages as dependencies in PHP projects.
- Configure your Composer project to recognize your Verdaccio server as a repository.
- Use Composer's publish commands to push packages to the Verdaccio server configured with this middleware.
- In your PHP projects, specify the Verdaccio server as a repository source in your
composer.json
to allowcomposer install
to fetch packages from your custom repository.
{
"repositories": [
{
"type": "composer",
"url": "https://registry.fleetbase.io"
}
]
}
Contributions to the Fleetbase Verdaccio Composer Middleware Plugin are highly appreciated. Whether it's feature requests, bug fixes, or improvements, please feel free to fork the repository and submit pull requests. Check out our CONTRIBUTING.md document for more information on contributing guidelines.
This plugin is licensed under the AGPL v3 License. Detailed terms and conditions can be found in the LICENSE.md file.
For support, feature requests, or any questions about using the plugin, please open an issue on our GitHub repository at https://github.com/fleetbase/verdaccio-composer-middleware/issues.
- Thanks to the Verdaccio community for providing a robust foundation for plugin development.