humweb / composer-link
Adds ability to link local packages for development with composer
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 4
Type:composer-plugin
Requires
- php: >=7.0
- composer-plugin-api: ^2.0
- ext-json: *
Requires (Dev)
- composer/composer: ^2.0
- friendsofphp/php-cs-fixer: ^v3.4.0
- phpmd/phpmd: ^2.12
- phpstan/phpstan: ^1.4
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.1
- phpstan/phpstan-strict-rules: ^1.1
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-12-06 22:04:33 UTC
README
Adds ability to link local packages in composer for development.
This plugin won't alter your composer.json
or composer.lock
file,
while maintaining the composer abilities to manage/upgrade your packages.
Installation
This plugin can be installed globally or per project
Globally
composer global require humweb/composer-link
Per project:
composer require --dev humweb/composer-link
Usage
The following three commands are made available by this plugin link
, unlink
and linked
.
When the plugin is installed globally you can prefix the commands with global
as example composer global linked
and install global packages.
To link a package you can use the link
commands, you can also link a global package.
When linked to a global package absolute paths are used, when using a relative path composer-link resolves
it to the absolute path.
composer link ../path/to/package
composer global link ../path/to/package
It's also possible to use a wildcard in your path, note that this will install all packages found in the directory ../packages
If you don't want to link all the packages but only the ones originally installed you can pass the --only-installed
flag.
composer link ../packages/*
composer link ../packages/* --only-installed
To unlink the package you can use the unlink
command
composer unlink ../path/to/package
composer inlink ../packages/*
composer global link ../path/to/package
To see all linked packages in your project you can use the linked
command
composer linked
composer global linked