diff options
Diffstat (limited to 'phpBB/config')
36 files changed, 176 insertions, 30 deletions
diff --git a/phpBB/config/default/config.yml b/phpBB/config/default/config.yml new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/phpBB/config/default/config.yml diff --git a/phpBB/config/parameters.yml b/phpBB/config/default/container/parameters.yml index 8ecc1428f4..8ecc1428f4 100644 --- a/phpBB/config/parameters.yml +++ b/phpBB/config/default/container/parameters.yml diff --git a/phpBB/config/services.yml b/phpBB/config/default/container/services.yml index 975f2f7580..6cf9180cc0 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/default/container/services.yml @@ -1,18 +1,19 @@ imports: - - { resource: auth.yml } - - { resource: avatar.yml } - - { resource: captcha.yml } - - { resource: console.yml } - - { resource: content.yml } - - { resource: cron.yml } - - { resource: db.yml } - - { resource: event.yml } - - { resource: feed.yml } - - { resource: mimetype_guesser.yml } - - { resource: notification.yml } - - { resource: password.yml } - - { resource: profilefield.yml } - - { resource: user.yml } + - { resource: services_auth.yml } + - { resource: services_avatar.yml } + - { resource: services_captcha.yml } + - { resource: services_console.yml } + - { resource: services_content.yml } + - { resource: services_cron.yml } + - { resource: services_db.yml } + - { resource: services_event.yml } + - { resource: services_feed.yml } + - { resource: services_mimetype_guesser.yml } + - { resource: services_notification.yml } + - { resource: services_password.yml } + - { resource: services_profilefield.yml } + - { resource: services_twig.yml } + - { resource: services_user.yml } - { resource: tables.yml } - { resource: parameters.yml } @@ -72,8 +73,7 @@ services: - @template - @user - @config - - @controller.provider - - @ext.manager + - @router - @symfony_request - @request - @filesystem @@ -88,11 +88,6 @@ services: - %core.root_path% - @template - controller.provider: - class: phpbb\controller\provider - calls: - - [find, [%core.root_path%]] - ext.manager: class: phpbb\extension\manager arguments: @@ -156,6 +151,21 @@ services: - null - %core.disable_super_globals% + router: + class: phpbb\routing\router + arguments: + - @ext.manager + - %core.root_path% + - %core.php_ext% + - %core.environment% + + router.listener: + class: Symfony\Component\HttpKernel\EventListener\RouterListener + arguments: + - @router + tags: + - { name: kernel.event_subscriber } + # WARNING: The Symfony request does not escape the input and should be used very carefully # prefer the phpbb request (service @request) as possible symfony_request: @@ -170,6 +180,9 @@ services: - @config - @user - @template_context + - @template.twig.environment + - %core.template.cache_path% + - @template.twig.extensions.collection - @ext.manager template_context: diff --git a/phpBB/config/auth.yml b/phpBB/config/default/container/services_auth.yml index 88a90ca2d6..88a90ca2d6 100644 --- a/phpBB/config/auth.yml +++ b/phpBB/config/default/container/services_auth.yml diff --git a/phpBB/config/avatar.yml b/phpBB/config/default/container/services_avatar.yml index 5292489715..5292489715 100644 --- a/phpBB/config/avatar.yml +++ b/phpBB/config/default/container/services_avatar.yml diff --git a/phpBB/config/captcha.yml b/phpBB/config/default/container/services_captcha.yml index e3f617e909..e3f617e909 100644 --- a/phpBB/config/captcha.yml +++ b/phpBB/config/default/container/services_captcha.yml diff --git a/phpBB/config/console.yml b/phpBB/config/default/container/services_console.yml index 1e18a7dd37..1e18a7dd37 100644 --- a/phpBB/config/console.yml +++ b/phpBB/config/default/container/services_console.yml diff --git a/phpBB/config/content.yml b/phpBB/config/default/container/services_content.yml index f0985f0292..f0985f0292 100644 --- a/phpBB/config/content.yml +++ b/phpBB/config/default/container/services_content.yml diff --git a/phpBB/config/cron.yml b/phpBB/config/default/container/services_cron.yml index 7a90c39733..7a90c39733 100644 --- a/phpBB/config/cron.yml +++ b/phpBB/config/default/container/services_cron.yml diff --git a/phpBB/config/db.yml b/phpBB/config/default/container/services_db.yml index b3f1b485ea..b3f1b485ea 100644 --- a/phpBB/config/db.yml +++ b/phpBB/config/default/container/services_db.yml diff --git a/phpBB/config/event.yml b/phpBB/config/default/container/services_event.yml index 599b3cbb40..1ccef78f9b 100644 --- a/phpBB/config/event.yml +++ b/phpBB/config/default/container/services_event.yml @@ -11,15 +11,6 @@ services: - %core.php_ext% - @cache.driver - kernel_request_subscriber: - class: phpbb\event\kernel_request_subscriber - arguments: - - @ext.manager - - %core.root_path% - - %core.php_ext% - tags: - - { name: kernel.event_subscriber } - kernel_exception_subscriber: class: phpbb\event\kernel_exception_subscriber arguments: diff --git a/phpBB/config/feed.yml b/phpBB/config/default/container/services_feed.yml index 48bd9fe76f..48bd9fe76f 100644 --- a/phpBB/config/feed.yml +++ b/phpBB/config/default/container/services_feed.yml diff --git a/phpBB/config/default/container/services_migrator.yml b/phpBB/config/default/container/services_migrator.yml new file mode 100644 index 0000000000..cd04eea5c2 --- /dev/null +++ b/phpBB/config/default/container/services_migrator.yml @@ -0,0 +1,60 @@ +services: + migrator: + class: phpbb\db\migrator + arguments: + - @config + - @dbal.conn + - @dbal.tools + - %tables.migrations% + - %core.root_path% + - %core.php_ext% + - %core.table_prefix% + - @migrator.tool_collection + - @migrator.helper + + migrator.helper: + class: phpbb\db\migration\helper + + migrator.tool_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: migrator.tool } + + migrator.tool.config: + class: phpbb\db\migration\tool\config + arguments: + - @config + tags: + - { name: migrator.tool } + + migrator.tool.config_text: + class: phpbb\db\migration\tool\config_text + arguments: + - @config_text + tags: + - { name: migrator.tool } + + migrator.tool.module: + class: phpbb\db\migration\tool\module + arguments: + - @dbal.conn + - @cache + - @user + - %core.root_path% + - %core.php_ext% + - %tables.modules% + tags: + - { name: migrator.tool } + + migrator.tool.permission: + class: phpbb\db\migration\tool\permission + arguments: + - @dbal.conn + - @cache + - @auth + - %core.root_path% + - %core.php_ext% + tags: + - { name: migrator.tool } diff --git a/phpBB/config/mimetype_guesser.yml b/phpBB/config/default/container/services_mimetype_guesser.yml index 2e89ed3c1f..2e89ed3c1f 100644 --- a/phpBB/config/mimetype_guesser.yml +++ b/phpBB/config/default/container/services_mimetype_guesser.yml diff --git a/phpBB/config/notification.yml b/phpBB/config/default/container/services_notification.yml index add577be2c..add577be2c 100644 --- a/phpBB/config/notification.yml +++ b/phpBB/config/default/container/services_notification.yml diff --git a/phpBB/config/password.yml b/phpBB/config/default/container/services_password.yml index cb45ec3d42..cb45ec3d42 100644 --- a/phpBB/config/password.yml +++ b/phpBB/config/default/container/services_password.yml diff --git a/phpBB/config/profilefield.yml b/phpBB/config/default/container/services_profilefield.yml index 5ccfef9148..5ccfef9148 100644 --- a/phpBB/config/profilefield.yml +++ b/phpBB/config/default/container/services_profilefield.yml diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml new file mode 100644 index 0000000000..fc5f9ba6a1 --- /dev/null +++ b/phpBB/config/default/container/services_twig.yml @@ -0,0 +1,43 @@ +parameters: + core.template.cache_path: %core.root_path%cache/%core.environment%/twig/ + +services: + template.twig.environment: + class: phpbb\template\twig\environment + arguments: + - @config + - @path_helper + - @service_container + - %core.template.cache_path% + - @ext.manager + - @template.twig.loader + + template.twig.lexer: + class: phpbb\template\twig\lexer + arguments: + - @template.twig.environment + + template.twig.loader: + class: phpbb\template\twig\loader + + template.twig.extensions.collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: twig.extension } + + template.twig.extensions.phpbb: + class: phpbb\template\twig\extension + arguments: + - @template_context + - @user + tags: + - { name: twig.extension } + + template.twig.extensions.routing: + class: Symfony\Bridge\Twig\Extension\RoutingExtension + arguments: + - @router + tags: + - { name: twig.extension } diff --git a/phpBB/config/user.yml b/phpBB/config/default/container/services_user.yml index 1ca853ea45..1ca853ea45 100644 --- a/phpBB/config/user.yml +++ b/phpBB/config/default/container/services_user.yml diff --git a/phpBB/config/tables.yml b/phpBB/config/default/container/tables.yml index 2fe2a33be8..2fe2a33be8 100644 --- a/phpBB/config/tables.yml +++ b/phpBB/config/default/container/tables.yml diff --git a/phpBB/config/routing.yml b/phpBB/config/default/routing/routing.yml index d8e890d063..d8e890d063 100644 --- a/phpBB/config/routing.yml +++ b/phpBB/config/default/routing/routing.yml diff --git a/phpBB/config/development/config.yml b/phpBB/config/development/config.yml new file mode 100644 index 0000000000..1c17b08931 --- /dev/null +++ b/phpBB/config/development/config.yml @@ -0,0 +1,5 @@ +imports: + - { resource: ../default/config.yml } + +core: + require_dev_dependencies: true diff --git a/phpBB/config/development/container/environment.yml b/phpBB/config/development/container/environment.yml new file mode 100644 index 0000000000..40a3c7a683 --- /dev/null +++ b/phpBB/config/development/container/environment.yml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yml } + - { resource: parameters.yml } diff --git a/phpBB/config/development/container/parameters.yml b/phpBB/config/development/container/parameters.yml new file mode 100644 index 0000000000..0447646806 --- /dev/null +++ b/phpBB/config/development/container/parameters.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/parameters.yml } diff --git a/phpBB/config/development/container/services.yml b/phpBB/config/development/container/services.yml new file mode 100644 index 0000000000..b302f0f966 --- /dev/null +++ b/phpBB/config/development/container/services.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/services.yml } diff --git a/phpBB/config/development/routing/environment.yml b/phpBB/config/development/routing/environment.yml new file mode 100644 index 0000000000..0cddfb7521 --- /dev/null +++ b/phpBB/config/development/routing/environment.yml @@ -0,0 +1,2 @@ +core.default: + resource: "../../default/routing/routing.yml" diff --git a/phpBB/config/production/config.yml b/phpBB/config/production/config.yml new file mode 100644 index 0000000000..979dbbcdd9 --- /dev/null +++ b/phpBB/config/production/config.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../default/config.yml } diff --git a/phpBB/config/production/container/environment.yml b/phpBB/config/production/container/environment.yml new file mode 100644 index 0000000000..40a3c7a683 --- /dev/null +++ b/phpBB/config/production/container/environment.yml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yml } + - { resource: parameters.yml } diff --git a/phpBB/config/production/container/parameters.yml b/phpBB/config/production/container/parameters.yml new file mode 100644 index 0000000000..0447646806 --- /dev/null +++ b/phpBB/config/production/container/parameters.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/parameters.yml } diff --git a/phpBB/config/production/container/services.yml b/phpBB/config/production/container/services.yml new file mode 100644 index 0000000000..b302f0f966 --- /dev/null +++ b/phpBB/config/production/container/services.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/services.yml } diff --git a/phpBB/config/production/routing/environment.yml b/phpBB/config/production/routing/environment.yml new file mode 100644 index 0000000000..0cddfb7521 --- /dev/null +++ b/phpBB/config/production/routing/environment.yml @@ -0,0 +1,2 @@ +core.default: + resource: "../../default/routing/routing.yml" diff --git a/phpBB/config/test/config.yml b/phpBB/config/test/config.yml new file mode 100644 index 0000000000..1c17b08931 --- /dev/null +++ b/phpBB/config/test/config.yml @@ -0,0 +1,5 @@ +imports: + - { resource: ../default/config.yml } + +core: + require_dev_dependencies: true diff --git a/phpBB/config/test/container/environment.yml b/phpBB/config/test/container/environment.yml new file mode 100644 index 0000000000..40a3c7a683 --- /dev/null +++ b/phpBB/config/test/container/environment.yml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yml } + - { resource: parameters.yml } diff --git a/phpBB/config/test/container/parameters.yml b/phpBB/config/test/container/parameters.yml new file mode 100644 index 0000000000..0447646806 --- /dev/null +++ b/phpBB/config/test/container/parameters.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/parameters.yml } diff --git a/phpBB/config/test/container/services.yml b/phpBB/config/test/container/services.yml new file mode 100644 index 0000000000..b302f0f966 --- /dev/null +++ b/phpBB/config/test/container/services.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/services.yml } diff --git a/phpBB/config/test/routing/environment.yml b/phpBB/config/test/routing/environment.yml new file mode 100644 index 0000000000..0cddfb7521 --- /dev/null +++ b/phpBB/config/test/routing/environment.yml @@ -0,0 +1,2 @@ +core.default: + resource: "../../default/routing/routing.yml" |