Speaker: Jordi Boggiano
Slides: http://slides.seld.be/?file=2012-09-28+In-Depth+with+Composer.html#1
- Install/Update work on project deps
- composer installs or updates individual packages
- Last known state
- Newest version, updates lock file.
- Additional repos take priority over the default ones
- Do not change the package name
- forks intelligently adopt current package name
- your branches are available after you add repo config
- "branch name as x.x.x"
- uses version specification as version dependency.
- use satis.json vs composer.json to hide repositories.
- Satis also allows for proxying
{
"name" : "new/name",
"replace":{
"old/name" : "*"
}
}
- Bootstrap
- Loading of the root package
- First install or Update
- Create install requests for the requirements
- on update: force update installed dev packages to latest
- install from lock file
- load lock file as a repository
- create install requests for all its packages
- Creation of the package pool
- Platform repository
composer show --platform
- Local installed repositories
composer show --installed
- Locked respository (install only)
- Custom repositories (project)
- Custom repositories (user level config)
- Packagist
- Dependency Resolution
- Solver + Request + Pool
- Shake until you get a list of operations
- Install/Update/Uninstall
- --prefer-source forces source install (git clone)
- --prefer-dist forces dist install (zip download)
- --dry-run if you are just curious
- --verbose / -v to see more details
- Wrap-up
- Writing lock file (update or first install only)
composer install
- Generating autoloadercomposer dump-autoload --optimize
- post-install-cmd / post-update-cmd scripts fire- don't need scripts?
$ composer install --no-scripts # default symfony app/console
Validate your config
$ composer validate
./composer.json is valid
- Update composer
composer self-update
- Check your setup's settings
curl -s https://getcomposer.org/installer | php -- --check
- Update your deps
composer update -v
- Reinstall your deps
rm -rf vendor/ composer update -v
- Report a bug