as Assert; use Silex\Provider\ValidatorServiceProvider; use Silex\Provider\TranslationServiceProvider; $app->register(new FormServiceProvider()); $app->register(new ValidatorServiceProvider()); $app->register(new TranslationServiceProvider(), array( 'translator.messages' => array(), )); $app->register(new TwigServiceProvider(), array( 'twig.path' => __DIR__.'/../../views', )); $app->register(new DoctrineServiceProvider(), array( 'dbs.options' => array(array( 'driver' => 'pdo_mysql', 'host' => 'localhost', 'dbname' => getenv('DB_NAME'), 'user' => getenv('DB_USER'), 'password' => getenv('DB_PASSWORD'), 'charset' => 'utf8', )), ));