title: Propel and Composer in PHP: no connection
body: <p>I've problem in configuring Propel with Composer in my php project.</p>
  <p>this is how appears my tree directory:</p>
  <pre><code>project/
      |--/public_html/index.php
      |--/app/
      |    |--data/
      |    |     |--propel.json
      |    |     |--schema.xml
      |    |--vendor/
      |    |--composer.json
  </code></pre>
  <p>In /data/ folder I would store all my propel files, that is generated-classes/ , generated-conf/ and generated-sql/ .</p>
  <p>To realize this purpose, with a terminal in /data/  folder, I put the commands in the following sequence:</p>
  <pre><code>$ propel sql:build
  $ propel model:build
  $ propel config:convert
  </code></pre>
  <p>and all go right.</p>
  <p>To make more suitable work, in composer.json I've added this extra feature:</p>
  <pre><code>&quot;autoload&quot;: {
      &quot;classmap&quot;: [&quot;./data/generated-classes/&quot;]
  }
  </code></pre>
  <p>so that, almost in theory, putting</p>
  <pre><code>require '../app/vendor/autoload.php';
  </code></pre>
  <p>inside index.php should be enough. Unfortunately, when I try to use one propel classes inside this page, returns the error</p>
  <blockquote>
  <p>Type: Propel\Runtime\Exception\RuntimeException</p>
  <p>Message: No connection defined for database &quot;my_api&quot;. Did you forget to define a connection or is it wrong written?</p>
  <p>File: 'C:\pathToMyProject'\project\app\vendor\propel\propel\src\Propel\Runtime\ServiceContainer\StandardServiceContainer.php</p>
  <p>Line: 279</p>
  </blockquote>
  <p>I thought that propel doesn't find the propel.json file stored in /data/folder.</p>
  <p>As extra, if in index.php I simply add</p>
  <pre><code>require_once  '../app/data/generated-conf/config.php';
  </code></pre>
  <p>all goes right.</p>
  <p>There's a trick to autoload propel without use this last require_once? (obviously keep the tree as is).</p>
  <p>Thanks for reading.</p>