title: PHP install package globally: apt-get vs composer
body: <p>I found there are two options to install PHP package globally in Linux (Ubuntu 16.04):</p>
  
  <ol>
  <li><p>Using <code>composer</code>:</p>
  
  <pre><code>composer global require symfony/finder
  </code></pre>
  
  <p>The package will be located at <code>~/.config/composer/vendor/</code></p>
  
  <p><a href="https://i.stack.imgur.com/tNUPd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tNUPd.jpg" alt="enter image description here"></a></p></li>
  <li><p>Using <code>apt-get</code>:</p>
  
  <pre><code>apt-get install php-symfony-finder
  </code></pre>
  
  <p>The package will be located at <code>/usr/share/php/</code></p>
  
  <p><a href="https://i.stack.imgur.com/KJ2Kn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KJ2Kn.jpg" alt="enter image description here"></a></p>
  
  <p>This directory <code>/usr/share/php/</code> is also in default PHPs <code>include_path</code> (I have PHP 7.2)</p>
  
  <p><a href="https://i.stack.imgur.com/TFnFR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TFnFR.jpg" alt="enter image description here"></a></p></li>
  </ol>
  
  <hr>
  
  <p>There are several questions I have:</p>
  
  <p><strong>Why would I want to install package globally ?</strong></p>
  
  <p>I know it's useful to install php tools globally, like <code>phpunit</code> - It has binary file and it allows you to run tests everywhere, so you don't have to install it in every project.
  But what about <code>symfony/finder</code> for example ? What is particular use of this package installed globally ?</p>
  
  <p><strong>What is the difference between 1 and 2 option ?</strong></p>
  
  <p>Does it have any different use cases or different effects ?</p>