SlideShare uma empresa Scribd logo
1 de 148
Baixar para ler offline
Shifting gears with
Composer


                 Javier Lopez (@loalf)
Who am I?
Who am I?
• I am from Spain
Who am I?
• I am from Spain
• I live in London
Who am I?
• I am from Spain
• I live in London
• I work for IPC Media
Who am I?
• I am from Spain
• I live in London
• I work for IPC Media
• I tweet as @loalf
Who am I?
• I am from Spain
• I live in London
• I work for IPC Media
• I tweet as @loalf
• I co-organize DeSymfony (www.desymfony.com)
Who am I?
• I am from Spain
• I live in London
• I work for IPC Media
• I tweet as @loalf
• I co-organize DeSymfony (www.desymfony.com)

                             Still want to know more?
                      http://www.linkedin.com/in/loalf
Shifting gears




http://www.flickr.com/photos/jayshep5/5792259218/
My App
My App
My App
My App
My App
Composer is a tool for dependency management in PHP.
It allows you to declare the dependent libraries your project needs and it will
                      install them in your project for you.
Is it a new concept?
Is it a new concept? Nope.
Is it a new concept? Nope.



Node Package Manager
Is it a new concept? Nope.



Node Package Manager




                  Ruby Package Manager
But, what about PEAR?
But, what about PEAR?

• You have to install it in all the system
But, what about PEAR?

• You have to install it in all the system
• You can´t see the source code
But, what about PEAR?

• You have to install it in all the system
• You can´t see the source code
• Don´t allow different repository sources
But, what about PEAR?

• You have to install it in all the system
• You can´t see the source code
• Don´t allow different repository sources
• Composer is compatible with PEAR, :)
Installing Composer (locally)
Installing Composer (locally)

mkdir myprojectname
Installing Composer (locally)

mkdir myprojectname
cd myprojectname
Installing Composer (locally)

mkdir myprojectname
cd myprojectname
curl -s https://getcomposer.org/installer | php
Installing Composer (locally)

mkdir myprojectname
cd myprojectname
curl -s https://getcomposer.org/installer | php



                                        Done!
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
// composer.json
{
  "require" : {
     "monolog/monolog" : "1.0.*",
     "symfony/translation" : "2.1.0-RC1",
     "behat/behat" : ">2.3.5,<2.4",
     "fabpot/goutte" : "dev-master"
  },
  "minimum-stability": "dev"
}
php composer.phar install
Installing dependencies
  - Installing guzzle/parser (v2.8.4)
    Downloading: 100%


  - Installing symfony/event-dispatcher (dev-master)
    Cloning v2.1.0-BETA4


  - Installing guzzle/common (v2.8.4)
    Downloading: 100%


  - Installing guzzle/http (v2.8.4)
    Downloading: 100%


  - Installing symfony/process (dev-master)
    Cloning v2.1.0-RC1


  - Installing symfony/finder (dev-master)
    Cloning 1af11ab3a686f9c45f2a8d9d721d5717cdd5f1d6
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
!"" composer.json
!"" composer.lock
#"" vendor
    !"" autoload.php
    !"" behat
    !"" bin
    !"" composer
    !"" fabpot
    !"" guzzle
    !"" monolog
    #"" symfony
http://www.packagist.org




             http://www.flickr.com/photos/jayshep5/5792259218/
