]> Raphaƫl G. Git Repositories - airbundle/blob - Resources/config/packages/rapsys_air.yaml
Add skip on weather unavailable data when startup timeout makes us miss upstream...
[airbundle] / Resources / config / packages / rapsys_air.yaml
1 #RapsysAir configuration
2 rapsys_air:
3
4 #RapsysUser configuration
5 rapsys_user:
6 #Class replacement
7 class:
8 group: 'Rapsys\AirBundle\Entity\Group'
9 civility: 'Rapsys\AirBundle\Entity\Civility'
10 user: 'Rapsys\AirBundle\Entity\User'
11 #Default replacement
12 default:
13 group: [ 'User' ]
14 civility: 'Mister'
15 #Route replacement
16 route:
17 index:
18 name: 'rapsys_air'
19 #Translate replacement
20 translate: [ 'title', 'password', 'site.title', 'copy.by', 'copy.long', 'copy.short', 'copy.title' ]
21 #Languages replacement
22 languages:
23 en_gb: 'English'
24 fr_fr: 'French'
25 #Contact replacement
26 contact:
27 title: '%rapsys_air.contact.title%'
28 mail: '%rapsys_air.contact.mail%'
29 #Context replacement
30 context:
31 copy:
32 by: '%rapsys_air.copy.by%'
33 link: '%rapsys_air.copy.link%'
34 long: '%rapsys_air.copy.long%'
35 short: '%rapsys_air.copy.short%'
36 title: '%rapsys_air.copy.title%'
37 site:
38 ico: '%rapsys_air.site.ico%'
39 logo: '%rapsys_air.site.logo%'
40 png: '%rapsys_air.site.png%'
41 svg: '%rapsys_air.site.svg%'
42 title: '%rapsys_air.site.title%'
43 url: '%rapsys_air.site.url%'
44 #Edit replacement
45 edit:
46 route:
47 index: 'site.url'
48 view:
49 edit: 'Rapsys\AirBundle\Form\RegisterType'
50 name: '@RapsysAir/form/edit.html.twig'
51 context:
52 title: 'Modify account'
53 password: 'Modify password'
54 #Login replacement
55 login:
56 route:
57 index: 'site.url'
58 view:
59 name: '@RapsysAir/form/login.html.twig'
60 context:
61 title: 'Login'
62 #Recover replacement
63 recover:
64 route:
65 index: 'site.url'
66 recover: 'recover_url'
67 view:
68 name: '@RapsysAir/form/recover.html.twig'
69 context:
70 title: 'Recover'
71 mail:
72 subject: 'Welcome back %%recipient_name%% to %%site.title%%'
73 html: '@RapsysAir/mail/recover.html.twig'
74 text: '@RapsysAir/mail/recover.text.twig'
75 context:
76 #Register replacement
77 register:
78 route:
79 index: 'site.url'
80 confirm: 'confirm_url'
81 view:
82 form: 'Rapsys\AirBundle\Form\RegisterType'
83 name: '@RapsysAir/form/register.html.twig'
84 context:
85 title: 'Register'
86 mail:
87 subject: 'Welcome %%recipient_name%% to %%site.title%%'
88 html: '@RapsysAir/mail/register.html.twig'
89 text: '@RapsysAir/mail/register.text.twig'
90 context:
91
92 #Doctrine configuration
93 doctrine:
94 #Dbal configuration
95 dbal:
96 mapping_types:
97 enum: string
98 #Orm configuration
99 orm:
100 #Force resolution of UserBundle entities to AirBundle one
101 #XXX: without these lines, relations are lookup in parent namespace ignoring AirBundle extension
102 resolve_target_entities:
103 Rapsys\UserBundle\Entity\Group: Rapsys\AirBundle\Entity\Group
104 Rapsys\UserBundle\Entity\Civility: Rapsys\AirBundle\Entity\Civility
105 Rapsys\UserBundle\Entity\User: Rapsys\AirBundle\Entity\User
106
107 #Security configuration
108 security:
109 #Set encoders
110 encoders:
111 #Rapsys\AirBundle\Entity\User: plaintext
112 Rapsys\AirBundle\Entity\User:
113 algorithm: 'bcrypt'
114
115 #Set providers
116 providers:
117 database:
118 entity:
119 class: Rapsys\AirBundle\Entity\User
120 property: mail
121
122 #Set firewall
123 firewalls:
124 #Disables authentication for assets and the profiler, adapt it according to your needs
125 dev:
126 pattern: ^/(_(profiler|wdt)|css|images|js)/
127 security: false
128
129 main:
130 #Allow anonymous access
131 anonymous: ~
132
133 #Disable logout on user change
134 logout_on_user_change: true
135
136 #Activate database provider
137 provider: database
138
139 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
140 #http_basic: ~
141
142 #Set form login
143 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
144 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
145 form_login:
146 #Redirect to referer if different from login route
147 use_referer: true
148 #Login path
149 login_path: rapsys_user_login
150 #Check path
151 check_path: rapsys_user_login
152 #Username parameter
153 username_parameter: 'login[mail]'
154 #Password parameter
155 password_parameter: 'login[password]'
156
157 #Set logout route
158 logout:
159 #Logout route
160 path: rapsys_user_logout
161 #Logout default target
162 target: rapsys_air
163
164 #Set custom access denied handler
165 access_denied_handler: Rapsys\AirBundle\Handler\AccessDeniedHandler
166
167 #Remember me
168 #XXX: see https://symfony.com/doc/current/security/remember_me.html
169 remember_me:
170 #Use APP_SECRET
171 secret: '%kernel.secret%'
172 #Always remember me
173 always_remember_me: true
174
175 #Set role hierarchy
176 role_hierarchy:
177 ROLE_GUEST: [ 'ROLE_USER' ]
178 ROLE_REGULAR: [ 'ROLE_USER', 'ROLE_GUEST' ]
179 ROLE_SENIOR: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR' ]
180 ROLE_ADMIN: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR', 'ROLE_SENIOR' ]
181
182 #Framework configuration
183 framework:
184 default_locale: 'fr_fr'
185 #error_controller: 'Rapsys\AirBundle\Controller\ErrorController::show'
186 translator:
187 fallbacks: [ 'fr_fr', 'en_gb' ]
188 session:
189 enabled: true
190 handler_id: ~
191 cookie_secure: 'auto'
192 cookie_samesite: 'lax'
193 disallow_search_engine_index: false
194 secret: '%env(APP_SECRET)%'
195 #framework:
196 # error_controller: Rapsys\AirBundle\Controller\ErrorController::show
197 #
198 # #Assets configuration
199 # XXX: don't use that shit, it breaks assets._default_package url generation
200 # assets:
201 # #Set default base path
202 # #base_path: '/bundles/%%s'
203 # #Set default version
204 # version: 'x'
205 # #Set default format
206 # version_format: '%%s?v=%%s'
207 #
208 # packages:
209 # pack:
210 # base_path: '/bundles/%%s'
211
212 #Service configuration
213 services:
214 #Register twig file_get_contents extension
215 #XXX: obsolete by email.image twig filter in "twig/extensions" or "twig/html-extra"
216 rapsys_air.twig.file_get_contents:
217 class: 'Rapsys\AirBundle\Twig\FileGetContentsExtension'
218 tags: [ 'twig.extension' ]
219 #Register twig base64 extension
220 rapsys_air.twig.base64:
221 class: 'Rapsys\AirBundle\Twig\Base64Extension'
222 tags: [ 'twig.extension' ]
223 #Register twig bb2html extension
224 rapsys_air.twig.bb2html:
225 class: 'Rapsys\AirBundle\Twig\Bb2htmlExtension'
226 tags: [ 'twig.extension' ]
227 #Register twig intl extension
228 #XXX: https://www.php.net/manual/en/class.intldateformatter.php
229 #XXX: https://stackoverflow.com/questions/25948853/how-to-install-the-intl-extension-for-twig
230 rapsys_air.twig.intl:
231 class: 'Twig\Extensions\IntlExtension'
232 tags: [ 'twig.extension' ]
233 #new TwigFilter('markdown_to_html', ['Twig\\Extra\\Markdown\\MarkdownRuntime', 'convert'], ['is_safe' => ['all']]),
234 #new TwigFilter('html_to_markdown', 'Twig\\Extra\\Markdown\\twig_html_to_markdown', ['is_safe' => ['all']]),
235 #Register twig markdown_to_html extension
236 # #class: 'Twig\Extra\Markdown\DefaultMarkdown'
237 #rapsys_air.twig.markdown_eruse:
238 # class: 'Twig\Extra\Markdown\DefaultMarkdown'
239 #rapsys_air.twig.markdown_runtime:
240 # class: 'Twig\Extra\Markdown\MarkdownRuntime'
241 # arguments: [ '@rapsys_air.twig.markdown_eruse' ]
242 #rapsys_air.markdown:
243 # class: 'Twig\Extra\Markdown\MarkdownExtension'
244 # tags: [ 'twig.extension' ]
245 #Register twig pack extension
246 #rapsys_pack.pack_extension:
247 # class: 'Rapsys\PackBundle\Twig\PackExtension'
248 # arguments: [ '@file_locator', '@service_container', '@rapsys_pack.path_package' ]
249 # tags: [ 'twig.extension' ]
250 #Register application controller
251 Rapsys\AirBundle\Controller\ApplicationController:
252 arguments: [ '@service_container', '@router', '@translator' ]
253 tags: [ 'controller.service_arguments' ]
254 #Register calendar controller
255 Rapsys\AirBundle\Controller\CalendarController:
256 arguments: [ '@service_container', '@router', '@translator' ]
257 tags: [ 'controller.service_arguments' ]
258 #Register default controller
259 Rapsys\AirBundle\Controller\DefaultController:
260 arguments: [ '@service_container', '@router', '@translator' ]
261 tags: [ 'controller.service_arguments' ]
262 #Register location controller
263 Rapsys\AirBundle\Controller\LocationController:
264 arguments: [ '@service_container', '@router', '@translator' ]
265 tags: [ 'controller.service_arguments' ]
266 #Register user controller
267 Rapsys\AirBundle\Controller\UserController:
268 arguments: [ '@service_container', '@router', '@translator' ]
269 tags: [ 'controller.service_arguments' ]
270 #Register session controller
271 Rapsys\AirBundle\Controller\SessionController:
272 arguments: [ '@service_container', '@router', '@translator' ]
273 tags: [ 'controller.service_arguments' ]
274 #Register snippet controller
275 Rapsys\AirBundle\Controller\SnippetController:
276 arguments: [ '@service_container', '@router', '@translator' ]
277 tags: [ 'controller.service_arguments' ]
278 #Register error controller
279 Rapsys\AirBundle\Controller\ErrorController:
280 arguments: [ '@service_container', '@router', '@translator' ]
281 tags: [ 'controller.service_arguments' ]
282 #Register locale event subscriber
283 #TODO: remove that shit now ???
284 #Rapsys\AirBundle\EventSubscriber\LocaleSubscriber:
285 # arguments: [ '@router', '%rapsys_air.locales%' ]
286 # tags: [ 'kernel.event_subscriber' ]
287 #Register facebook event subscriber
288 Rapsys\AirBundle\EventSubscriber\FacebookSubscriber:
289 arguments: [ '@router', '%rapsys_air.locales%' ]
290 tags: [ 'kernel.event_subscriber' ]
291 #Register access denied handler
292 Rapsys\AirBundle\Handler\AccessDeniedHandler:
293 arguments: [ '@service_container', '@twig', '@router', '@request_stack', '@translator' ]
294 #Register air fixtures
295 Rapsys\AirBundle\DataFixtures\AirFixtures:
296 tags: [ 'doctrine.fixture.orm' ]
297 # #Set version strategy
298 # assets.static_version_strategy:
299 # class: Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy
300 # arguments: [ 'x', '%%s?v=%%s' ]
301 Rapsys\AirBundle\Form\ApplicationType:
302 arguments: [ '@doctrine', '@translator' ]
303 tags: [ 'form.type' ]
304 Rapsys\AirBundle\Form\LocationType:
305 tags: [ 'form.type' ]
306 Rapsys\AirBundle\Form\SessionType:
307 arguments: [ '@doctrine' ]
308 tags: [ 'form.type' ]
309 Rapsys\AirBundle\Form\Extension\Type\HiddenEntityType:
310 arguments: [ '@doctrine' ]
311 tags: [ 'form.type' ]
312 Rapsys\AirBundle\Command\AttributeCommand:
313 arguments: [ '@doctrine' ]
314 tags: [ 'console.command' ]
315 Rapsys\AirBundle\Command\CalendarCommand:
316 arguments: [ '@service_container', '@doctrine', '@router', '@translator' ]
317 tags: [ 'console.command' ]
318 Rapsys\AirBundle\Command\RekeyCommand:
319 arguments: [ '@doctrine' ]
320 tags: [ 'console.command' ]
321 Rapsys\AirBundle\Command\WeatherCommand:
322 arguments: [ '@doctrine' ]
323 tags: [ 'console.command' ]
324
325 #Twig Configuration
326 twig:
327 #Enforce debug
328 #debug: true
329 #auto_reload: ~
330 #Disable cache
331 #XXX: enable forced regeneration of css and js at each page load
332 cache: false
333 #Fix form layout for css
334 #XXX: @RapsysAir is a shortcut to vendor/rapsys/airbundle/Resources/views directory here
335 form_theme: [ '@RapsysAir/form/form_div_layout.html.twig' ]
336 #Set twig paths
337 paths:
338 #Required by email.image(site_logo) directive
339 #XXX: Allow twig to resolve @RapsysAir/png/logo.png in vendor/rapsys/airbundle/Resources/public/png/logo.png
340 '%kernel.project_dir%/vendor/rapsys/airbundle/Resources/public': 'RapsysAir'
341 #Override default exception controller
342 #exception_controller: Rapsys\AirBundle\Controller\ErrorController::preview