-
Notifications
You must be signed in to change notification settings - Fork 0
/
services.yaml
59 lines (53 loc) · 1.67 KB
/
services.yaml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
parameters:
# ...
# mailer.transport: "%kernel.project_dir%"
doctrine.paths: ['./models/entity', './models/repository']
db.host: '%env(DB_HOST)%'
db.name: '%env(DB_DATABASE)%'
db.user: "%env(DB_USER)%"
db.pass: '%env(DB_PASS)%'
services:
manager:
# uses laravel data access object in symphony dependency injection
class: \Illuminate\Database\Capsule\Manager
public: true
#arguments: ['%mailer.transport%']
calls:
- [addConnection,
[
{
driver: 'mysql',
host: '%db.host%',
database: '%db.name%',
username: '%db.user%',
password: '%db.pass%',
charset: 'utf8',
collation: 'utf8_unicode_ci',
prefix: '',
}
]]
- [setAsGlobal,[]]
router:
class: fantomx1\PhanconX1\Router
public: true
# workaround by a factory for
setup:
public: true
class: Doctrine\ORM\Tools\Setup
# factory: ['Doctrine\ORM\Tools\Setup', createAnnotationMetadataConfiguration]
# arguments: [[true, null, null, false]]
entityManager:
# after compile it needs to be class here even when using factory and public if not autowired into a controller
class: 'Doctrine\ORM\EntityManager'
factory: ['Doctrine\ORM\EntityManager', create]
public: true
# how to use DIR [parameter("kernel.project_dir")] outside symfony
arguments: [
{
driver: 'pdo_mysql',
host: '%db.host%',
dbname: '%db.name%',
user: '%db.user%',
password: '%db.pass%'
},
'@=service("setup").createAnnotationMetadataConfiguration(parameter("doctrine.paths"), true, null, null, false)']