http://www.flickr.com/photos/jayshep5/5792259218/
http://www.flickr.com/photos/jayshep5/5792259218/
// composer.josn
{
    "name": "monolog/monolog",
    "require": {
        "php": ">=5.3.0"
    },
}
// composer.josn
{
    "name": "monolog/monolog",
    "require": {
        "php": ">=5.3.0"
    },
}
// composer.josn
{
    "name": "monolog/monolog",
    "require": {
        "php": ">=5.3.0"
    },
}
// composer.josn
{
    "name": "monolog/monolog",
    "require": {
        "php": ">=5.3.0"
    },
}
// composer.josn
{
    "name": "monolog/monolog",
    "require": {
        "php": ">=5.3.0"
    },
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    "type": "library",
    "description": "Logging for PHP 5.3",
    "keywords": ["log","logging"],
    "homepage": "http://github.com/Seldaek/monolog",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "j.boggiano@seld.be",
            "homepage": "http://seld.be",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Monolog": "src"
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    [ ... ]
    "autoload": {
        "psr-0": {
            "Monolog": ["src", "lib"]
        }
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    [ ... ]
    "autoload": {
        "classmap": ["src", "lib"]
    }
}
// composer.josn
{
    "name": "monolog/monolog",
    [ ... ]
    "autoload": {
        "files": "src/myfunctions.php"
    }
}
Excuse #1

I need to use a patched version of
Symfony
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "http://github.com/loalf/symfony"
     }
  ],
  "require": {
     "symfony/symfony" : "dev-patch2"
  }
}
Excuse #2

Some dependecies are in my own
private SVN repo
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "cvs",
       "url" : "svn://company.com/lib"
     }
  ],
  "require": {
     "company/lib" : "1.2.1"
  }
}
Excuse #3

I am using PEAR, you said I could
use PEAR
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
// composer.json
{
  "repositories": [
     {
       "type" : "pear",
       "url" : "http://pear2.php.net"
     }
  ],
  "require": {
     "pear-pear2/PEAR2_HTTP_Request" : "*"
  }
}
Excuse #4

My origin doesn´t have a
composer.json file
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
// composer.json
{
  "repositories" : [
     {
       "type": "package",
       "package": {
         "name": "jquery/jquery",
         "version": "1.7.2",
         "dist": {
           "url": "http://code.jquery.com/jquery-1.7.2.js",
           "type": "file"
         }
       }
     }
  ],
  "require" : {
     "jquery/jquery" : "1.7.2"
  }
}
Excuse #5

I need a private package
repository, but Packagist is too
demanding
Satis

http://getcomposer.org/doc/articles/handling-private-
              packages-with-satis.md
Reasons to   composer
1200     250
watchs   forks
2703


                                                                                  2418




                         2703                                             1881




                         packages                                1447




                                                         1004


                                                692

                                         478
                                347
                         204
                 139
2011-09   48   2011-11         2012-01         2012-03          2012-05          2012-07
   7
2703


                                                                                  2418




                         2703                                             1881




                         packages                                1447




                                                         1004


                                                692

                                         478
                                347



                                                                                                  287
                         204
                 139
2011-09   48   2011-11         2012-01         2012-03          2012-05          2012-07
   7




                                                                                                  588
+2.5 mill packages installed
                   since 2012-04-13
Resources
Resources

• getcomposer.org
Resources

• getcomposer.org
• packagist.org
Resources

• getcomposer.org
• packagist.org
• github.com/composer
Thanks!
 Questions?



              Javier Lopez (@loalf)

Mais conteúdo relacionado

Mais procurados

Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from DataMosky Liu
 
Composer 經典食譜
Composer 經典食譜Composer 經典食譜
Composer 經典食譜Shengyou Fan
 
Jedi Mind Tricks for Git
Jedi Mind Tricks for GitJedi Mind Tricks for Git
Jedi Mind Tricks for GitJan Krag
 
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 崇之 清水
 
Java 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature ListJava 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature ListTakipi
 
Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)Tim Pettersen
 
Let the contribution begin
Let the contribution beginLet the contribution begin
Let the contribution beginSeongJae Park
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Rafael Dohms
 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainKen Collins
 
Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversPlack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversTatsuhiko Miyagawa
 
Painless Data Storage with MongoDB & Go
Painless Data Storage with MongoDB & Go Painless Data Storage with MongoDB & Go
Painless Data Storage with MongoDB & Go Steven Francia
 
