Use short-array syntax on "tools" directory
This commit is contained in:
parent
6af1d2843f
commit
1d5e16e9d9
@ -19,7 +19,7 @@ $debug = true;
|
||||
$config = new \Doctrine\ORM\Configuration();
|
||||
|
||||
// Set up Metadata Drivers
|
||||
$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__ . "/Entities"));
|
||||
$driverImpl = $config->newDefaultAnnotationDriver([__DIR__ . "/Entities"]);
|
||||
$config->setMetadataDriverImpl($driverImpl);
|
||||
|
||||
// Set up caches, depending on $debug variable.
|
||||
@ -33,10 +33,10 @@ $config->setProxyDir(__DIR__ . '/Proxies');
|
||||
$config->setProxyNamespace('Proxies');
|
||||
|
||||
// Database connection information
|
||||
$connectionOptions = array(
|
||||
$connectionOptions = [
|
||||
'driver' => 'pdo_sqlite',
|
||||
'path' => 'database.sqlite'
|
||||
);
|
||||
];
|
||||
|
||||
// Enable second-level cache
|
||||
$cacheConfig = new \Doctrine\ORM\Cache\CacheConfiguration();
|
||||
|
@ -5,12 +5,15 @@ $em = require_once __DIR__.'/bootstrap.php';
|
||||
$cli = new \Symfony\Component\Console\Application('Doctrine Command Line Interface', Doctrine\Common\Version::VERSION);
|
||||
$cli->setCatchExceptions(true);
|
||||
|
||||
$cli->setHelperSet(new Symfony\Component\Console\Helper\HelperSet(array(
|
||||
$cli->setHelperSet(new Symfony\Component\Console\Helper\HelperSet(
|
||||
[
|
||||
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
|
||||
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
|
||||
)));
|
||||
]
|
||||
));
|
||||
|
||||
$cli->addCommands(array(
|
||||
$cli->addCommands(
|
||||
[
|
||||
// DBAL Commands
|
||||
new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(),
|
||||
new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(),
|
||||
@ -34,5 +37,6 @@ $cli->addCommands(array(
|
||||
new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(),
|
||||
new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(),
|
||||
|
||||
));
|
||||
]
|
||||
);
|
||||
$cli->run();
|
||||
|
Loading…
x
Reference in New Issue
Block a user