title: Setting up ServiceManager with configuration files in Zend Framework 2
body: <p>I have read ZF documentation about ServiceManager and think configuration (even in "config" php files) like </p>
  
  <pre><code>public function getServiceConfig()
    {
      return array(
        'invokables' =&gt; array(
          'my-foo' =&gt; 'MyModule\Foo\Bar',
        ),
      );
    }
  </code></pre>
  
  <p>is very long and verbose. And, if I have a lot of dependencies, I want to use some sort of automatic code-geneation for this task.</p>
  
  <p>In Symfony, I can to just write YAML configs like this:</p>
  
  <pre><code>parameters:
      mailer.transport: sendmail
  
  services:
      mailer:
          class:     Mailer
          arguments: ["%mailer.transport%"]
      newsletter_manager:
          class:     NewsletterManager
          calls:
              - [setMailer, ["@mailer"]]
  </code></pre>
  
  <p>And it automatically compiles to PHP code by Symfony. Are there some solution to do similar work for ZF2? I don't think everybody writes tones of DI code instead of real work.</p>