aldidigitalservices / composer-package-development-toolset
Develop Composer packages from inside your projects
Installs: 12 010
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 1
Type:composer-plugin
Requires
- php: ^8.2
- composer-plugin-api: ^2.3
Requires (Dev)
- composer/composer: ^2.5
README
A Composer plugin that enables you to develop your Composer packages alongside your project, without altering the composer.json or composer.lock file of the project. This works by symlinking the development packages into the vendor directory, replacing possible existing installations.
Installation
Add the package to your dev dependencies:
composer require --dev aldidigitalservices/composer-package-development-toolset
When prompted to allow this plugin confirm with y
.
Usage
Development Package Location
The development packages are automatically registered by scanning the dev-packages
directory.
Its default location is in your project's root directory, ensuring your packages are available in your Docker container and adding code completion for project code in the development packages.
However, the location can be changed by adding the following to your composer.json:
"extra": { "composer-package-development-toolset": { "package-dir": "dev-packages" } }
Workflow
As your composer.json and composer.lock won't be altered, Composer will remove the development package's symlinks on certain actions to match the content of these files. This plugin hooks into these actions and restores the symlinks afterwards, ensuring a seamless experience.