title: Access parameter from the Command Class
body: <p>I am adding a new command line.
  I would like to have access to the value of a parameter (parameters.yml) in my Class.</p>
  
  <p>I read that i should add this class as a service to have access to the parameter. So</p>
  
  <p>//config.yml</p>
  
  <pre><code>imports:
  - { resource: services.yml }
  </code></pre>
  
  <p>//services.yml</p>
  
  <pre><code>services:
    less_css_compiler:
      class: MyVendor\MyBundle\Command\ThemeCommand
      arguments: [%less_compiler%]
  </code></pre>
  
  <p>//parameters.yml</p>
  
  <pre><code>parameters:
      less_compiler:     WinLess.exe
  </code></pre>
  
  <p>it is said that normaly the argument is in the constructor of the class but if  I do this :</p>
  
  <pre><code>public function __construct($less_compiler) {
      $this-&gt;less_compiler = $less_compiler;
  }
  </code></pre>
  
  <p>I have a warning saying that the first argument is missing. In the Command mother class there is a name as then unique argument of the constructor but even though I write :</p>
  
  <pre><code> public function __construct($name, $less_compiler) {
   }
  </code></pre>
  
  <p>It does not change anything..</p>
  
  <p>Other possibility is to call the service inside my class :</p>
  
  <pre><code>$service = $this-&gt;getContainer()-&gt;get('less_css_compiler');
  </code></pre>
  
  <p>But how do I get the argument ?</p>
  
  <p>Thank you</p>