1 # Dev log configuration
2 #TODO: set mail, calendar and facebook app id as env variables ???
5 address: 'blog@rapsys.eu'
9 link: 'https://rapsys.eu'
10 long: 'All rights reserved'
11 short: 'Copyright 2019-2023'
13 donate: 'https://paypal.me/milongaraphael'
15 #TODO: set this as env variables ???
16 apps: [ 3728770287223690 ]
20 ico: '@RapsysBlog/ico/icon.ico'
23 256: '@RapsysBlog/png/icon.256.png'
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'
34 32: '@RapsysBlog/png/icon.32.png'
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
41 180: '@RapsysBlog/png/icon.180.png'
42 # iPad Retina touch icon
43 167: '@RapsysBlog/png/icon.167.png'
45 152: '@RapsysBlog/png/icon.152.png'
47 120: '@RapsysBlog/png/icon.120.png'
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'
59 locales: [ 'fr_fr', 'en_gb' ]
61 alt: 'Rapsys'' dev log logo'
62 png: '@RapsysBlog/png/logo.png'
63 svg: '@RapsysBlog/svg/logo.svg'
65 title: 'Rapsys'' dev log'
67 #RapsysUser configuration
71 group: 'Rapsys\BlogBundle\Entity\Group'
72 civility: 'Rapsys\BlogBundle\Entity\Civility'
73 user: 'Rapsys\BlogBundle\Entity\User'
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%'
90 contact: '%rapsys_blog.contact%'
93 copy: '%rapsys_blog.copy%'
95 icon: '%rapsys_blog.icon%'
96 logo: '%rapsys_blog.logo%'
97 root: '%rapsys_blog.root%'
98 site: '%rapsys_blog.title%'
107 edit: 'Rapsys\BlogBundle\Form\EditType'
108 name: '@RapsysBlog/form/edit.html.twig'
110 title: 'Modify account'
111 password: 'Modify password'
117 name: '@RapsysBlog/user/index.html.twig'
125 name: '@RapsysBlog/form/login.html.twig'
132 recover: 'recover_url'
134 name: '@RapsysBlog/form/recover.html.twig'
138 subject: 'Welcome back %%recipient_name%% to %%head.site%%'
139 html: '@RapsysBlog/mail/recover.html.twig'
140 text: '@RapsysBlog/mail/recover.text.twig'
142 #Register replacement
149 confirm: 'confirm_url'
151 form: 'Rapsys\BlogBundle\Form\RegisterType'
152 name: '@RapsysBlog/form/register.html.twig'
156 subject: 'Welcome %%recipient_name%% to %%head.site%%'
157 html: '@RapsysBlog/mail/register.html.twig'
158 text: '@RapsysBlog/mail/register.text.twig'
161 # Doctrine configuration
165 # Replace repository factory
166 repository_factory: 'Rapsys\BlogBundle\Factory\RepositoryFactory'
168 #Force resolution of UserBundle entities to BlogBundle one
169 #XXX: without these lines, relations are lookup in parent namespace ignoring BlogBundle extension
170 resolve_target_entities:
171 Rapsys\UserBundle\Entity\Group: 'Rapsys\BlogBundle\Entity\Group'
172 Rapsys\UserBundle\Entity\Civility: 'Rapsys\BlogBundle\Entity\Civility'
173 Rapsys\UserBundle\Entity\User: 'Rapsys\BlogBundle\Entity\User'
175 # Framework configuration
177 default_locale: '%rapsys_blog.locale%'
178 disallow_search_engine_index: false
179 #error_controller: 'Rapsys\BlogBundle\Controller\ErrorController::show'
182 X-Originating-IP: '%env(REMOTE_ADDR)%'
183 secret: '%env(APP_SECRET)%'
184 csrf_protection: true
188 storage_factory_id: 'session.storage.factory.native'
189 cookie_secure: 'auto'
190 cookie_samesite: 'lax'
192 fallbacks: '%rapsys_blog.locales%'
194 # Security configuration
196 # Set password hashers
198 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
199 #TODO: see https://symfony.com/doc/current/security/passwords.html (sodium ? + upgrade)
200 Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
201 #Rapsys\BlogBundle\Entity\User:
211 class: Rapsys\BlogBundle\Entity\User
216 # Disables authentication for assets and the profiler, adapt it according to your needs
218 pattern: ^/(_(profiler|wdt)|css|images|js)/
222 # Allow anonymous access
226 # Activate database provider
227 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
230 # Activate user checker
231 user_checker: 'security.user_checker'
233 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
237 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
238 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
240 # Redirect to referer if different from login route
243 login_path: rapsys_user_login
245 check_path: rapsys_user_login
247 username_parameter: 'login[mail]'
249 password_parameter: 'login[password]'
250 # Enable login csrf protection
253 csrf_parameter: 'login[_token]'
255 csrf_token_id: 'login'
260 path: rapsys_user_logout
261 # Logout default target
264 # Set custom access denied handler
265 #access_denied_handler: Rapsys\BlogBundle\Handler\AccessDeniedHandler
268 #XXX: see https://symfony.com/doc/current/security/remember_me.html
271 secret: '%kernel.secret%'
273 always_remember_me: true
277 ROLE_USER: [ 'ROLE_GUEST' ]
278 ROLE_ADMIN: [ 'ROLE_GUEST', 'ROLE_USER' ]
280 #Service configuration
282 #Register abstract controller
283 Rapsys\BlogBundle\Controller\AbstractController:
284 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' ]
285 tags: [ 'controller.service_arguments' ]
286 #Register article controller
287 Rapsys\BlogBundle\Controller\ArticleController:
288 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' ]
289 tags: [ 'controller.service_arguments' ]
290 #Register default controller
291 Rapsys\BlogBundle\Controller\DefaultController:
292 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' ]
293 tags: [ 'controller.service_arguments' ]
294 #Register keyword controller
295 Rapsys\BlogBundle\Controller\KeywordController:
296 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' ]
297 tags: [ 'controller.service_arguments' ]
298 Rapsys\BlogBundle\Factory\RepositoryFactory:
299 arguments: [ '@request_stack', '@router', '@rapsys_pack.slugger_util', '@translator', '%rapsys_blog.languages%', '%rapsys_blog.locale%' ]
300 #Register blog fixture
301 Rapsys\BlogBundle\Fixture\BlogFixture:
302 arguments: [ '@rapsys_pack.slugger_util' ]
303 tags: [ 'doctrine.fixture.orm' ]
304 #Register form factory as public
306 class: 'Symfony\Component\Form\FormFactory'
307 arguments: [ '@form.registry' ]
309 #Register facebook event subscriber
310 Rapsys\PackBundle\Subscriber\FacebookSubscriber:
311 arguments: [ '@router', '%rapsys_blog.locales%' ]
312 tags: [ 'kernel.event_subscriber' ]
313 #Register facebook util service
314 rapsys_blog.facebook_util:
315 class: 'Rapsys\PackBundle\Util\FacebookUtil'
316 #TODO: create the facebook.png file and add the fonts
317 #TODO: add a default font
318 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' } ]
320 #Register contact form type
321 Rapsys\BlogBundle\Form\ContactType:
322 arguments: [ '@rapsys_pack.image_util', '@rapsys_pack.slugger_util', '@translator' ]
323 tags: [ 'form.type' ]
331 #XXX: enable forced regeneration of css and js at each page load
333 #Fix form layout for css
334 #XXX: @RapsysBlog is a shortcut to vendor/rapsys/blogbundle/Resources/views directory here
335 form_theme: [ '@RapsysBlog/form/form_div_layout.html.twig' ]
338 #Required by email.image(site_logo) directive
339 #XXX: Allow twig to resolve @RapsysBlog/png/logo.png in vendor/rapsys/blogbundle/Resources/public/png/logo.png
340 '%kernel.project_dir%/vendor/rapsys/blogbundle/Resources/public': 'RapsysBlog'