ngyuki / composer-shared-installer
Install package in Composer to global shared.
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- composer-plugin-api: *
Requires (Dev)
- composer/composer: @dev
This package is auto-updated.
Last update: 2024-12-11 01:56:10 UTC
README
Edit composer.json
.
{ "require": { "symfony/filesystem": "~2.0" }, "require-dev": { "phpunit/phpunit": "3.7.*", "ngyuki/composer-shared-installer": "*" }, "extra": { "shared": { "exclude": [ "phpunit/phpunit" ] } } }
Run composer update
command.
$ composer update
Create sample.php
.
<?php require 'vendor/autoload.php'; use Symfony\Component\Filesystem\Filesystem; $ref = new ReflectionClass('Symfony\Component\Filesystem\Filesystem'); echo $ref->getFileName(), PHP_EOL; $ref = new ReflectionClass('PHPUnit_Framework_TestCase'); echo $ref->getFileName(), PHP_EOL;
Run sample.php
.
$ php sample.php
Symfony Filesystem will be installed global.
/home/your/.composer/shared/symfony/filesystem-2.3.6.0/Symfony/Component/Filesystem/Filesystem.php
PHPUnit will be installed local, because your exclude it.
/home/your/project/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php