title: Yii2 - DI injection via method signature
body: <p>I try to implement controller action injection in Yii2 Framework (version 2.0.15). Here is my code for controller action:</p>
  
  <pre><code>public function actionTerms(Affiliate $affiliate)
  {
      // action code
  }
  </code></pre>
  
  <p>Register a dependency in common/components/config/bootstrap.php</p>
  
  <pre><code>$container = Yii::$container;
  $container-&gt;set('\common\components\Affiliate', '\common\components\Affiliate');
  </code></pre>
  
  <p>As as result I get error message:</p>
  
  <pre><code>Missing required parameters: affiliate
  </code></pre>
  
  <p>How to solve this?</p>