info Composer
This commit is contained in:
parent
501b51f78a
commit
11156e4bfc
51
HowtoPHP.md
51
HowtoPHP.md
|
@ -225,3 +225,54 @@ DocumentRoot /home/bench/www/
|
||||||
#ProxyPassMatch "^/(.*\.php(/.*)?)$" "fcgi://127.0.0.1:9000//home/foo/www/$1"
|
#ProxyPassMatch "^/(.*\.php(/.*)?)$" "fcgi://127.0.0.1:9000//home/foo/www/$1"
|
||||||
ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php5-fpm.sock|fcgi://localhost/home/foo/www/"
|
ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php5-fpm.sock|fcgi://localhost/home/foo/www/"
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
## Composer
|
||||||
|
|
||||||
|
* Documentation : <https://getcomposer.org/doc/>
|
||||||
|
|
||||||
|
[Composer](https://getcomposer.org/) est un outil moderne de gestion des bibliothèques PHP, qui tend à remplacer le vieil outil [PEAR](https://pear.php.net/). Il est disponible à partir de Debian 9.
|
||||||
|
|
||||||
|
Composer s'utilise sans les droits _root_.
|
||||||
|
Il s'appuye sur la présence d'un fichier `composer.json` qui déclare les bibliothèques à installer.
|
||||||
|
|
||||||
|
~~~
|
||||||
|
$ composer about
|
||||||
|
Composer - Package Management for PHP
|
||||||
|
Composer is a dependency manager tracking local dependencies of your projects and libraries.
|
||||||
|
See https://getcomposer.org/ for more information.
|
||||||
|
|
||||||
|
echo '{"require": {"twig/extensions": "~1.0"}}' > composer.json
|
||||||
|
|
||||||
|
$ composer update
|
||||||
|
Loading composer repositories with package information
|
||||||
|
Updating dependencies (including require-dev)
|
||||||
|
- Installing symfony/polyfill-mbstring (v1.5.0)
|
||||||
|
Loading from cache
|
||||||
|
|
||||||
|
- Installing twig/twig (v2.4.3)
|
||||||
|
Loading from cache
|
||||||
|
|
||||||
|
- Installing twig/extensions (v1.5.1)
|
||||||
|
Loading from cache
|
||||||
|
|
||||||
|
twig/extensions suggests installing symfony/translation (Allow the time_diff output to be translated)
|
||||||
|
Writing lock file
|
||||||
|
Generating autoload files
|
||||||
|
|
||||||
|
$ composer show
|
||||||
|
symfony/polyfill-mbstring v1.5.0 Symfony polyfill for the Mbstring extension
|
||||||
|
twig/extensions v1.5.1 Common additional features for Twig that do not directly belong in core
|
||||||
|
twig/twig v2.4.3 Twig, the flexible, fast, and secure template language for PHP
|
||||||
|
~~~
|
||||||
|
|
||||||
|
### Composer sous Debian 8
|
||||||
|
|
||||||
|
~~~
|
||||||
|
$ wget https://getcomposer.org/installer
|
||||||
|
$ sha384sum installer
|
||||||
|
$ mkdir bin
|
||||||
|
$ php -d allow_url_fopen=On installer --install-dir=bin --filename=composer
|
||||||
|
$ php bin/composer --version
|
||||||
|
PHP Warning: putenv() has been disabled for security reasons
|
||||||
|
Composer version 1.5.1 2017-08-09 16:07:22
|
||||||
|
~~~
|
||||||
|
|
Loading…
Reference in a new issue