]> Raphaël G. Git Repositories - packbundle/commitdiff
Add RAPSYSPACK_AGENT, RAPSYSPACK_HOSTNAME, RAPSYSPACK_RANGE, RAPSYSPACK_REDIRECT...
authorRaphaël Gertz <git@rapsys.eu>
Mon, 4 Mar 2024 15:48:43 +0000 (16:48 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Mon, 4 Mar 2024 15:48:43 +0000 (16:48 +0100)
Reorder services
Add range command

Resources/config/packages/rapsys_pack.yaml [deleted file]
Resources/config/packages/rapsyspack.yaml [new file with mode: 0644]

diff --git a/Resources/config/packages/rapsys_pack.yaml b/Resources/config/packages/rapsys_pack.yaml
deleted file mode 100644 (file)
index 8aa8619..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#Services configuration
-services:
-    #Replace assets.packages definition
-    assets.packages:
-        class: 'Symfony\Component\Asset\Packages'
-        arguments: [ '@rapsys_pack.path_package' ]
-    #Replace assets.context definition
-    assets.context:
-        class: 'Rapsys\PackBundle\Context\RequestStackContext'
-        arguments: [ '@request_stack', '%asset.request_context.base_path%', '%asset.request_context.secure%' ]
-    #Register assets pack package
-    rapsys_pack.path_package:
-        class: 'Rapsys\PackBundle\Package\PathPackage'
-        arguments: [ '/', '@assets.empty_version_strategy', '@assets.context' ]
-        public: true
-    #Register twig pack extension
-    rapsys_pack.pack_extension:
-        class: 'Rapsys\PackBundle\Extension\PackExtension'
-        arguments: [ '@service_container', '@rapsys_pack.intl_util', '@file_locator', '@rapsys_pack.path_package', '@rapsys_pack.slugger_util' ]
-        tags: [ 'twig.extension' ]
-    #Register intl util service
-    rapsys_pack.intl_util:
-        class: 'Rapsys\PackBundle\Util\IntlUtil'
-        public: true
-    #Register facebook event subscriber
-    Rapsys\PackBundle\Subscriber\FacebookSubscriber:
-        arguments: [ '@router', [] ]
-        tags: [ 'kernel.event_subscriber' ]
-    #Register intl util class alias
-    Rapsys\PackBundle\Util\IntlUtil:
-        alias: 'rapsys_pack.intl_util'
-    #Register facebook util service
-    rapsys_pack.facebook_util:
-        class: 'Rapsys\PackBundle\Util\FacebookUtil'
-        arguments: [ '@router', '%kernel.project_dir%/var/cache', '%rapsys_pack.path%' ]
-        public: true
-    #Register facebook util class alias
-    Rapsys\PackBundle\Util\FacebookUtil:
-        alias: 'rapsys_pack.facebook_util'
-    #Register image util service
-    rapsys_pack.image_util:
-        class: 'Rapsys\PackBundle\Util\ImageUtil'
-        arguments: [ '@router', '@rapsys_pack.slugger_util', '%kernel.project_dir%/var/cache', '%rapsys_pack.path%' ]
-        public: true
-    #Register image util class alias
-    Rapsys\PackBundle\Util\ImageUtil:
-        alias: 'rapsys_pack.image_util'
-    #Register map util service
-    rapsys_pack.map_util:
-        class: 'Rapsys\PackBundle\Util\MapUtil'
-        arguments: [ '@router', '@rapsys_pack.slugger_util' ]
-        public: true
-    #Register map util class alias
-    Rapsys\PackBundle\Util\MapUtil:
-        alias: 'rapsys_pack.map_util'
-    #Register slugger util service
-    rapsys_pack.slugger_util:
-        class: 'Rapsys\PackBundle\Util\SluggerUtil'
-        arguments: [ '%kernel.secret%' ]
-        public: true
-    #Register slugger util class alias
-    Rapsys\PackBundle\Util\SluggerUtil:
-        alias: 'rapsys_pack.slugger_util'
-    #Register image controller
-    Rapsys\PackBundle\Controller\ImageController:
-        arguments: [ '@service_container', '@rapsys_pack.image_util', '@rapsys_pack.slugger_util', '%kernel.project_dir%/var/cache', '%rapsys_pack.path%' ]
-        tags: [ 'controller.service_arguments' ]
-    #Register map controller
-    Rapsys\PackBundle\Controller\MapController:
-        arguments: [ '@service_container', '@rapsys_pack.map_util', '@rapsys_pack.slugger_util', '%kernel.project_dir%/var/cache', '%rapsys_pack.path%' ]
-        tags: [ 'controller.service_arguments' ]
-    #Register captcha form type
-    Rapsys\PackBundle\Form\CaptchaType:
-        arguments: [ '@rapsys_pack.image_util', '@rapsys_pack.slugger_util', '@translator' ]
-        tags: [ 'form.type' ]
diff --git a/Resources/config/packages/rapsyspack.yaml b/Resources/config/packages/rapsyspack.yaml
new file mode 100644 (file)
index 0000000..9d63d14
--- /dev/null
@@ -0,0 +1,94 @@
+# Parameters configuration
+parameters:
+    # User agent
+    env(RAPSYSPACK_AGENT): "rapsyspack/Ch4ng3m3!"
+    # Hostname
+    env(RAPSYSPACK_HOSTNAME): "Ch4ng3m3!"
+    # Shuffled printable character range
+    env(RAPSYSPACK_RANGE): 'Ch4ng3m3!'
+    # Redirect
+    env(RAPSYSPACK_REDIRECT): 20
+    # Scheme
+    env(RAPSYSPACK_SCHEME): "https://"
+    # Timeout
+    env(RAPSYSPACK_TIMEOUT): 60
+
+# Services configuration
+services:
+    # Replace assets.context definition
+    assets.context:
+        class: 'Rapsys\PackBundle\Context\RequestStackContext'
+        arguments: [ '@request_stack', '%asset.request_context.base_path%', '%asset.request_context.secure%' ]
+    # Replace assets.packages definition
+    assets.packages:
+        class: 'Symfony\Component\Asset\Packages'
+        arguments: [ '@rapsyspack.path_package' ]
+    # Register facebook util service
+    rapsyspack.facebook_util:
+        class: 'Rapsys\PackBundle\Util\FacebookUtil'
+        arguments: [ '@router', '%kernel.project_dir%/var/cache', '%rapsyspack.path%' ]
+        public: true
+    # Register image util service
+    rapsyspack.image_util:
+        class: 'Rapsys\PackBundle\Util\ImageUtil'
+        arguments: [ '@router', '@rapsyspack.slugger_util', '%kernel.project_dir%/var/cache', '%rapsyspack.path%' ]
+        public: true
+    # Register intl util service
+    rapsyspack.intl_util:
+        class: 'Rapsys\PackBundle\Util\IntlUtil'
+        public: true
+    # Register map util service
+    rapsyspack.map_util:
+        class: 'Rapsys\PackBundle\Util\MapUtil'
+        arguments: [ '@router', '@rapsyspack.slugger_util' ]
+        public: true
+    # Register twig pack extension
+    rapsyspack.pack_extension:
+        class: 'Rapsys\PackBundle\Extension\PackExtension'
+        arguments: [ '@service_container', '@rapsyspack.intl_util', '@file_locator', '@rapsyspack.path_package', '@rapsyspack.slugger_util' ]
+        tags: [ 'twig.extension' ]
+    # Register assets pack package
+    rapsyspack.path_package:
+        class: 'Rapsys\PackBundle\Package\PathPackage'
+        arguments: [ '/', '@assets.empty_version_strategy', '@assets.context' ]
+        public: true
+    # Register slugger util service
+    rapsyspack.slugger_util:
+        class: 'Rapsys\PackBundle\Util\SluggerUtil'
+        arguments: [ '%env(string:RAPSYSPACK_RANGE)%', '%kernel.secret%' ]
+        public: true
+    # Register range command
+    Rapsys\PackBundle\Command\RangeCommand:
+        arguments: [ '%kernel.project_dir%/.env.local' ]
+        tags: [ 'console.command' ]
+    # Register image controller
+    Rapsys\PackBundle\Controller\ImageController:
+        arguments: [ '@service_container', '@rapsyspack.image_util', '@rapsyspack.slugger_util', '%kernel.project_dir%/var/cache', '%rapsyspack.path%' ]
+        tags: [ 'controller.service_arguments' ]
+    # Register map controller
+    Rapsys\PackBundle\Controller\MapController:
+        arguments: [ '@service_container', '@rapsyspack.map_util', '@rapsyspack.slugger_util', '%kernel.project_dir%/var/cache', '%rapsyspack.path%' ]
+        tags: [ 'controller.service_arguments' ]
+    # Register captcha form type
+    Rapsys\PackBundle\Form\CaptchaType:
+        arguments: [ '@rapsyspack.image_util', '@rapsyspack.slugger_util', '@translator' ]
+        tags: [ 'form.type' ]
+    # Register facebook event subscriber
+    Rapsys\PackBundle\Subscriber\FacebookSubscriber:
+        arguments: [ '@router', [] ]
+        tags: [ 'kernel.event_subscriber' ]
+    # Register facebook util class alias
+    Rapsys\PackBundle\Util\FacebookUtil:
+        alias: 'rapsyspack.facebook_util'
+    # Register image util class alias
+    Rapsys\PackBundle\Util\ImageUtil:
+        alias: 'rapsyspack.image_util'
+    # Register intl util class alias
+    Rapsys\PackBundle\Util\IntlUtil:
+        alias: 'rapsyspack.intl_util'
+    # Register map util class alias
+    Rapsys\PackBundle\Util\MapUtil:
+        alias: 'rapsyspack.map_util'
+    # Register slugger util class alias
+    Rapsys\PackBundle\Util\SluggerUtil:
+        alias: 'rapsyspack.slugger_util'