Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Master Zend Framework:
The Composer Command-Line Essentials
Nov 29, 2016 @ 16:15:52

The Master Zend Framework site has posted a tutorial that seeks to help you get the most out of Composer on the command line with some essential tips beyond just he basics.

I know that a series on Composer might seem odd. But, as Composer’s been a part of PHP for so long now, I feel that it’s something which most of us take for granted. It’s revolutionised the PHP landscape, making it easier than ever before to build great software in PHP. But do we really know how to get the most out of it. For that reason, I’ve created this series, so that you level up your skills and really get the most from it.

In part one of this series, I’m going to take you through Composer’s command-line. I’ve cherry-picked a key subset of the command-line options, and focused in on key switches, so that you can do more than you already can.

He skips over the basic "require", "install" and "update" handling covered in many other tutorials and instead covers:

  • project creation
  • the "show" command to list installed packages
  • "remove" to drop a package from the current dependencies
  • using "depends" to see package dependencies
  • finding outdates packages with (appropriately) the "outdated" command
  • seeing suggested packages with "suggest"

For each item on the list there's an example of the command, what kind of options is allows and, for some, the output generated as a result.

tagged: composer command line advanced commands tutorial

Link: http://www.masterzendframework.com/series/tooling/composer/command-line-essentials/


Trending Topics: