Example App Setup for Training/Workshops
Latest commit bc705aa Apr 12, 2012 @beberlei Update Composer
Failed to load latest commit information.
data Add car image (o_O) Feb 1, 2012
lib Move code around Apr 11, 2012
tests Add base object with __call() to simplify and fasten coding. Feb 2, 2012
README.md Update README.md with Installation hints Apr 12, 2012
bootstrap.php Bugfixes Feb 2, 2012
composer.json Initial Doctrine Example Sandbox Jan 30, 2012
composer.lock Initial Doctrine Example Sandbox Jan 30, 2012
config.yml-dist Host in Mysql config Feb 2, 2012
console Initial Doctrine Example Sandbox Jan 30, 2012
phpunit.xml Initial Doctrine Example Sandbox Jan 30, 2012


Doctrine Example App


  1. git clone https://github.com/beberlei/doctrine-example-app.git
  2. Call "php bin/composer.phar install"
  3. Copy config.yml-dist in config.yml
  4. Configure config.yml MySQL/PgSQL/SQLite


A simple CarDealer example to show various mapping scenarios and Doctrine features.

It runs completly on the command-line and integrates an SQL toolbar that shows queries whenever they are executed.

You can write new commands by extending a simple class:

namespace CarDealer\Basic;

use Doctrine\ORM\EntityManager;
use CarFramework\ConsoleScenario;

class VehicleScenario extends ConsoleScenario
    public function play(EntityManager $entityManager, array $args)
        // your testcode here

Command names are automatically detected from the namespace+class name, however they are just simple Symfony Console commands. You can extend the configure method. See the docs for more information: http://symfony.com/doc/2.0/components/console.html

To run a console command just call to see the help and a list of all the commands

bash> php console

Also there is a sample scenario:

bash> php console example:basic:vehicle

To shup the SQL Logging messages up just run with the -q flag.

bash> php console example:basic:vehicle -q


Just clone this repository then call composer to grab all the dependencies:

php bin/composer.phar install