]> Raphaël G. Git Repositories - airbundle/blob - Resources/config/packages/rapsys_air.yaml
30f6397410c44b969e4dfda2102e4a466da071d6
[airbundle] / Resources / config / packages / rapsys_air.yaml
1 #RapsysAir configuration
2 rapsys_air:
3 languages:
4 en_gb: 'English'
5 fr_fr: 'French'
6 locale: 'fr_fr'
7 locales: [ 'fr_fr', 'en_gb' ]
8 logo:
9 alt: 'Libre Air logo'
10 title: 'Libre Air'
11
12 #RapsysUser configuration
13 rapsys_user:
14 #Class replacement
15 class:
16 civility: 'Rapsys\AirBundle\Entity\Civility'
17 country: 'Rapsys\AirBundle\Entity\Country'
18 dance: 'Rapsys\AirBundle\Entity\Dance'
19 group: 'Rapsys\AirBundle\Entity\Group'
20 user: 'Rapsys\AirBundle\Entity\User'
21 #Default replacement
22 default:
23 group: [ 'User' ]
24 civility: 'Mister'
25 languages: '%rapsys_air.languages%'
26 locales: '%rapsys_air.locales%'
27 country: 'France'
28 country_favorites: [ 'France', 'Belgium', 'Germany', 'Italy', 'Luxembourg', 'Portugal', 'Spain', 'Switzerland' ]
29 dance_favorites: [ 'Argentine Tango Ball', 'Argentine Tango Ball and class', 'Argentine Tango Ball and concert' ]
30 subscription_favorites: [ 'Milonga Raphaël' ]
31 #Route replacement
32 route:
33 index:
34 name: 'rapsys_air'
35 #Translate replacement
36 translate: [ 'title.page', 'title.section', 'title.site', 'password', 'copy.by', 'copy.long', 'copy.short', 'copy.title', 'logo.alt' ]
37 #Contact replacement
38 contact:
39 address: '%rapsys_air.contact.address%'
40 name: '%rapsys_air.contact.name%'
41 #Context replacement
42 context:
43 copy: '%rapsys_air.copy%'
44 icon: '%rapsys_air.icon%'
45 logo: '%rapsys_air.logo%'
46 root: '%rapsys_air.root%'
47 title:
48 section: 'User'
49 site: '%rapsys_air.title%'
50 #Edit replacement
51 edit:
52 field:
53 pseudonym: false
54 route:
55 index: 'root'
56 view:
57 edit: 'Rapsys\AirBundle\Form\RegisterType'
58 name: '@RapsysAir/form/edit.html.twig'
59 context:
60 title:
61 page: 'Modify account'
62 password: 'Modify password'
63 #Login replacement
64 login:
65 route:
66 index: 'root'
67 view:
68 name: '@RapsysAir/form/login.html.twig'
69 context:
70 title:
71 page: 'Login'
72 #Recover replacement
73 recover:
74 route:
75 index: 'root'
76 recover: 'recover_url'
77 view:
78 name: '@RapsysAir/form/recover.html.twig'
79 context:
80 title:
81 page: 'Recover'
82 mail:
83 subject: 'Welcome back %%recipient_name%% to %%site.title%%'
84 html: '@RapsysAir/mail/recover.html.twig'
85 text: '@RapsysAir/mail/recover.text.twig'
86 context:
87 #Register replacement
88 register:
89 field:
90 city: false
91 country: false
92 phone: false
93 pseudonym: false
94 zipcode: false
95 route:
96 index: 'root'
97 confirm: 'confirm_url'
98 view:
99 form: 'Rapsys\AirBundle\Form\RegisterType'
100 name: '@RapsysAir/form/register.html.twig'
101 context:
102 title:
103 page: 'Register'
104 mail:
105 subject: 'Welcome %%recipient_name%% to %%site.title%%'
106 html: '@RapsysAir/mail/register.html.twig'
107 text: '@RapsysAir/mail/register.text.twig'
108 context:
109
110 #Doctrine configuration
111 doctrine:
112 # Dbal configuration
113 dbal:
114 charset: 'utf8mb4'
115 default_table_options:
116 charset: 'utf8mb4'
117 collation: 'utf8mb4_unicode_ci'
118
119 #Orm configuration
120 orm:
121 #Replace repository factory
122 repository_factory: 'Rapsys\AirBundle\Factory'
123
124 #Force resolution of UserBundle entities to AirBundle one
125 #XXX: without these lines, relations are lookup in parent namespace ignoring AirBundle extension
126 resolve_target_entities:
127 Rapsys\UserBundle\Entity\Group: 'Rapsys\AirBundle\Entity\Group'
128 Rapsys\UserBundle\Entity\Civility: 'Rapsys\AirBundle\Entity\Civility'
129 Rapsys\UserBundle\Entity\User: 'Rapsys\AirBundle\Entity\User'
130
131 mappings:
132 #Entity short syntax was removed
133 #XXX: see https://github.com/doctrine/orm/issues/8818
134 RapsysAirBundle:
135 type: 'yml'
136 is_bundle: true
137 dir: 'Resources/config/doctrine'
138 prefix: 'Rapsys\AirBundle\Entity'
139 alias: 'RapsysAirBundle'
140
141 #Security configuration
142 security:
143 #XXX: seems dropped in symfony 7
144 # #Enable authenticator manager
145 # enable_authenticator_manager: true
146
147 #Set password hashers
148 password_hashers:
149 #Rapsys\AirBundle\Entity\User: plaintext
150 Rapsys\AirBundle\Entity\User:
151 algorithm: 'bcrypt'
152
153 #Set providers
154 providers:
155 database:
156 entity:
157 class: Rapsys\AirBundle\Entity\User
158 property: mail
159
160 #Set firewall
161 firewalls:
162 #Disables authentication for assets and the profiler, adapt it according to your needs
163 dev:
164 pattern: ^/(_(profiler|wdt)|css|images|js)/
165 security: false
166
167 main:
168 #Allow anonymous access
169 #anonymous: ~
170 #lazy: true
171
172 #Activate database provider
173 provider: database
174
175 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
176 #http_basic: ~
177
178 #Set form login
179 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
180 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
181 form_login:
182 #Redirect to referer if different from login route
183 use_referer: true
184 #Login path
185 login_path: rapsys_user_login
186 #Check path
187 check_path: rapsys_user_login
188 #Username parameter
189 username_parameter: 'login[mail]'
190 #Password parameter
191 password_parameter: 'login[password]'
192
193 #Set logout route
194 logout:
195 #Logout route
196 path: rapsys_user_logout
197 #Logout default target
198 target: rapsys_air
199
200 #Set custom access denied handler
201 access_denied_handler: Rapsys\AirBundle\Handler\AccessDeniedHandler
202
203 #Remember me
204 #XXX: see https://symfony.com/doc/current/security/remember_me.html
205 remember_me:
206 #Use APP_SECRET
207 secret: '%kernel.secret%'
208 #Always remember me
209 always_remember_me: true
210
211 #Set role hierarchy
212 role_hierarchy:
213 ROLE_GUEST: [ 'ROLE_USER' ]
214 ROLE_REGULAR: [ 'ROLE_USER', 'ROLE_GUEST' ]
215 ROLE_SENIOR: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR' ]
216 ROLE_ADMIN: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR', 'ROLE_SENIOR' ]
217
218 #Framework configuration
219 framework:
220 cache:
221 default_memcached_provider: 'memcached://localhost:11211'
222 pools:
223 air.cache:
224 adapter: 'cache.adapter.memcached'
225 user.cache:
226 adapter: 'cache.adapter.memcached'
227 default_locale: '%rapsys_air.locale%'
228 #error_controller: 'Rapsys\AirBundle\Controller\ErrorController::show'
229 translator:
230 fallbacks: '%rapsys_air.locales%'
231 session:
232 enabled: true
233 handler_id: ~
234 storage_factory_id: 'session.storage.factory.native'
235 cookie_secure: 'auto'
236 cookie_samesite: 'lax'
237 disallow_search_engine_index: false
238 mailer:
239 headers:
240 X-Originating-IP: '%env(string:REMOTE_ADDR)%'
241 secret: '%env(string:APP_SECRET)%'
242 validation:
243 email_validation_mode: html5
244 # php_errors:
245 # log: true
246 # http_method_override: false
247 # session:
248 # handler_id: null
249 # cookie_secure: auto
250 # cookie_samesite: lax
251 # storage_factory_id: session.storage.factory.native
252 #framework:
253 # error_controller: Rapsys\AirBundle\Controller\ErrorController::show
254 #
255 # #Assets configuration
256 # XXX: don't use that shit, it breaks assets._default_package url generation
257 # assets:
258 # #Set default base path
259 # #base_path: '/bundles/%%s'
260 # #Set default version
261 # version: 'x'
262 # #Set default format
263 # version_format: '%%s?v=%%s'
264 #
265 # packages:
266 # pack:
267 # base_path: '/bundles/%%s'
268
269 #Service configuration
270 services:
271 #Register twig file_get_contents extension
272 #XXX: obsolete by email.image twig filter in "twig/extensions" or "twig/html-extra"
273 #rapsys_air.twig.file_get_contents:
274 # class: 'Rapsys\AirBundle\Twig\FileGetContentsExtension'
275 # tags: [ 'twig.extension' ]
276 #Register twig base64 extension
277 #rapsys_air.twig.base64:
278 # class: 'Rapsys\AirBundle\Twig\Base64Extension'
279 # tags: [ 'twig.extension' ]
280 #Register twig bb2html extension
281 #rapsys_air.twig.bb2html:
282 # class: 'Rapsys\AirBundle\Twig\Bb2htmlExtension'
283 # tags: [ 'twig.extension' ]
284 #Register twig intl extension
285 #XXX: https://www.php.net/manual/en/class.intldateformatter.php
286 #XXX: https://stackoverflow.com/questions/25948853/how-to-install-the-intl-extension-for-twig
287 #rapsys_air.twig.intl:
288 # class: 'Twig\Extensions\IntlExtension'
289 # tags: [ 'twig.extension' ]
290 #new TwigFilter('markdown_to_html', ['Twig\\Extra\\Markdown\\MarkdownRuntime', 'convert'], ['is_safe' => ['all']]),
291 #new TwigFilter('html_to_markdown', 'Twig\\Extra\\Markdown\\twig_html_to_markdown', ['is_safe' => ['all']]),
292 #Register twig markdown_to_html extension
293 # #class: 'Twig\Extra\Markdown\DefaultMarkdown'
294 #rapsys_air.twig.markdown_eruse:
295 # class: 'Twig\Extra\Markdown\DefaultMarkdown'
296 #rapsys_air.twig.markdown_runtime:
297 # class: 'Twig\Extra\Markdown\MarkdownRuntime'
298 # arguments: [ '@rapsys_air.twig.markdown_eruse' ]
299 #rapsys_air.markdown:
300 # class: 'Twig\Extra\Markdown\MarkdownExtension'
301 # tags: [ 'twig.extension' ]
302 #Register twig pack extension
303 #rapsys_pack.pack_extension:
304 # class: 'Rapsys\PackBundle\Twig\PackExtension'
305 # arguments: [ '@file_locator', '@service_container', '@rapsys_pack.path_package' ]
306 # tags: [ 'twig.extension' ]
307 #Register application controller
308 Rapsys\AirBundle\Controller\ApplicationController:
309 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
310 tags: [ 'controller.service_arguments' ]
311 #Register calendar controller
312 Rapsys\AirBundle\Controller\CalendarController:
313 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
314 tags: [ 'controller.service_arguments' ]
315 #Register default controller
316 Rapsys\AirBundle\Controller\DefaultController:
317 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
318 tags: [ 'controller.service_arguments' ]
319 #Register dance controller
320 Rapsys\AirBundle\Controller\DanceController:
321 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
322 tags: [ 'controller.service_arguments' ]
323 #Register location controller
324 Rapsys\AirBundle\Controller\LocationController:
325 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
326 tags: [ 'controller.service_arguments' ]
327 #Register user controller
328 Rapsys\AirBundle\Controller\UserController:
329 arguments: [ '@user.cache', '@security.authorization_checker', '@service_container', '@doctrine', '@form.factory', '@security.user_password_hasher', '@logger', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
330 tags: [ 'controller.service_arguments' ]
331 #Register session controller
332 Rapsys\AirBundle\Controller\SessionController:
333 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
334 tags: [ 'controller.service_arguments' ]
335 #Register snippet controller
336 Rapsys\AirBundle\Controller\SnippetController:
337 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
338 tags: [ 'controller.service_arguments' ]
339 #Register error controller
340 Rapsys\AirBundle\Controller\ErrorController:
341 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
342 #arguments: [ '@service_container', '@router', '@translator' ]
343 tags: [ 'controller.service_arguments' ]
344 #Register locale event subscriber
345 #TODO: remove that shit now ???
346 #Rapsys\AirBundle\EventSubscriber\LocaleSubscriber:
347 # arguments: [ '@router', '%rapsys_air.locales%' ]
348 # tags: [ 'kernel.event_subscriber' ]
349 #Register access denied handler
350 Rapsys\AirBundle\Handler\AccessDeniedHandler:
351 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_air.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.map_util', '@rapsys_pack.path_package', '@router', '@security.helper', '@rapsys_pack.slugger_util', '@request_stack', '@translator', '@twig' ]
352 #Register air fixtures
353 Rapsys\AirBundle\DataFixtures\AirFixtures:
354 arguments: [ '@service_container', '@security.user_password_hasher' ]
355 tags: [ 'doctrine.fixture.orm' ]
356 # #Set version strategy
357 # assets.static_version_strategy:
358 # class: Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy
359 # arguments: [ 'x', '%%s?v=%%s' ]
360 Rapsys\AirBundle\Form\ApplicationType:
361 arguments: [ '@doctrine', '@translator' ]
362 tags: [ 'form.type' ]
363 Rapsys\AirBundle\Form\LocationType:
364 tags: [ 'form.type' ]
365 Rapsys\AirBundle\Form\SessionType:
366 arguments: [ '@doctrine' ]
367 tags: [ 'form.type' ]
368 Rapsys\AirBundle\Form\Extension\Type\HiddenEntityType:
369 arguments: [ '@doctrine' ]
370 tags: [ 'form.type' ]
371 Rapsys\AirBundle\Form\ContactType:
372 arguments: [ '@rapsys_pack.image_util', '@rapsys_pack.slugger_util', '@translator' ]
373 tags: [ 'form.type' ]
374 Rapsys\AirBundle\Form\RegisterType:
375 arguments: [ '@doctrine.orm.entity_manager' ]
376 tags: [ 'form.type' ]
377 Rapsys\AirBundle\Command\AttributeCommand:
378 arguments: [ '@doctrine' ]
379 tags: [ 'console.command' ]
380 Rapsys\AirBundle\Command\CalendarCommand:
381 arguments: [ '@doctrine', '@router', '@rapsys_pack.slugger_util', '@translator', 'airlibre', 0, '%kernel.project_dir%/var/cache', '%kernel.default_locale%' ]
382 tags: [ 'console.command' ]
383 Rapsys\AirBundle\Command\Calendar2Command:
384 arguments: [ '@doctrine', '@router', '@rapsys_pack.slugger_util', '@translator', '%kernel.default_locale%', '%env(string:GOOGLE_PROJECT)', '%env(string:GOOGLE_CLIENT)', '%env(string:GOOGLE_SECRET)' ]
385 tags: [ 'console.command' ]
386 Rapsys\AirBundle\Command\RekeyCommand:
387 arguments: [ '@doctrine' ]
388 tags: [ 'console.command' ]
389 Rapsys\AirBundle\Command\WeatherCommand:
390 arguments: [ '@doctrine', '@filesystem' ]
391 tags: [ 'console.command' ]
392 Rapsys\AirBundle\Factory:
393 arguments: [ '@request_stack', '@router', '@rapsys_pack.slugger_util', '@translator', '%kernel.default_locale%', '%rapsys_air.languages%' ]
394 Rapsys\UserBundle\Factory:
395 arguments: [ '@request_stack', '@router', '@rapsys_pack.slugger_util', '@translator', '%kernel.default_locale%', '%rapsys_air.languages%' ]
396 #Register facebook util service
397 rapsys_air.facebook_util:
398 class: 'Rapsys\PackBundle\Util\FacebookUtil'
399 arguments: [ '@router', '%kernel.project_dir%/var/cache', '%rapsys_pack.path%', 'facebook', '%rapsys_air.path%/png/facebook.png', { irishgrover: '%rapsys_air.path%/ttf/irishgrover.v10.ttf', labelleaurore: '%rapsys_air.path%/ttf/labelleaurore.v10.ttf', dejavusans: '%rapsys_air.path%/ttf/dejavusans.2.37.ttf', droidsans: '%rapsys_air.path%/ttf/droidsans.regular.ttf' } ]
400 public: true
401 #Register security password_hasher_factory as public
402 #XXX: required for command `php bin/console doctrine:`
403 security.password_hasher_factory:
404 class: 'Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory'
405 arguments: [ { 'Rapsys\AirBundle\Entity\User': { class: 'Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher', arguments: [ ~, ~, ~, '2y'] } } ]
406 public: true
407 #Register facebook event subscriber
408 Rapsys\PackBundle\Subscriber\FacebookSubscriber:
409 arguments: [ '@router', '%rapsys_air.locales%' ]
410 tags: [ 'kernel.event_subscriber' ]
411
412 #Twig Configuration
413 twig:
414 #Enforce debug
415 #auto_reload: ~
416 debug: true
417 #debug: '%kernel.debug%'
418 #strict_variables: '%kernel.debug%'
419
420 #Disable cache
421 #XXX: enable forced regeneration of css and js at each page load
422 cache: false
423
424 #Fix form layout for css
425 #XXX: @RapsysAir is a shortcut to vendor/rapsys/airbundle/Resources/views directory here
426 form_theme: [ '@RapsysAir/form/form_div_layout.html.twig' ]
427
428 #Set twig paths
429 paths:
430 #Required by email.image(site_logo) directive
431 #XXX: Allow twig to resolve @RapsysAir/png/logo.png in vendor/rapsys/airbundle/Resources/public/png/logo.png
432 '%kernel.project_dir%/vendor/rapsys/airbundle/Resources/public': 'RapsysAir'
433 #Override default exception controller
434 #exception_controller: Rapsys\AirBundle\Controller\ErrorController::preview