By Joseph Lowery

Watch: PHP Dependencies Made Easy with Composer

By Joseph Lowery

Ever see that commercial where the couple is sitting down to enjoy an on-demand movie and they’re suddenly inundated in a sea of movie boxes?

If you’re a PHP developer, chances are you’ve had that same feeling (minus the videos bopping your noggin) as you try to work with the wide variety of code libraries available. Save yourself by incorporating Composer, a robust dependency manager for PHP. In this short screencast, Joe Lowery will show you how to get up and running with Composer—along with its companion service, Packagist—and become a more efficient coder, rising with the tide of all those cool PHP frameworks and libraries rather than drowning in them.

Links mentioned in the tutorial include:

Composer, ahoy!

Loading the player…

  • baohx

    Little heavy on the sudo-ing, but good explanation. I believe the only sudo necessary would have been moving composer.phar to /usr/local/bin

    • Joe Lowery

      Thanks for the kind words, but, yeah, it’s a bit overkill. However, in my defense it does cover everyone’s permissions status. Next time, I’ll be sure to mention it’s optional throughout. Appreciate the thought!

      • Karey Black

        This year I have made 72,000 dollars so far with my pc and I am a university student . I am linked with a business entity that outsource online jobs . I heard about it previous year and now I have made a great cash . It is very friendly to it’s users and I am just so happy to have that option …..

  • Hello Joey! :)

    Well played.

    One suggestion: Can you make the key links part of the article instead of only in the video.


    • Joe Lowery

      Great idea! I’m on it and it should be posted soon.

      • Joe Lowery

        Links are up! I’ll be sure to include them from the get-go on future screencasts.

  • p.s. Is the autoload.php a true autoload (i.e., it only loads a class as it’s requested) or is more like auto require / auto-include?

    • Joe Lowery

      If I understand what you’re asking, you can actually use it either way. You can detail your classes one-by-one or you can use the PSR-4 technique by specifying a namespace which will handle all the classes in a dedicated directory. Perhaps a topic for another screencast?

      • Rebecca Shetler

        So far this year I have earned 68,000 dollars with my pc and I am a college student . I am connected with a business entity that outsource online jobs . I heard about it last year and I have made such great cash . It is great and I am just so happy to have that option ……. Look here for details …

      • That would be a great idea.

        • Joe Lowery

          Cool. I’ll run it up the flagpole and see if anyone salutes (and a happy Veteran’s Day to all, especially my dad :)

  • Awesome video! It really caught me even I already master composer.

    • Joe Lowery

      Thanks much, Tomáš! Always good to hear from a master :D

Get the latest in PHP, once a week, for free.