1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use App\Entity\User; |
4
|
|
|
|
5
|
|
|
require $app->getConfigurationDir().'/security.php'; |
6
|
|
|
|
7
|
|
|
$app['assets.version'] = 'v1'; |
8
|
|
|
|
9
|
|
|
$app['db.options'] = [ |
10
|
|
|
'driver' => $_SERVER['APP_DATABASE_DRIVER'], |
11
|
|
|
'host' => $_SERVER['APP_DATABASE_HOST'], |
12
|
|
|
'user' => $_SERVER['APP_DATABASE_USER'], |
13
|
|
|
'password' => $_SERVER['APP_DATABASE_PASSWORD'], |
14
|
|
|
'dbname' => $_SERVER['APP_DATABASE_NAME'] |
15
|
|
|
]; |
16
|
|
|
|
17
|
|
|
$app['monolog.logfile'] = $app->getLogDir().'/'.$app->getEnvironment().'.log'; |
|
|
|
|
18
|
|
|
|
19
|
|
|
// https://github.com/dflydev/dflydev-doctrine-orm-service-provider |
20
|
|
|
$app['orm.proxies_dir'] = $app->getCacheDir().'/doctrine/orm/proxies'; |
|
|
|
|
21
|
|
|
$app['orm.em.options'] = [ |
22
|
|
|
'mappings' => [ |
23
|
|
|
[ |
24
|
|
|
'type' => 'annotation', |
25
|
|
|
'namespace' => 'App\Entity', |
26
|
|
|
'path' => $app->getRootDir().'/src/Entity', |
|
|
|
|
27
|
|
|
'use_simple_annotation_reader' => false |
28
|
|
|
] |
29
|
|
|
] |
30
|
|
|
]; |
31
|
|
|
|
32
|
|
|
// https://github.com/awurth/SilexUserBundle |
33
|
|
|
$app['silex_user.options'] = [ |
34
|
|
|
'object_manager' => 'orm.em', |
35
|
|
|
'user_class' => User::class, |
36
|
|
|
'firewall_name' => 'main', |
37
|
|
|
'use_templates' => false, |
38
|
|
|
'use_authentication_listener' => false, |
39
|
|
|
'registration.confirmation.enabled' => false, |
40
|
|
|
'registration.confirmation.from_email' => $_SERVER['APP_MAILER_USER'] |
41
|
|
|
]; |
42
|
|
|
|
43
|
|
|
$app['swiftmailer.options'] = [ |
44
|
|
|
'host' => $_SERVER['APP_MAILER_HOST'], |
45
|
|
|
'port' => $_SERVER['APP_MAILER_PORT'], |
46
|
|
|
'username' => $_SERVER['APP_MAILER_USER'], |
47
|
|
|
'password' => $_SERVER['APP_MAILER_PASSWORD'], |
48
|
|
|
'encryption' => $_SERVER['APP_MAILER_ENCRYPTION'], |
49
|
|
|
'auth_mode' => $_SERVER['APP_MAILER_AUTH_MODE'] |
50
|
|
|
]; |
51
|
|
|
|
52
|
|
|
$app['translator.cache_dir'] = $app->getCacheDir().'/translations'; |
|
|
|
|
53
|
|
|
|
54
|
|
|
$app['twig.options'] = [ |
55
|
|
|
'cache' => $app->getCacheDir().'/twig' |
|
|
|
|
56
|
|
|
]; |
57
|
|
|
|
58
|
|
|
$app['twig.path'] = [ |
59
|
|
|
$app->getRootDir().'/templates' |
|
|
|
|
60
|
|
|
]; |
61
|
|
|
|
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.