David Flores
#Linux #Drupal #Symfony #WebDeveloper #Silex #OpenSource
David Flores
Drupal, Symfony, Silex, BackEnd, Open Source, Father ...sometimes #Nerd Speaker
david@indava.com
@dmouse
https://packagist.org
http://www.php-fig.org/members/
http://www.php-fig.org/psr/
http://www.php-fig.org/psr/
https://philsturgeon.uk/php/2012/03/06/packages-the-way-forward-for-php/
$ php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
$ php composer-setup.php
$ php -r "unlink('composer-setup.php');"
https://getcomposer.org/doc/00-intro.md
$ php composer.phar require twig/twig
$ php composer.phar update twig/twig
$ php composer.phar search twig
<?php
require_once '../vendor/autoload.php';
<?php
$loader = new Twig_Loader_Filesystem('/path/to/templates');
$twig = new Twig_Environment($loader, array(
'cache' => '/path/to/compilation_cache',
));
{
// ...
"require": {
"php" : "~7.0",
"twig/twig": "^1.24"
}
// ...
}
{
// ...
"require-dev": {
"phpunit/phpunit": "5.3.*"
}
// ...
}
$ cd /project/folder
$ composer install
# gitignore
vendor
https://github.com/composer/satis
David Flores
david@indava.com
@dmouse
By David Flores