ryzr / localpackages
Automatically symlink composer packages post-install/update for easier local development
Installs: 27 121
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:composer-plugin
pkg:composer/ryzr/localpackages
Requires
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
- phpspec/phpspec: ~2.3
README
Automatically symlink composer packages post-install/update for easier local development
Installation
LocalPackages can be installed globally or per project, with Composer:
Globally (recommended): composer global require luminsports/localpackages
Per project: composer require --dev luminsports/localpackages
Usage
- Create a
composer.localpackages.jsonfile in your project root directory. This file will contain your mapping of paths to locally developed packages - Populate it with paths, in the following JSON format:
{
"paths": [
"~/path/to/your/package",
"~/path/to/your/other-package",
]
}
- Since the configuration you will provide is unique to your environment, it would be best practice to add
composer.localpackages.jsonto your.gitignorefile. composer installorcomposer update. LocalPackages will scan the directories specified in yourcomposer.localpackages.jsonfile for packages. If, for example, you used the configuration above and~/path/to/your/packagecontains acomposer.jsonfile foryour/package, your project will symlink anyyour/packagedependency to~/path/to/your/packageautomatically.
Known Issues
If anything weird happens and you get stuck, try rm -r vendor/ composer.lock && composer install. If that doesn't work, blame me.
- I don't believe this works when using
composer require your/package. Just runcomposer update your/packageafterwards, and everything should symlink
License
This code is published under the MIT License. This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact.
Thanks
This package is a super-simplified version of franzl/studio.