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