#WomenWhoCode #PHP #Symfony #Architecture #GoLang #DevOps #Python
Ingeniera en Informática.
9 años de experiencia en desarrollo web.
Conocimientos en ecommerce.
Senior Software Engineer en Wizeline.
CI/CD
@phpmx @Technolatinas
@WWCodeCDMX
AND...
Jordi Boggiano
@seldaek
Nils Adermann
@naderman
¿Qué es composer?
https://getcomposer.org/
{
"name": "smmd/test",
"require": {
"smmd/test-package": "^1.0"
},
"repositories": [
{
"type": "vcs",
"url": “/full/path/to/the/local/smmd/test-package"
},
"authors": [
{
"name": "Sagrario Meneses",
"email": "sagrario.meneses@gmail.com"
}
]
}
"autoload": {
"exclude-from-classmap": [
"/Tests/",
"/test/",
"/tests/"
],
"psr-4": {
MyLibrary\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MyLibrary\\Tests\\": "tests/"
}
},
https://getcomposer.org/doc/00-intro.md
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php composer-setup.php
$ php -r "unlink('composer-setup.php');"
$ php composer.phar
$ php composer-setup.php --install-dir=bin --filename=composer
$ composer init
{
"name": "smmd/test",
"require": {
"guzzlehttp/guzzle": "^6.3"
},
"require-dev": {
"phpunit/phpunit": "^7.5"
},
"authors": [
{
"name": "Sagrario Meneses",
"email": "sagrario.meneses@gmail.com"
}
]
}
$ composer self update
$ composer search <dependency name>
$ composer install
$ composer update
$ composer require package/dependency-name
$ composer update author-name/library-name
gitignore
"Keep upgrading as painless as possible"
Parciales con restricciones temporales
"canonical": false
$ composer update vendor/package:1.0.*
$ composer update --with vendor/package:1.0.*
$ composer self-update --2
// Revertir
$ composer self-update --1
Para tener en cuenta
// Para despliegue a producción
$ composer check-platform-reqs
$ (sudo) cp `which composer` /usr/local/bin/composer1
$ (sudo) composer1 self-update --1
$ (sudo) composer self-update --2
$ (sudo) ln -s `which composer` /usr/local/bin/composer2
https://getcomposer.org/
https://packagist.com/
https://packagist.org/
https://blog.packagist.com/
https://dependabot.com/php/
https://docs.renovatebot.com/php/
https://github.com/composer/composer/blob/master/UPGRADE-2.0.md
https://github.com/composer/composer
"Composer 2 with Jordi Boggiano" Symfony UK