]> Raphaël G. Git Repositories - blogbundle/blob - Resources/config/packages/rapsys_blog.yaml
Cleanup
[blogbundle] / Resources / config / packages / rapsys_blog.yaml
1 # Dev log configuration
2 #TODO: set mail, calendar and facebook app id as env variables ???
3 rapsys_blog:
4 contact:
5 name: 'Raphaël Gertz'
6 mail: 'blog@rapsys.eu'
7 copy:
8 by: 'Rapsys'
9 link: 'https://rapsys.eu'
10 long: 'All rights reserved'
11 short: 'Copyright 2019-2023'
12 title: 'Rapsys'
13 donate: 'https://paypal.me/milongaraphael'
14 facebook:
15 #TODO: set this as env variables ???
16 apps: [ 3728770287223690 ]
17 height: 630
18 width: 1200
19 icon:
20 ico: '@RapsysBlog/ico/icon.ico'
21 png:
22 # Default
23 256: '@RapsysBlog/png/icon.256.png'
24
25 # For google
26 # Chrome for Android home screen icon
27 196: '@RapsysBlog/png/icon.196.png'
28 # Google Developer Web App Manifest Recommendation
29 192: '@RapsysBlog/png/icon.192.png'
30 # Chrome Web Store icon
31 128: '@RapsysBlog/png/icon.128.png'
32
33 # Fallback
34 32: '@RapsysBlog/png/icon.32.png'
35
36 # For apple
37 # XXX: old obsolete format: [57, 72, 76, 114, 120, 144]
38 # XXX: see https://webhint.io/docs/user-guide/hints/hint-apple-touch-icons/
39 # XXX: see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
40 # iPhone Retina
41 180: '@RapsysBlog/png/icon.180.png'
42 # iPad Retina touch icon
43 167: '@RapsysBlog/png/icon.167.png'
44 # iPad touch icon
45 152: '@RapsysBlog/png/icon.152.png'
46 # iOS7
47 120: '@RapsysBlog/png/icon.120.png'
48
49 # For windows
50 # XXX: see https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn255024(v=vs.85)
51 310: '@RapsysBlog/png/icon.310.png'
52 150: '@RapsysBlog/png/icon.150.png'
53 70: '@RapsysBlog/png/icon.70.png'
54 svg: '@RapsysBlog/svg/icon.svg'
55 languages:
56 en_gb: 'English'
57 fr_fr: 'French'
58 locale: 'fr_fr'
59 locales: [ 'fr_fr', 'en_gb' ]
60 logo:
61 png: '@RapsysBlog/png/logo.png'
62 svg: '@RapsysBlog/svg/logo.svg'
63 alt: 'Rapsys'' dev log logo'
64 root: 'rapsys_blog'
65 title: 'Rapsys'' dev log'
66
67 # Doctrine configuration
68 doctrine:
69 # Orm configuration
70 orm:
71 # Replace repository factory
72 repository_factory: 'Rapsys\BlogBundle\Factory\RepositoryFactory'
73
74 #Force resolution of UserBundle entities to BlogBundle one
75 #XXX: without these lines, relations are lookup in parent namespace ignoring BlogBundle extension
76 resolve_target_entities:
77 Rapsys\UserBundle\Entity\Group: 'Rapsys\BlogBundle\Entity\Group'
78 Rapsys\UserBundle\Entity\Civility: 'Rapsys\BlogBundle\Entity\Civility'
79 Rapsys\UserBundle\Entity\User: 'Rapsys\BlogBundle\Entity\User'
80
81 # Framework configuration
82 framework:
83 #TODO: replace in the dependency injection ???
84 default_locale: '%rapsys_blog.locale%'
85 disallow_search_engine_index: false
86 #error_controller: 'Rapsys\BlogBundle\Controller\ErrorController::show'
87 mailer:
88 headers:
89 X-Originating-IP: '%env(REMOTE_ADDR)%'
90 secret: '%env(APP_SECRET)%'
91 session:
92 enabled: true
93 handler_id: ~
94 storage_factory_id: 'session.storage.factory.native'
95 cookie_secure: 'auto'
96 cookie_samesite: 'lax'
97 translator:
98 fallbacks: '%rapsys_blog.locales%'
99
100 # Security configuration
101 security:
102 # Set password hashers
103 password_hashers:
104 #Rapsys\BlogBundle\Entity\User: plaintext
105 Rapsys\BlogBundle\Entity\User:
106 algorithm: 'bcrypt'
107
108 # Set providers
109 providers:
110 database:
111 entity:
112 class: Rapsys\BlogBundle\Entity\User
113 property: mail
114
115 # Set firewall
116 firewalls:
117 # Disables authentication for assets and the profiler, adapt it according to your needs
118 dev:
119 pattern: ^/(_(profiler|wdt)|css|images|js)/
120 security: false
121
122 main:
123 # Allow anonymous access
124 #anonymous: ~
125 #lazy: true
126
127 # Activate database provider
128 provider: database
129
130 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
131 #http_basic: ~
132
133 # Set form login
134 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
135 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
136 form_login:
137 # Redirect to referer if different from login route
138 use_referer: true
139 # Login path
140 login_path: rapsys_user_login
141 # Check path
142 check_path: rapsys_user_login
143 # Username parameter
144 username_parameter: 'login[mail]'
145 # Password parameter
146 password_parameter: 'login[password]'
147
148 # Set logout route
149 logout:
150 # Logout route
151 path: rapsys_user_logout
152 # Logout default target
153 target: rapsys_blog
154
155 # Set custom access denied handler
156 #access_denied_handler: Rapsys\BlogBundle\Handler\AccessDeniedHandler
157
158 # Remember me
159 #XXX: see https://symfony.com/doc/current/security/remember_me.html
160 remember_me:
161 # Use APP_SECRET
162 secret: '%kernel.secret%'
163 # Always remember me
164 always_remember_me: true
165
166 # Set role hierarchy
167 role_hierarchy:
168 ROLE_USER: [ 'ROLE_GUEST' ]
169 ROLE_ADMIN: [ 'ROLE_GUEST', 'ROLE_USER' ]
170
171 #Service configuration
172 services:
173 #Register abstract controller
174 Rapsys\BlogBundle\Controller\AbstractController:
175 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
176 tags: [ 'controller.service_arguments' ]
177 #Register article controller
178 Rapsys\BlogBundle\Controller\ArticleController:
179 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
180 tags: [ 'controller.service_arguments' ]
181 #Register default controller
182 Rapsys\BlogBundle\Controller\DefaultController:
183 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
184 tags: [ 'controller.service_arguments' ]
185 #Register keyword controller
186 Rapsys\BlogBundle\Controller\KeywordController:
187 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
188 tags: [ 'controller.service_arguments' ]
189 Rapsys\BlogBundle\Factory\RepositoryFactory:
190 arguments: [ '@request_stack', '@router', '@rapsys_pack.slugger_util', '@translator', '%rapsys_blog.languages%', '%rapsys_blog.locale%' ]
191 #Register blog fixture
192 Rapsys\BlogBundle\Fixture\BlogFixture:
193 tags: [ 'doctrine.fixture.orm' ]
194 #Register security password_hasher_factory as public
195 #XXX: required for command `php bin/console doctrine:`
196 security.password_hasher_factory:
197 class: 'Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory'
198 arguments: [ { 'Rapsys\BlogBundle\Entity\User': { class: 'Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher', arguments: [ ~, ~, ~, '2y'] } } ]
199 public: true
200 #Register facebook event subscriber
201 Rapsys\PackBundle\Subscriber\FacebookSubscriber:
202 arguments: [ '@router', '%rapsys_blog.locales%' ]
203 tags: [ 'kernel.event_subscriber' ]
204 #Register facebook util service
205 rapsys_blog.facebook_util:
206 class: 'Rapsys\PackBundle\Util\FacebookUtil'
207 #TODO: create the facebook.png file and add the fonts
208 arguments: [ '@router', '%kernel.project_dir%/var/cache', '%rapsys_pack.path%', 'facebook', '%rapsys_blog.path%/png/facebook.png', { irishgrover: '%rapsys_blog.path%/ttf/irishgrover.v10.ttf', labelleaurore: '%rapsys_blog.path%/ttf/labelleaurore.v10.ttf', dejavusans: '%rapsys_blog.path%/ttf/dejavusans.2.37.ttf', droidsans: '%rapsys_blog.path%/ttf/droidsans.regular.ttf' } ]
209 public: true
210
211 # Twig configuration
212 twig:
213 #Enforce debug
214 debug: true
215 #auto_reload: ~
216 #Disable cache
217 #XXX: enable forced regeneration of css and js at each page load
218 cache: false
219 #Set twig paths
220 paths:
221 #Required by email.image(site_logo) directive
222 #XXX: Allow twig to resolve @RapsysBlog/png/logo.png in vendor/rapsys/blogbundle/Resources/public/png/logo.png
223 '%kernel.project_dir%/vendor/rapsys/blogbundle/Resources/public': 'RapsysBlog'