Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SanderSander/composer-link
Adds ability to link local packages for development with composer
https://github.com/SanderSander/composer-link
composer composer-plugin
Last synced: 24 days ago
JSON representation
Adds ability to link local packages for development with composer
- Host: GitHub
- URL: https://github.com/SanderSander/composer-link
- Owner: SanderSander
- License: other
- Created: 2022-03-12T14:50:06.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-20T09:20:49.000Z (12 months ago)
- Last Synced: 2024-11-10T09:40:58.385Z (about 1 month ago)
- Topics: composer, composer-plugin
- Language: PHP
- Homepage: https://packagist.org/packages/sandersander/composer-link
- Size: 143 KB
- Stars: 59
- Watchers: 5
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-composer - Composer-Link - Adds the ability to link local packages for development. (Plugins / Support)
README
# composer-link
![phpunit](https://github.com/SanderSander/composer-link/actions/workflows/unit-tests.yml/badge.svg?branch=master)
[![Test Coverage](https://api.codeclimate.com/v1/badges/3815e6abf2ec0e1d4ac8/test_coverage)](https://codeclimate.com/github/SanderSander/composer-link/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/3815e6abf2ec0e1d4ac8/maintainability)](https://codeclimate.com/github/SanderSander/composer-link/maintainability)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.## Requirements
- PHP >= 8.0
- Composer >= 2.2## Installation
This plugin can be installed globally or per project
Globally
```
composer global require sandersander/composer-link
```Per project:
```
composer require --dev sandersander/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 unlink ../packages/*
composer global unlink ../path/to/package
```To see all linked packages in your project you can use the `linked` command
```
composer linked
composer global linked
```