Download the PHP package jparkinson1991/composer-linker-plugin without Composer

On this page you can find all versions of the php package jparkinson1991/composer-linker-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-linker-plugin

Composer Linker Plugin

Packagist Version Packagist PHP Version Support Build & Test Coverage Status Packagist License

This plugin enables the movement of package files outside of the standard composer vendor directory via symlink or copying.

This plugin enables the following:

Packages (or their specific files) will be linked as per configuration when it is either installed or updated and unlinked when uninstalled.

Any linked package will still exist within the composer vendor directory as well as any configured custom installation path.

Getting Started

Requirements

Composer 2.3.0 deprecations

This plugin knowingly consumes deprecated functionality within composer core to ensure its compatibility with all current versions of composer 2.x. Update to the latest version of composer to ensure that when this deprecated code is removed from the plugin your installation will not be effected.

Installing

Usage

Usage as a Plugin

This plugin will invoke automatically after a package is installed, updated or uninstalled. To have that package handled by this plugin simply provide configuration for it. Packages will be linked as per configuration on install and update. Packages will be unlinked as per configuration on uninstall.

All defined configuration will be processed when this plugin is installed and uninstalled. On install all configuration will be linked. On uninstall all configuration will be unlinked.

Usage via Commands

Commands can be used manually trigger a link/unlink. Commands will only be able to process that which exists in configuration.

Link Command

Link all packages as defined in configuration.

Link a single package from configuration. Package must be installed and configuration must exist for it.

Link a multiple packages from configuration. Packages must be installed and configuration must exist for them.

Unlink Command

Unlink all packages as defined in configuration.

Unlink a single package from configuration. Package must be installed and configuration must exist for it.

Unlink a multiple packages from configuration. Packages must be installed and configuration must exist for them.

Configuration

All plugin configuration exists within the extra section of the project's composer.json file under the linker-plugin key.

Simple Links

In it's simplest form, this plugin can link a package directory to a given installation path.

Relative custom installation directories will be resolved from the project root. I.e. The directory containing the composer.json file. Absolute paths will be treat as is.

Complex Links

For more granular control of links, complex link objects can be defined using an object with the structure below.

When defining complex link objects the dir element is required. Both the files and options elements are optional. Empty files or options objects will be treat as an error. Do not include them if they are not needed.

Defining file mappings

A selection of files from within the package directory can be handpicked to be linked only. If the files element of a complex link exists, only those files will be linked.

When definining file mappings:

Important: The same source file may be mapped to multiple destinations however each destination must be unique within the link definition.

File mappings can be defined as both objects and arrays.

Defining file mappings as an array

When using an array to define file mappings:

Defining file mappings as an object

When defining file mappings as an object, all mappings must define a source file.

Defining link level options

To define link level options, include the options object within a complex link configuration.

Any of the plugin options can be placed within a complex link configuration's options object.

Link level options will override any global options set for the plugin.

Options

Plugin level options can be defined in the options object.

The options object is optional and if not included the default implied options will be used.

Any defined plugin option will be applied to all link configurations unless overridden.

Copying files

To enable the copying of files when linking, define the copy option with a boolean value.

Deleting orphan directories

If linking package's or their files to nested directories within a project, it may be useful to have the plugin delete the orphan directories of the link when it's associated package is uninstalled.

Directories are only treat as orphans if they are empty.

Orphan directories will not be cleaned outside of the composer project's root directory.

As an example

To enable deletion of a link configurations's orphan directories after it's associated package is uninstalled, define the delete-orphans option with a boolean value.

Default Implied Options

The default implied options are as follows

Versioning

SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the GNU GPLv3 License - see the LICENSE file for details


All versions of composer-linker-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
composer-plugin-api Version ^2.0
symfony/filesystem Version >=3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jparkinson1991/composer-linker-plugin contains the following files

Loading the files please wait ....