-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.php
More file actions
27 lines (25 loc) · 848 Bytes
/
dev.php
File metadata and controls
27 lines (25 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require __DIR__ . '/vendor/autoload.php';
\SDAM\Config::current()->configure([
\SDAM\Config::DATABASE => [
'dbname' => 'test',
'user' => 'root',
'password' => 'root',
'host' => 'localhost',
'driver' => 'pdo_mysql',
],
\SDAM\Config::ENTITY_PATH => 'App\Entity',
]);
$maintainer = new \SDAM\Maintainer([], new \SDAM\EntityAdapter\EntityAdapter(__DIR__ . '/example/Entity'));
try {
$maintainer->run();
echo 'Maintainer run';
} catch (\Doctrine\DBAL\DBALException $e) {
echo 'Problem with DBAL doctrine' . $e->getMessage();
} catch (\PhpDocReader\AnnotationException $e) {
echo 'Problem with PhpDocReader' . $e->getMessage();
} catch (ReflectionException $e) {
echo 'Problem with Reflection class' . $e->getMessage();
} catch (Throwable $e) {
echo 'Last Problem' . $e->getMessage();
}