Composer The Right Way - 010PHP
Composer The Right Way - 010PHPComposer The Right Way - 010PHP
Composer The Right Way - 010PHPRafael Dohms
 
Web backends development using Python
Web backends development using PythonWeb backends development using Python
Web backends development using PythonAyun Park
 
Tracking large game assets with Git LFS
Tracking large game assets with Git LFSTracking large game assets with Git LFS
Tracking large game assets with Git LFSTim Pettersen
 
Composer the right way [SweetlakePHP]
Composer the right way [SweetlakePHP]Composer the right way [SweetlakePHP]
Composer the right way [SweetlakePHP]Rafael Dohms
 

Mais procurados (20)

Mojolicious and REST
Mojolicious and RESTMojolicious and REST
Mojolicious and REST
 
Composer
ComposerComposer
Composer
 
Beyond Phoenix
Beyond PhoenixBeyond Phoenix
Beyond Phoenix
 
Git introduction
Git introductionGit introduction
Git introduction
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from Data
 
Composer 經典食譜
Composer 經典食譜Composer 經典食譜
Composer 經典食譜
 
Jedi Mind Tricks for Git
Jedi Mind Tricks for GitJedi Mind Tricks for Git
Jedi Mind Tricks for Git
 
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
 
Java 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature ListJava 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature List
 
Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)
 
Let the contribution begin
Let the contribution beginLet the contribution begin
Let the contribution begin
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16
 
Jedi Mind Tricks in Git
Jedi Mind Tricks in GitJedi Mind Tricks in Git
Jedi Mind Tricks in Git
 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own Domain
 
Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversPlack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and servers
 
Painless Data Storage with MongoDB & Go
Painless Data Storage with MongoDB & Go Painless Data Storage with MongoDB & Go
Painless Data Storage with MongoDB & Go
 
Composer The Right Way - 010PHP
Composer The Right Way - 010PHPComposer The Right Way - 010PHP
Composer The Right Way - 010PHP
 
Web backends development using Python
Web backends development using PythonWeb backends development using Python
Web backends development using Python
 
Tracking large game assets with Git LFS
Tracking large game assets with Git LFSTracking large game assets with Git LFS
Tracking large game assets with Git LFS
 
Composer the right way [SweetlakePHP]
Composer the right way [SweetlakePHP]Composer the right way [SweetlakePHP]
Composer the right way [SweetlakePHP]
 

Destaque

Project kwaliteit en implementatie van vraagsturing
Project kwaliteit en implementatie van vraagsturingProject kwaliteit en implementatie van vraagsturing
Project kwaliteit en implementatie van vraagsturingJacqueline Neijenhuis
 
Novedades en Symfony 2.3
Novedades en Symfony 2.3Novedades en Symfony 2.3
Novedades en Symfony 2.3Javier López
 
Young, phillip open source nos
Young, phillip open source nosYoung, phillip open source nos
Young, phillip open source nosphillip83
 
C:\Fakepath\Denis Keenan Rvr Presentation July 2010
C:\Fakepath\Denis Keenan Rvr Presentation July 2010C:\Fakepath\Denis Keenan Rvr Presentation July 2010
C:\Fakepath\Denis Keenan Rvr Presentation July 2010Steph Czaplinska
 
Slides components en
Slides components enSlides components en
Slides components enJavier López
 
D:\投資大師羅傑斯給寶貝女兒的12封信讀後感
D:\投資大師羅傑斯給寶貝女兒的12封信讀後感D:\投資大師羅傑斯給寶貝女兒的12封信讀後感
D:\投資大師羅傑斯給寶貝女兒的12封信讀後感建松 廖
 

Destaque (6)

Project kwaliteit en implementatie van vraagsturing
Project kwaliteit en implementatie van vraagsturingProject kwaliteit en implementatie van vraagsturing
Project kwaliteit en implementatie van vraagsturing
 
Novedades en Symfony 2.3
Novedades en Symfony 2.3Novedades en Symfony 2.3
Novedades en Symfony 2.3
 
