Wonderful World of Composer

You're 0% through this course - get started!

Welcome to the wonderful world of Composer - the Dependency Manager for PHP!

In this Screencast, you'll learn how to install and configure Composer and use it to integrate third-party libraries into any PHP project (even something like Wordpress!). This includes:

  • How Composer makes sharing awesome again
  • Downloading the composer.phar file
  • Creating the composer.json file
  • Installing the external libraries
  • Handling autoloading
  • Understanding the composer.lock file
  • The update versus install command
  • The require command
  • Storing in version control

Let's go!


Your Guides

Ryan Weaver Leanna Pelham

Questions? Conversation?

  • 2014-10-08 Thomas Beauvais

    Great job! This is an excellent place for anyone to start! Thanks!

  • 2014-10-02 Daniel

    This is the best guide of composer in the web

  • 2014-10-01 weaverryan

    Hey Rachel!

    No worries :) - you have 2 options:

    1) The second code block on the download page - https://getcomposer.org/downlo... - shows an option that *doesn't* use curl. This may work for you!

    2) Since composer is just a single file (composer.phar), you can just upload this to your web server. You could even commit it to your version control repository - It's generally not considered a best practice, but it's no big deal.

    Good luck!

  • 2014-10-01 Rachel

    Confused noob here. I installed composer on my local machine but I cannot figure out how to install it on my web server. I do not have curl. Can anyone help? I'm trying to use a MailChimp plugin that requires composer

  • 2014-08-08 weaverryan

    Hey Edison!

    Oh man, *great* question! I realize that I didn't put very good comments on that file in the script :). I've just made some changes to show you were this is (https://github.com/knpuniversi... - you should already see these deployed! Basically, I'm putting things into a custom module called `list_files` that I already created and enabled before the tutorial.

    I hope that helps! And good luck with the tutorials - ping me if you need anything!

    Cheers!

  • 2014-08-08 Edison Valdez

    Great Job, I´m planning following all your Symfony2 tutorials!
    Although I have a question:
    WHere does lives the "list_files.module" file... ? I´ve searched through all the drupal directories and files and Couldn´t find it :)

  • 2014-06-13 weaverryan

    Thanks so much Matthew, this means a lot coming from you :)

  • 2014-06-12 Matthew Weier O'Phinney

    I'll be linking folks to this regularly when they have questions on Composer -- really nice work!

  • 2014-06-10 SymfonyMexico

    Great video

  • 2014-05-20 kendoctor

    very appreciated. you're a amzaing guy.

  • 2014-04-08 Tanvir Ahmad

    This is really good stuff for beginners. Thanks

  • 2014-02-17 Ivo Lukač

    Great stuff!

  • 2013-12-22 Yannick ANSQUER

    Very helpful tutorial. Nice job !

  • 2013-06-23 Quentin Pleplé

    Great video. I was always confused by the behavior of composer install and composer update. Thanks!