11. Before Composer
1. How do you autoload PHP Classes from external libraries
Autoloading is the background machine that makes it possible to reference php classes
without using require or include statements.
2. Dependencies
Dependencies mean another library or libraries to download and configure.
3. Where to store the downloaded library(ies) in the project?
Commit the whole thing or only part of it?
12. Composer is a executable file
https://getcomposer.org/download/
Composer itself is just an executable file
If you see any errors or warnings during
the download step you may need to tweak your
php configuration.
13. You only need to tweak your php configurations
on your development machine since
Composer is not run on production
nor does composer.phar need to be included
in your repo
14. Composer's main job is to download
third party libraries into the
vendor directory of your project
To tell composer the libraries your project
needs, you need to create a
composer.json file
15. We are going to use
Composer to easily bring
Guzzle and
Symfony/finder(time permitting)
into a Drupal project
17. Instead of creating the composer.json file by hand,
we can use a composer command:
php composer.phar init
18. For the first set of questions,
unless you're planning on open-sourcing
your project, you don't have to worry
about your answers.
19. Define Dependencies
Which third party libraries you want to include
in your project
https://packagist.org/packages/guzzlehttp/guzzle
https://packagist.org/packages/symfony/finder
20. A package is just a third party directory that you
want to download into your project
https://packagist.org/
21. Composer is searching for these libraries from
packagist, a giant central repository of packages.
24. New York Office
130 West 42nd Street
New York, NY 10036
Tel: 212-819-1700
Boston Office
470 Atlantic Avenue
Boston, MA 02110
Tel: 617-725-8888
Philadelphia Office
1650 Market Street
Philadelphia, PA 19103
Tel: 215-558-2700
info@northpointdigital.com
/
www.northpointdigital.com
/
@northps
Thank you
Eric Sod
@EricSod
NorthPoint Digital
esod@northpointdigital.com
http://ericsod.net/
https://github.com/esod