Young, phillip open source nos
Young, phillip open source nosYoung, phillip open source nos
Young, phillip open source nos
 
C:\Fakepath\Denis Keenan Rvr Presentation July 2010
C:\Fakepath\Denis Keenan Rvr Presentation July 2010C:\Fakepath\Denis Keenan Rvr Presentation July 2010
C:\Fakepath\Denis Keenan Rvr Presentation July 2010
 
Slides components en
Slides components enSlides components en
Slides components en
 
D:\投資大師羅傑斯給寶貝女兒的12封信讀後感
D:\投資大師羅傑斯給寶貝女兒的12封信讀後感D:\投資大師羅傑斯給寶貝女兒的12封信讀後感
D:\投資大師羅傑斯給寶貝女兒的12封信讀後感
 

Semelhante a Shifting gears with Composer

Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?Kirill Chebunin
 
Composer - The missing package manager for PHP
Composer - The missing package manager for PHPComposer - The missing package manager for PHP
Composer - The missing package manager for PHPTareq Hasan
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Rafael Dohms
 
Composer the right way
Composer the right wayComposer the right way
Composer the right wayRafael Dohms
 
Composer: putting dependencies on the score
Composer: putting dependencies on the scoreComposer: putting dependencies on the score
Composer: putting dependencies on the scoreRafael Dohms
 
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享elevenma
 
Composer for busy developers - DPC13
Composer for busy developers - DPC13Composer for busy developers - DPC13
Composer for busy developers - DPC13Rafael Dohms
 
How to deploy PHP projects with docker
How to deploy PHP projects with dockerHow to deploy PHP projects with docker
How to deploy PHP projects with dockerRuoshi Ling
 
Composer The Right Way
Composer The Right WayComposer The Right Way
Composer The Right WayRafael Dohms
 
Composer the right way - DPC15
Composer the right way - DPC15Composer the right way - DPC15
Composer the right way - DPC15Rafael Dohms
 
Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15Rafael Dohms
 
Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL John Anderson
 
Composer the right way - NomadPHP
Composer the right way - NomadPHPComposer the right way - NomadPHP
Composer the right way - NomadPHPRafael Dohms
 
Linecook - A Chef Alternative
Linecook - A Chef AlternativeLinecook - A Chef Alternative
Linecook - A Chef Alternativethinkerbot
 
Steam Learn: Composer
Steam Learn: ComposerSteam Learn: Composer
Steam Learn: Composerinovia
 

Semelhante a Shifting gears with Composer (20)

Mastering composer
Mastering composerMastering composer
Mastering composer
 
Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?
 
Composer
ComposerComposer
Composer
 
Composer - The missing package manager for PHP
Composer - The missing package manager for PHPComposer - The missing package manager for PHP
Composer - The missing package manager for PHP
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13
 
Composer the right way
Composer the right wayComposer the right way
Composer the right way
 
Composer: putting dependencies on the score
Composer: putting dependencies on the scoreComposer: putting dependencies on the score
Composer: putting dependencies on the score
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
 
Composer for busy developers - DPC13
Composer for busy developers - DPC13Composer for busy developers - DPC13
Composer for busy developers - DPC13
 
How to deploy PHP projects with docker
How to deploy PHP projects with dockerHow to deploy PHP projects with docker
How to deploy PHP projects with docker
 
Composer The Right Way
Composer The Right WayComposer The Right Way
Composer The Right Way
 
Composer the right way - DPC15
Composer the right way - DPC15Composer the right way - DPC15
Composer the right way - DPC15
 
Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15
 
Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL
 
Composer the right way - NomadPHP
Composer the right way - NomadPHPComposer the right way - NomadPHP
Composer the right way - NomadPHP
 
Linecook - A Chef Alternative
Linecook - A Chef AlternativeLinecook - A Chef Alternative
Linecook - A Chef Alternative
 
