Last active
December 20, 2015 09:29
-
-
Save K-Phoen/6108012 to your computer and use it in GitHub Desktop.
Introduction à Composer - Partie 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"propel/propel-service-provider": ">=0.0.1", | |
"propel/propel1": "1.6.*", | |
"silex/silex": "1.0.*", | |
"symfony/validator": "2.1.*", | |
"willdurand/hateoas": "0.0.*", | |
"symfony/property-access": "2.2.*", | |
"symfony/yaml": "2.2.*", | |
"jms/metadata": "1.2.*", | |
"jms/serializer": "1.0.*" | |
}, | |
"autoload": { | |
"psr-0": { "Propilex": "src" } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% php composer.phar install | |
Loading composer repositories with package information | |
Installing dependencies (including require-dev) from lock file | |
- Installing phpoption/phpoption (1.1.0) | |
Downloading: 100% | |
- Installing phpcollection/phpcollection (0.1.0) | |
Downloading: 100% | |
- Installing doctrine/common (2.3.0) | |
Loading from cache | |
- Installing jms/parser-lib (1.0.0) | |
Downloading: 100% | |
- Installing jms/metadata (1.2.0-RC) | |
Loading from cache | |
- Installing jms/serializer (dev-master 71388cc) | |
Cloning 71388cc58d4c146136ff7e32d9691562ddd5ae99 | |
[...] | |
Generating autoload files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /path/to/your/project | |
curl -s http://getcomposer.org/installer | php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php composer.phar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% php composer.phar autoload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"propel/propel-service-provider": ">=0.0.1", | |
"propel/propel1": "1.6.*", | |
"silex/silex": "1.0.*", | |
"symfony/validator": "2.1.*", | |
"willdurand/hateoas": "0.0.*", | |
"symfony/property-access": "2.2.*", | |
"symfony/yaml": "2.2.*", | |
"jms/metadata": "1.2.*", | |
"jms/serializer": "1.0.*" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% php composer.phar install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% php composer.phar require "vendor/package" "dev-master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"propel/propel-service-provider": ">=0.0.1", | |
"propel/propel1": "1.6.*", | |
"silex/silex": "1.0.*", | |
"symfony/validator": "2.1.*", | |
"willdurand/hateoas": "0.0.*", | |
"symfony/property-access": "2.2.*", | |
"symfony/yaml": "2.2.*", | |
"jms/metadata": "1.2.*", | |
"jms/serializer": "1.0.*" | |
}, | |
"autoload": { | |
"psr-0": { "Propilex": "src" } | |
}, | |
"repositories": [ { "type": "composer", "url": "http://satis.mycompany.com/" } ] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% php composer.phar update "vendor/package" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
// ou dans un bootstrap de tests | |
$loader = require 'vendor/autoload.php'; | |
$loader->add('Acme\\Test\\', __DIR__); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vendor | |
├── autoload.php | |
├── composer | |
│ └── [..] | |
├── doctrine | |
│ └── common | |
├── jms | |
│ ├── metadata | |
│ ├── parser-lib | |
│ └── serializer | |
├── [...] | |
└── willdurand | |
└── hateoas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment