]> Raphaël G. Git Repositories - blogbundle/blob - Resources/config/packages/rapsys_blog.yaml
Fix default bind ciphersuites and options
[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 address: 'blog@rapsys.eu'
6 name: 'Raphaël Gertz'
7 copy:
8 by: 'Rapsys'
9 link: 'https://rapsys.eu'
10 long: 'All rights reserved'
11 short: 'Copyright 2019-2023'
12 title: 'By Raphaël'
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 alt: 'Rapsys'' dev log logo'
62 png: '@RapsysBlog/png/logo.png'
63 svg: '@RapsysBlog/svg/logo.svg'
64 root: 'rapsys_blog'
65 title: 'Rapsys'' dev log'
66
67 #RapsysUser configuration
68 rapsys_user:
69 #Class replacement
70 class:
71 group: 'Rapsys\BlogBundle\Entity\Group'
72 civility: 'Rapsys\BlogBundle\Entity\Civility'
73 user: 'Rapsys\BlogBundle\Entity\User'
74 #Default replacement
75 default:
76 admin: 'ROLE_ADMIN'
77 civility: 'Mister'
78 group: [ 'User' ]
79 #Route replacement
80 route:
81 index:
82 name: 'rapsys_blog'
83 register:
84 name: 'rapsys_user_register'
85 #Translate replacement
86 translate: [ 'title', 'password', 'copy.by', 'copy.long', 'copy.short', 'copy.title', 'head.logo.alt', 'head.site' ]
87 #Languages replacement
88 languages: '%rapsys_blog.languages%'
89 #Contact replacement
90 contact: '%rapsys_blog.contact%'
91 #Context replacement
92 context:
93 copy: '%rapsys_blog.copy%'
94 head:
95 icon: '%rapsys_blog.icon%'
96 logo: '%rapsys_blog.logo%'
97 root: '%rapsys_blog.root%'
98 site: '%rapsys_blog.title%'
99 #Edit replacement
100 edit:
101 admin:
102 mail: true
103 slug: true
104 route:
105 index: 'root'
106 view:
107 edit: 'Rapsys\BlogBundle\Form\EditType'
108 name: '@RapsysBlog/form/edit.html.twig'
109 context:
110 title: 'Modify account'
111 password: 'Modify password'
112 #Index replacement
113 index:
114 route:
115 index: 'root'
116 view:
117 name: '@RapsysBlog/user/index.html.twig'
118 context:
119 title: 'User list'
120 #Login replacement
121 login:
122 route:
123 index: 'root'
124 view:
125 name: '@RapsysBlog/form/login.html.twig'
126 context:
127 title: 'Login'
128 #Recover replacement
129 recover:
130 route:
131 index: 'root'
132 recover: 'recover_url'
133 view:
134 name: '@RapsysBlog/form/recover.html.twig'
135 context:
136 title: 'Recover'
137 mail:
138 subject: 'Welcome back %%recipient_name%% to %%head.site%%'
139 html: '@RapsysBlog/mail/recover.html.twig'
140 text: '@RapsysBlog/mail/recover.text.twig'
141 context:
142 #Register replacement
143 register:
144 field:
145 pseudonym: false
146 slug: false
147 route:
148 index: 'root'
149 confirm: 'confirm_url'
150 view:
151 form: 'Rapsys\BlogBundle\Form\RegisterType'
152 name: '@RapsysBlog/form/register.html.twig'
153 context:
154 title: 'Register'
155 mail:
156 subject: 'Welcome %%recipient_name%% to %%head.site%%'
157 html: '@RapsysBlog/mail/register.html.twig'
158 text: '@RapsysBlog/mail/register.text.twig'
159 context:
160
161 # Doctrine configuration
162 doctrine:
163 # Dbal configuration
164 dbal:
165 charset: 'utf8mb4'
166 default_table_options:
167 charset: 'utf8mb4'
168 collate: 'utf8mb4_unicode_ci'
169 # Orm configuration
170 orm:
171 # Replace repository factory
172 repository_factory: 'Rapsys\BlogBundle\Factory\RepositoryFactory'
173
174 #Force resolution of UserBundle entities to BlogBundle one
175 #XXX: without these lines, relations are lookup in parent namespace ignoring BlogBundle extension
176 resolve_target_entities:
177 Rapsys\UserBundle\Entity\Group: 'Rapsys\BlogBundle\Entity\Group'
178 Rapsys\UserBundle\Entity\Civility: 'Rapsys\BlogBundle\Entity\Civility'
179 Rapsys\UserBundle\Entity\User: 'Rapsys\BlogBundle\Entity\User'
180
181 # Framework configuration
182 framework:
183 default_locale: '%rapsys_blog.locale%'
184 disallow_search_engine_index: false
185 #error_controller: 'Rapsys\BlogBundle\Controller\ErrorController::show'
186 mailer:
187 headers:
188 X-Originating-IP: '%env(REMOTE_ADDR)%'
189 secret: '%env(APP_SECRET)%'
190 csrf_protection: true
191 session:
192 enabled: true
193 handler_id: ~
194 storage_factory_id: 'session.storage.factory.native'
195 cookie_secure: 'auto'
196 cookie_samesite: 'lax'
197 translator:
198 fallbacks: '%rapsys_blog.locales%'
199
200 # Security configuration
201 security:
202 # Set password hashers
203 password_hashers:
204 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
205 #TODO: see https://symfony.com/doc/current/security/passwords.html (sodium ? + upgrade)
206 Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
207 #Rapsys\BlogBundle\Entity\User:
208 algorithm: 'sodium'
209 migrate_from:
210 - 'bcrypt'
211 - 'plaintext'
212
213 # Set providers
214 providers:
215 database:
216 entity:
217 class: Rapsys\BlogBundle\Entity\User
218 property: mail
219
220 # Set firewall
221 firewalls:
222 # Disables authentication for assets and the profiler, adapt it according to your needs
223 dev:
224 pattern: ^/(_(profiler|wdt)|css|images|js)/
225 security: false
226
227 main:
228 # Allow anonymous access
229 #anonymous: ~
230 #lazy: true
231
232 # Activate database provider
233 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
234 provider: database
235
236 # Activate user checker
237 user_checker: 'security.user_checker'
238
239 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
240 #http_basic: ~
241
242 # Set form login
243 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
244 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
245 form_login:
246 # Redirect to referer if different from login route
247 use_referer: true
248 # Login path
249 login_path: rapsys_user_login
250 # Check path
251 check_path: rapsys_user_login
252 # Username parameter
253 username_parameter: 'login[mail]'
254 # Password parameter
255 password_parameter: 'login[password]'
256 # Enable login csrf protection
257 enable_csrf: false
258 # Csrf parameter
259 csrf_parameter: 'login[_token]'
260 # Csrf id
261 csrf_token_id: 'login'
262
263 # Set logout route
264 logout:
265 # Logout route
266 path: rapsys_user_logout
267 # Logout default target
268 target: rapsys_blog
269
270 # Set custom access denied handler
271 #access_denied_handler: Rapsys\BlogBundle\Handler\AccessDeniedHandler
272
273 # Remember me
274 #XXX: see https://symfony.com/doc/current/security/remember_me.html
275 remember_me:
276 # Use APP_SECRET
277 secret: '%kernel.secret%'
278 # Always remember me
279 always_remember_me: true
280
281 # Set role hierarchy
282 role_hierarchy:
283 ROLE_USER: [ 'ROLE_GUEST' ]
284 ROLE_ADMIN: [ 'ROLE_GUEST', 'ROLE_USER' ]
285
286 #Service configuration
287 services:
288 #Register abstract controller
289 Rapsys\BlogBundle\Controller\AbstractController:
290 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', '@security.helper', '@request_stack', '@translator', '@twig' ]
291 tags: [ 'controller.service_arguments' ]
292 #Register article controller
293 Rapsys\BlogBundle\Controller\ArticleController:
294 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', '@security.helper', '@request_stack', '@translator', '@twig' ]
295 tags: [ 'controller.service_arguments' ]
296 #Register default controller
297 Rapsys\BlogBundle\Controller\DefaultController:
298 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', '@security.helper', '@request_stack', '@translator', '@twig' ]
299 tags: [ 'controller.service_arguments' ]
300 #Register keyword controller
301 Rapsys\BlogBundle\Controller\KeywordController:
302 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', '@security.helper', '@request_stack', '@translator', '@twig' ]
303 tags: [ 'controller.service_arguments' ]
304 #Register user controller
305 Rapsys\BlogBundle\Controller\UserController:
306 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', '@security.helper', '@request_stack', '@translator', '@twig' ]
307 tags: [ 'controller.service_arguments' ]
308 Rapsys\BlogBundle\Factory\RepositoryFactory:
309 arguments: [ '@request_stack', '@router', '@rapsys_pack.slugger_util', '@translator', '%rapsys_blog.languages%', '%rapsys_blog.locale%' ]
310 #Register blog fixture
311 Rapsys\BlogBundle\Fixture\BlogFixture:
312 arguments: [ '@rapsys_pack.slugger_util' ]
313 tags: [ 'doctrine.fixture.orm' ]
314 #Register form factory as public
315 form.factory:
316 class: 'Symfony\Component\Form\FormFactory'
317 arguments: [ '@form.registry' ]
318 public: true
319 #Register facebook event subscriber
320 Rapsys\PackBundle\Subscriber\FacebookSubscriber:
321 arguments: [ '@router', '%rapsys_blog.locales%' ]
322 tags: [ 'kernel.event_subscriber' ]
323 #Register facebook util service
324 rapsys_blog.facebook_util:
325 class: 'Rapsys\PackBundle\Util\FacebookUtil'
326 #TODO: create the facebook.png file and add the fonts
327 #TODO: add a default font
328 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' } ]
329 public: true
330 #Register contact form type
331 Rapsys\BlogBundle\Form\ContactType:
332 arguments: [ '@rapsys_pack.image_util', '@rapsys_pack.slugger_util', '@translator' ]
333 tags: [ 'form.type' ]
334
335 # Twig configuration
336 twig:
337 #Enforce debug
338 debug: true
339 #auto_reload: ~
340 #Disable cache
341 #XXX: enable forced regeneration of css and js at each page load
342 cache: false
343 #Fix form layout for css
344 #XXX: @RapsysBlog is a shortcut to vendor/rapsys/blogbundle/Resources/views directory here
345 form_theme: [ '@RapsysBlog/form/form_div_layout.html.twig' ]
346 #Set twig paths
347 paths:
348 #Required by email.image(site_logo) directive
349 #XXX: Allow twig to resolve @RapsysBlog/png/logo.png in vendor/rapsys/blogbundle/Resources/public/png/logo.png
350 '%kernel.project_dir%/vendor/rapsys/blogbundle/Resources/public': 'RapsysBlog'