1 # Dev log configuration
2 #TODO: set mail, calendar and facebook app id as env variables ???
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 png: '@RapsysBlog/png/logo.png'
62 svg: '@RapsysBlog/svg/logo.svg'
63 alt: 'Rapsys'' dev log logo'
65 title: 'Rapsys'' dev log'
67 # Doctrine configuration
71 # Replace repository factory
72 repository_factory: 'Rapsys\BlogBundle\Factory\RepositoryFactory'
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'
81 # Framework configuration
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'
89 X-Originating-IP: '%env(REMOTE_ADDR)%'
90 secret: '%env(APP_SECRET)%'
94 storage_factory_id: 'session.storage.factory.native'
96 cookie_samesite: 'lax'
98 fallbacks: '%rapsys_blog.locales%'
100 # Security configuration
102 # Set password hashers
104 #Rapsys\BlogBundle\Entity\User: plaintext
105 Rapsys\BlogBundle\Entity\User:
112 class: Rapsys\BlogBundle\Entity\User
117 # Disables authentication for assets and the profiler, adapt it according to your needs
119 pattern: ^/(_(profiler|wdt)|css|images|js)/
123 # Allow anonymous access
127 # Activate database provider
130 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
134 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
135 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
137 # Redirect to referer if different from login route
140 login_path: rapsys_user_login
142 check_path: rapsys_user_login
144 username_parameter: 'login[mail]'
146 password_parameter: 'login[password]'
151 path: rapsys_user_logout
152 # Logout default target
155 # Set custom access denied handler
156 #access_denied_handler: Rapsys\BlogBundle\Handler\AccessDeniedHandler
159 #XXX: see https://symfony.com/doc/current/security/remember_me.html
162 secret: '%kernel.secret%'
164 always_remember_me: true
168 ROLE_USER: [ 'ROLE_GUEST' ]
169 ROLE_ADMIN: [ 'ROLE_GUEST', 'ROLE_USER' ]
171 #Service configuration
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'] } } ]
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' } ]
217 #XXX: enable forced regeneration of css and js at each page load
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'