Transforming WebSockets
Transforming WebSocketsTransforming WebSockets
Transforming WebSockets
 
Steam Learn: Composer
Steam Learn: ComposerSteam Learn: Composer
Steam Learn: Composer
 
Os Treat
Os TreatOs Treat
Os Treat
 

Mais de Javier López

Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP applicationJavier López
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.Javier López
 
Slides changes symfony23
Slides changes symfony23Slides changes symfony23
Slides changes symfony23Javier López
 
Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2Javier López
 
Symfony y Admin Generator
Symfony y Admin GeneratorSymfony y Admin Generator
Symfony y Admin GeneratorJavier López
 

Mais de Javier López (7)

Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
 
PHP's FIG and PSRs
PHP's FIG and PSRsPHP's FIG and PSRs
PHP's FIG and PSRs
 
Slides changes symfony23
Slides changes symfony23Slides changes symfony23
Slides changes symfony23
 
Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2
 
Slides componentes
Slides componentesSlides componentes
Slides componentes
 
Symfony y Admin Generator
Symfony y Admin GeneratorSymfony y Admin Generator
Symfony y Admin Generator
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Shifting gears with Composer

  • 1. Shifting gears with Composer Javier Lopez (@loalf)
  • 3. Who am I? • I am from Spain
  • 4. Who am I? • I am from Spain • I live in London
  • 5. Who am I? • I am from Spain • I live in London • I work for IPC Media
  • 6. Who am I? • I am from Spain • I live in London • I work for IPC Media • I tweet as @loalf
  • 7. Who am I? • I am from Spain • I live in London • I work for IPC Media • I tweet as @loalf • I co-organize DeSymfony (www.desymfony.com)
  • 8. Who am I? • I am from Spain • I live in London • I work for IPC Media • I tweet as @loalf • I co-organize DeSymfony (www.desymfony.com) Still want to know more? http://www.linkedin.com/in/loalf
  • 15. Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.
  • 16.
  • 17. Is it a new concept?
  • 18. Is it a new concept? Nope.
  • 19. Is it a new concept? Nope. Node Package Manager
  • 20. Is it a new concept? Nope. Node Package Manager Ruby Package Manager
  • 21.
  • 23. But, what about PEAR? • You have to install it in all the system
  • 24. But, what about PEAR? • You have to install it in all the system • You can´t see the source code
  • 25. But, what about PEAR? • You have to install it in all the system • You can´t see the source code • Don´t allow different repository sources
  • 26. But, what about PEAR? • You have to install it in all the system • You can´t see the source code • Don´t allow different repository sources • Composer is compatible with PEAR, :)
  • 27.
  • 30. Installing Composer (locally) mkdir myprojectname cd myprojectname
  • 31. Installing Composer (locally) mkdir myprojectname cd myprojectname curl -s https://getcomposer.org/installer | php
  • 32. Installing Composer (locally) mkdir myprojectname cd myprojectname curl -s https://getcomposer.org/installer | php Done!
  • 33. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 34. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 35. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 36. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 37. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 38. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 39. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 40. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 41. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 42. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 43. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 44. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 45. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 46. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 47. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 48. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 49. // composer.json { "require" : { "monolog/monolog" : "1.0.*", "symfony/translation" : "2.1.0-RC1", "behat/behat" : ">2.3.5,<2.4", "fabpot/goutte" : "dev-master" }, "minimum-stability": "dev" }
  • 51. Installing dependencies - Installing guzzle/parser (v2.8.4) Downloading: 100% - Installing symfony/event-dispatcher (dev-master) Cloning v2.1.0-BETA4 - Installing guzzle/common (v2.8.4) Downloading: 100% - Installing guzzle/http (v2.8.4) Downloading: 100% - Installing symfony/process (dev-master) Cloning v2.1.0-RC1 - Installing symfony/finder (dev-master) Cloning 1af11ab3a686f9c45f2a8d9d721d5717cdd5f1d6
  • 52. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 53. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 54. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 55. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 56. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 57. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 58. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 59. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 60. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 61. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 62. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 63. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 64. !"" composer.json !"" composer.lock #"" vendor !"" autoload.php !"" behat !"" bin !"" composer !"" fabpot !"" guzzle !"" monolog #"" symfony
  • 65. http://www.packagist.org http://www.flickr.com/photos/jayshep5/5792259218/
  • 68. // composer.josn { "name": "monolog/monolog", "require": { "php": ">=5.3.0" }, }
  • 69. // composer.josn { "name": "monolog/monolog", "require": { "php": ">=5.3.0" }, }
  • 70. // composer.josn { "name": "monolog/monolog", "require": { "php": ">=5.3.0" }, }
  • 71. // composer.josn { "name": "monolog/monolog", "require": { "php": ">=5.3.0" }, }
  • 72. // composer.josn { "name": "monolog/monolog", "require": { "php": ">=5.3.0" }, }
  • 73. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 74. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 75. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 76. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 77. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 78. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 79. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 80. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 81. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 82. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 83. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 84. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 85. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 86. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 87. // composer.josn { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 5.3", "keywords": ["log","logging"], "homepage": "http://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=5.3.0" }, "autoload": { "psr-0": { "Monolog": "src" } } }
  • 88. // composer.josn { "name": "monolog/monolog", [ ... ] "autoload": { "psr-0": { "Monolog": ["src", "lib"] } } }
  • 89. // composer.josn { "name": "monolog/monolog", [ ... ] "autoload": { "classmap": ["src", "lib"] } }
  • 90. // composer.josn { "name": "monolog/monolog", [ ... ] "autoload": { "files": "src/myfunctions.php" } }
  • 91.
  • 92. Excuse #1 I need to use a patched version of Symfony
  • 93. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 94. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 95. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 96. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 97. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 98. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 99. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 100. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 101. // composer.json { "repositories": [ { "type" : "cvs", "url" : "http://github.com/loalf/symfony" } ], "require": { "symfony/symfony" : "dev-patch2" } }
  • 102. Excuse #2 Some dependecies are in my own private SVN repo
  • 103. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 104. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 105. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 106. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 107. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 108. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 109. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 110. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 111. // composer.json { "repositories": [ { "type" : "cvs", "url" : "svn://company.com/lib" } ], "require": { "company/lib" : "1.2.1" } }
  • 112. Excuse #3 I am using PEAR, you said I could use PEAR
  • 113. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 114. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 115. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 116. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 117. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 118. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 119. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 120. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 121. // composer.json { "repositories": [ { "type" : "pear", "url" : "http://pear2.php.net" } ], "require": { "pear-pear2/PEAR2_HTTP_Request" : "*" } }
  • 122. Excuse #4 My origin doesn´t have a composer.json file
  • 123. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 124. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 125. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 126. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 127. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 128. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 129. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 130. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 131. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 132. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 133. // composer.json { "repositories" : [ { "type": "package", "package": { "name": "jquery/jquery", "version": "1.7.2", "dist": { "url": "http://code.jquery.com/jquery-1.7.2.js", "type": "file" } } } ], "require" : { "jquery/jquery" : "1.7.2" } }
  • 134. Excuse #5 I need a private package repository, but Packagist is too demanding
  • 136. Reasons to composer
  • 137. 1200 250 watchs forks
  • 138.
  • 139.
  • 140. 2703 2418 2703 1881 packages 1447 1004 692 478 347 204 139 2011-09 48 2011-11 2012-01 2012-03 2012-05 2012-07 7
  • 141. 2703 2418 2703 1881 packages 1447 1004 692 478 347 287 204 139 2011-09 48 2011-11 2012-01 2012-03 2012-05 2012-07 7 588
  • 142. +2.5 mill packages installed since 2012-04-13
  • 143.
  • 148. Thanks! Questions? Javier Lopez (@loalf)