From: Raphaƫl Gertz Date: Thu, 7 Mar 2024 18:11:51 +0000 (+0100) Subject: Shorten air bundle and route alias X-Git-Tag: 0.4.0~51 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/652c1a809f2b5731d9ffb57da669d295bc38b8e4?ds=sidebyside Shorten air bundle and route alias --- diff --git a/Resources/config/packages/rapsys_air.yaml b/Resources/config/packages/rapsysair.yaml similarity index 80% rename from Resources/config/packages/rapsys_air.yaml rename to Resources/config/packages/rapsysair.yaml index a396cee..9241979 100644 --- a/Resources/config/packages/rapsys_air.yaml +++ b/Resources/config/packages/rapsysair.yaml @@ -1,5 +1,5 @@ # RapsysAir configuration -rapsys_air: +rapsysair: languages: en_gb: 'English' fr_fr: 'French' @@ -22,8 +22,8 @@ rapsysuser: default: group: [ 'User' ] civility: 'Mister' - languages: '%rapsys_air.languages%' - locales: '%rapsys_air.locales%' + languages: '%rapsysair.languages%' + locales: '%rapsysair.locales%' country: 'France' country_favorites: [ 'France', 'Belgium', 'Germany', 'Italy', 'Luxembourg', 'Portugal', 'Spain', 'Switzerland' ] dance_favorites: [ 'Argentine Tango Ball', 'Argentine Tango Ball and class', 'Argentine Tango Ball and concert' ] @@ -31,22 +31,22 @@ rapsysuser: # Route replacement route: index: - name: 'rapsys_air' + name: 'rapsysair' # Translate replacement translate: [ 'title.page', 'title.section', 'title.site', 'password', 'copy.by', 'copy.long', 'copy.short', 'copy.title', 'logo.alt' ] # Contact replacement contact: - address: '%rapsys_air.contact.address%' - name: '%rapsys_air.contact.name%' + address: '%rapsysair.contact.address%' + name: '%rapsysair.contact.name%' # Context replacement context: - copy: '%rapsys_air.copy%' - icon: '%rapsys_air.icon%' - logo: '%rapsys_air.logo%' - root: '%rapsys_air.root%' + copy: '%rapsysair.copy%' + icon: '%rapsysair.icon%' + logo: '%rapsysair.logo%' + root: '%rapsysair.root%' title: section: 'User' - site: '%rapsys_air.title%' + site: '%rapsysair.title%' # Edit replacement edit: field: @@ -192,7 +192,7 @@ security: # Logout route path: 'rapsysuser_logout' # Logout default target - target: 'rapsys_air' + target: 'rapsysair' # Set custom access denied handler access_denied_handler: 'Rapsys\AirBundle\Handler\AccessDeniedHandler' @@ -226,7 +226,7 @@ framework: # User cache user.cache: adapter: 'cache.adapter.memcached' - default_locale: '%rapsys_air.locale%' + default_locale: '%rapsysair.locale%' disallow_search_engine_index: false #error_controller: 'Rapsys\AirBundle\Controller\ErrorController::show' # Append ip to mail headers @@ -242,7 +242,7 @@ framework: cookie_secure: 'auto' cookie_samesite: 'lax' translator: - fallbacks: '%rapsys_air.locales%' + fallbacks: '%rapsysair.locales%' validation: email_validation_mode: 'html5' @@ -250,23 +250,23 @@ framework: services: # Register application controller Rapsys\AirBundle\Controller\ApplicationController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] tags: [ 'controller.service_arguments' ] # Register calendar controller Rapsys\AirBundle\Controller\CalendarController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] tags: [ 'controller.service_arguments' ] # Register default controller Rapsys\AirBundle\Controller\DefaultController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] tags: [ 'controller.service_arguments' ] # Register dance controller Rapsys\AirBundle\Controller\DanceController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] tags: [ 'controller.service_arguments' ] # Register location controller Rapsys\AirBundle\Controller\LocationController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] tags: [ 'controller.service_arguments' ] # Register user controller Rapsys\AirBundle\Controller\UserController: @@ -274,20 +274,20 @@ services: tags: [ 'controller.service_arguments' ] # Register session controller Rapsys\AirBundle\Controller\SessionController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] tags: [ 'controller.service_arguments' ] # Register snippet controller Rapsys\AirBundle\Controller\SnippetController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] tags: [ 'controller.service_arguments' ] # Register error controller Rapsys\AirBundle\Controller\ErrorController: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] #arguments: [ '@service_container', '@router', '@translator' ] tags: [ 'controller.service_arguments' ] # Register access denied handler Rapsys\AirBundle\Handler\AccessDeniedHandler: - arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsys_air.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' ] + 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' ] # Register air fixtures Rapsys\AirBundle\DataFixtures\AirFixtures: arguments: [ '@service_container', '@security.user_password_hasher' ] @@ -337,11 +337,11 @@ services: tags: [ 'console.command' ] # Register repository factory Rapsys\AirBundle\Factory: - arguments: [ '@request_stack', '@router', '@rapsyspack.slugger_util', '@translator', '%kernel.default_locale%', '%rapsys_air.languages%' ] + arguments: [ '@request_stack', '@router', '@rapsyspack.slugger_util', '@translator', '%kernel.default_locale%', '%rapsysair.languages%' ] # Register facebook util service - rapsys_air.facebook_util: + rapsysair.facebook_util: class: 'Rapsys\PackBundle\Util\FacebookUtil' - arguments: [ '@router', '%kernel.project_dir%/var/cache', '%rapsyspack.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' } ] + 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' } ] public: true # Register security password_hasher_factory as public # XXX: required for command `php bin/console doctrine:` @@ -351,7 +351,7 @@ services: public: true # Register facebook event subscriber Rapsys\PackBundle\Subscriber\FacebookSubscriber: - arguments: [ '@router', '%rapsys_air.locales%' ] + arguments: [ '@router', '%rapsysair.locales%' ] tags: [ 'kernel.event_subscriber' ] # Register dotenv:dump command Symfony\Component\Dotenv\Command\DotenvDumpCommand: ~ diff --git a/Resources/config/routes/rapsys_air.yaml b/Resources/config/routes/rapsysair.yaml similarity index 92% rename from Resources/config/routes/rapsys_air.yaml rename to Resources/config/routes/rapsysair.yaml index f74da64..59aad9d 100644 --- a/Resources/config/routes/rapsys_air.yaml +++ b/Resources/config/routes/rapsysair.yaml @@ -4,14 +4,14 @@ #SCRUD: index, add, edit, delete, view #TODO: rename view in show ??? -rapsys_air: +rapsysair: path: en_gb: '/en' fr_fr: '/' controller: Rapsys\AirBundle\Controller\DefaultController::index methods: GET -rapsys_air_about: +rapsysair_about: path: en_gb: '/en/about' fr_fr: '/a-propos' @@ -19,145 +19,145 @@ rapsys_air_about: methods: GET #TODO: drop it or should we keep it to be able to add an application from multiple places ??? -rapsys_air_application_add: +rapsysair_application_add: path: en_gb: '/en/application' fr_fr: '/reservation' controller: Rapsys\AirBundle\Controller\ApplicationController::add methods: GET|POST -rapsys_air_contact: +rapsysair_contact: path: en_gb: '/en/contact/{id<\d*>?}/{user<[\w-]*>?}' fr_fr: '/contacter/{id<\d*>?}/{user<[\w-]*>?}' controller: Rapsys\AirBundle\Controller\DefaultController::contact methods: GET|POST -#rapsys_air_calendar: +#rapsysair_calendar: # path: # en_gb: '/en/calendar' # fr_fr: '/calendrier' # controller: Rapsys\AirBundle\Controller\CalendarController::index # methods: GET|POST -rapsys_air_city: +rapsysair_city: path: 'en_gb': '/en/city' 'fr_fr': '/ville' controller: Rapsys\AirBundle\Controller\LocationController::cities methods: GET|POST -rapsys_air_city_view: +rapsysair_city_view: path: 'en_gb': '/en/city/{latitude<-?(?:\d*\.)?\d+>}/{longitude<-?(?:\d*\.)?\d+>}/{city<[\w-]+>}' 'fr_fr': '/ville/{latitude<-?(?:\d*\.)?\d+>}/{longitude<-?(?:\d*\.)?\d+>}/{city<[\w-]+>}' controller: Rapsys\AirBundle\Controller\LocationController::city methods: GET|POST -rapsys_air_dance: +rapsysair_dance: path: 'en_gb': '/en/dance' 'fr_fr': '/danse' controller: Rapsys\AirBundle\Controller\DanceController::index methods: GET|POST -rapsys_air_dance_view: +rapsysair_dance_view: path: 'en_gb': '/en/dance/{id<[0-9]+>}/{name<[\w-]+>}/{type<[\w-]+>}' 'fr_fr': '/danse/{id<[0-9]+>}/{name<[\w-]+>}/{type<[\w-]+>}' controller: Rapsys\AirBundle\Controller\DanceController::view methods: GET|POST -rapsys_air_dance_name: +rapsysair_dance_name: path: 'en_gb': '/en/dance/{name<[a-zA-Z0-9=_-]+>}/{dance<[\w-]+>}' 'fr_fr': '/danse/{name<[a-zA-Z0-9=_-]+>}/{dance<[\w-]+>}' controller: Rapsys\AirBundle\Controller\DanceController::name methods: GET|POST -rapsys_air_frequently_asked_questions: +rapsysair_frequently_asked_questions: path: en_gb: '/en/frequently-asked-questions' fr_fr: '/foire-aux-questions' controller: Rapsys\AirBundle\Controller\DefaultController::frequentlyAskedQuestions methods: GET -rapsys_air_google_callback: +rapsysair_google_callback: path: '/google/callback' controller: Rapsys\AirBundle\Controller\UserController::googleCallback methods: GET -rapsys_air_location: +rapsysair_location: path: en_gb: '/en/location' fr_fr: '/emplacement' controller: Rapsys\AirBundle\Controller\LocationController::index methods: GET|POST -rapsys_air_location_view: +rapsysair_location_view: path: en_gb: '/en/location/{id<\d+>}/{location<[\w-]+>?}' fr_fr: '/emplacement/{id<\d+>}/{location<[\w-]+>?}' controller: Rapsys\AirBundle\Controller\LocationController::view methods: GET -rapsys_air_organizer_regulation: +rapsysair_organizer_regulation: path: en_gb: '/en/organizer-regulation' fr_fr: '/reglement-organisateur' controller: Rapsys\AirBundle\Controller\DefaultController::organizerRegulation methods: GET -rapsys_air_session: +rapsysair_session: path: en_gb: '/en/session' fr_fr: '/seance' controller: Rapsys\AirBundle\Controller\SessionController::index methods: GET -rapsys_air_session_tangoargentin: +rapsysair_session_tangoargentin: path: en_gb: '/en/session/tangoargentin.{!_format?json}' fr_fr: '/seance/tangoargentin.{!_format?json}' controller: Rapsys\AirBundle\Controller\SessionController::tangoargentin methods: GET -rapsys_air_session_view: +rapsysair_session_view: path: en_gb: '/en/session/{id<\d+>}/{location<[\w-]+>?}/{dance<[\w-]*>?}/{user<[\w-]*>?}' fr_fr: '/seance/{id<\d+>}/{location<[\w-]+>?}/{dance<[\w-]*>?}/{user<[\w-]*>?}' controller: Rapsys\AirBundle\Controller\SessionController::view methods: GET|POST -rapsys_air_snippet_add: +rapsysair_snippet_add: path: en_gb: '/en/snippet' fr_fr: '/extrait' controller: Rapsys\AirBundle\Controller\SnippetController::add methods: POST -rapsys_air_snippet_edit: +rapsysair_snippet_edit: path: en_gb: '/en/snippet/{id<\d+>}' fr_fr: '/extrait/{id<\d+>}' controller: Rapsys\AirBundle\Controller\SnippetController::edit methods: POST -rapsys_air_terms_of_service: +rapsysair_terms_of_service: path: en_gb: '/en/terms-of-service' fr_fr: '/conditions-generales-d-utilisation' controller: Rapsys\AirBundle\Controller\DefaultController::termsOfService methods: GET -rapsys_air_user: +rapsysair_user: path: en_gb: '/en/user' fr_fr: '/utilisateur' controller: Rapsys\AirBundle\Controller\DefaultController::userIndex methods: GET -rapsys_air_user_milongaraphael: +rapsysair_user_milongaraphael: path: en_gb: '/en/milonga-raphael' fr_fr: '/milonga-raphael' @@ -167,7 +167,7 @@ rapsys_air_user_milongaraphael: id: 1 user: 'milonga-raphael' -rapsys_air_user_view: +rapsysair_user_view: path: en_gb: '/en/user/{id<\d+>}/{user<[\w-]+>?}' fr_fr: '/utilisateur/{id<\d+>}/{user<[\w-]+>?}'