From c22562f5cdb3db9482a7c6bc2398ebb12cbcfb8b Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 30 May 2014 14:57:19 +0200 Subject: [ticket/12620] Allow the user to define multiples environments PHPBB3-12620 --- phpBB/common.php | 5 + phpBB/config/auth.yml | 100 -------- phpBB/config/avatar.yml | 67 ----- phpBB/config/captcha.yml | 59 ----- phpBB/config/config_debug.yml | 2 + phpBB/config/config_productive.yml | 2 + phpBB/config/console.yml | 141 ----------- phpBB/config/content.yml | 71 ------ phpBB/config/cron.yml | 147 ----------- phpBB/config/db.yml | 77 ------ phpBB/config/event.yml | 25 -- phpBB/config/feed.yml | 106 -------- phpBB/config/mimetype_guesser.yml | 36 --- phpBB/config/notification.yml | 389 ----------------------------- phpBB/config/password.yml | 124 --------- phpBB/config/profilefield.yml | 102 -------- phpBB/config/services.yml | 30 +-- phpBB/config/services_auth.yml | 100 ++++++++ phpBB/config/services_avatar.yml | 67 +++++ phpBB/config/services_captcha.yml | 59 +++++ phpBB/config/services_console.yml | 141 +++++++++++ phpBB/config/services_content.yml | 71 ++++++ phpBB/config/services_cron.yml | 147 +++++++++++ phpBB/config/services_db.yml | 77 ++++++ phpBB/config/services_event.yml | 25 ++ phpBB/config/services_feed.yml | 106 ++++++++ phpBB/config/services_mimetype_guesser.yml | 36 +++ phpBB/config/services_notification.yml | 389 +++++++++++++++++++++++++++++ phpBB/config/services_password.yml | 124 +++++++++ phpBB/config/services_profilefield.yml | 102 ++++++++ phpBB/config/services_twig.yml | 43 ++++ phpBB/config/services_user.yml | 19 ++ phpBB/config/twig.yml | 43 ---- phpBB/config/user.yml | 19 -- phpBB/includes/functions_install.php | 4 +- phpBB/phpbb/di/extension/core.php | 2 +- 36 files changed, 1533 insertions(+), 1524 deletions(-) delete mode 100644 phpBB/config/auth.yml delete mode 100644 phpBB/config/avatar.yml delete mode 100644 phpBB/config/captcha.yml create mode 100644 phpBB/config/config_debug.yml create mode 100644 phpBB/config/config_productive.yml delete mode 100644 phpBB/config/console.yml delete mode 100644 phpBB/config/content.yml delete mode 100644 phpBB/config/cron.yml delete mode 100644 phpBB/config/db.yml delete mode 100644 phpBB/config/event.yml delete mode 100644 phpBB/config/feed.yml delete mode 100644 phpBB/config/mimetype_guesser.yml delete mode 100644 phpBB/config/notification.yml delete mode 100644 phpBB/config/password.yml delete mode 100644 phpBB/config/profilefield.yml create mode 100644 phpBB/config/services_auth.yml create mode 100644 phpBB/config/services_avatar.yml create mode 100644 phpBB/config/services_captcha.yml create mode 100644 phpBB/config/services_console.yml create mode 100644 phpBB/config/services_content.yml create mode 100644 phpBB/config/services_cron.yml create mode 100644 phpBB/config/services_db.yml create mode 100644 phpBB/config/services_event.yml create mode 100644 phpBB/config/services_feed.yml create mode 100644 phpBB/config/services_mimetype_guesser.yml create mode 100644 phpBB/config/services_notification.yml create mode 100644 phpBB/config/services_password.yml create mode 100644 phpBB/config/services_profilefield.yml create mode 100644 phpBB/config/services_twig.yml create mode 100644 phpBB/config/services_user.yml delete mode 100644 phpBB/config/twig.yml delete mode 100644 phpBB/config/user.yml (limited to 'phpBB') diff --git a/phpBB/common.php b/phpBB/common.php index 0782bd7321..d4549dc2d4 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -29,6 +29,11 @@ $phpbb_class_loader->register(); $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); extract($phpbb_config_php_file->get_all()); +if (!defined('ENVIRONMENT')) +{ + @define('ENVIRONMENT', 'productive'); +} + if (!defined('PHPBB_INSTALLED')) { // Redirect the user to the installer diff --git a/phpBB/config/auth.yml b/phpBB/config/auth.yml deleted file mode 100644 index 88a90ca2d6..0000000000 --- a/phpBB/config/auth.yml +++ /dev/null @@ -1,100 +0,0 @@ -services: -# ----- Auth management ----- - auth: - class: phpbb\auth\auth - -# ----- Auth providers ----- - auth.provider_collection: - class: phpbb\auth\provider_collection - arguments: - - @service_container - - @config - tags: - - { name: service_collection, tag: auth.provider } - - auth.provider.db: - class: phpbb\auth\provider\db - arguments: - - @dbal.conn - - @config - - @passwords.manager - - @request - - @user - - @service_container - - %core.root_path% - - %core.php_ext% - tags: - - { name: auth.provider } - - auth.provider.apache: - class: phpbb\auth\provider\apache - arguments: - - @dbal.conn - - @config - - @passwords.manager - - @request - - @user - - %core.root_path% - - %core.php_ext% - tags: - - { name: auth.provider } - - auth.provider.ldap: - class: phpbb\auth\provider\ldap - arguments: - - @dbal.conn - - @config - - @passwords.manager - - @user - tags: - - { name: auth.provider } - - auth.provider.oauth: - class: phpbb\auth\provider\oauth\oauth - arguments: - - @dbal.conn - - @config - - @passwords.manager - - @request - - @user - - %tables.auth_provider_oauth_token_storage% - - %tables.auth_provider_oauth_account_assoc% - - @auth.provider.oauth.service_collection - - %tables.users% - - @service_container - - %core.root_path% - - %core.php_ext% - tags: - - { name: auth.provider } - -# ----- OAuth services providers ----- - auth.provider.oauth.service_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: auth.provider.oauth.service } - - auth.provider.oauth.service.bitly: - class: phpbb\auth\provider\oauth\service\bitly - arguments: - - @config - - @request - tags: - - { name: auth.provider.oauth.service } - - auth.provider.oauth.service.facebook: - class: phpbb\auth\provider\oauth\service\facebook - arguments: - - @config - - @request - tags: - - { name: auth.provider.oauth.service } - - auth.provider.oauth.service.google: - class: phpbb\auth\provider\oauth\service\google - arguments: - - @config - - @request - tags: - - { name: auth.provider.oauth.service } diff --git a/phpBB/config/avatar.yml b/phpBB/config/avatar.yml deleted file mode 100644 index 5292489715..0000000000 --- a/phpBB/config/avatar.yml +++ /dev/null @@ -1,67 +0,0 @@ -services: - avatar.manager: - class: phpbb\avatar\manager - arguments: - - @config - - @avatar.driver_collection - -# ----- Avatar drivers ----- - avatar.driver_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: avatar.driver } - - avatar.driver.gravatar: - class: phpbb\avatar\driver\gravatar - arguments: - - @config - - %core.root_path% - - %core.php_ext% - - @path_helper - - @cache.driver - calls: - - [set_name, [avatar.driver.gravatar]] - tags: - - { name: avatar.driver } - - avatar.driver.local: - class: phpbb\avatar\driver\local - arguments: - - @config - - %core.root_path% - - %core.php_ext% - - @path_helper - - @cache.driver - calls: - - [set_name, [avatar.driver.local]] - tags: - - { name: avatar.driver } - - avatar.driver.remote: - class: phpbb\avatar\driver\remote - arguments: - - @config - - %core.root_path% - - %core.php_ext% - - @path_helper - - @cache.driver - calls: - - [set_name, [avatar.driver.remote]] - tags: - - { name: avatar.driver } - - avatar.driver.upload: - class: phpbb\avatar\driver\upload - arguments: - - @config - - %core.root_path% - - %core.php_ext% - - @path_helper - - @mimetype.guesser - - @cache.driver - calls: - - [set_name, [avatar.driver.upload]] - tags: - - { name: avatar.driver } diff --git a/phpBB/config/captcha.yml b/phpBB/config/captcha.yml deleted file mode 100644 index e3f617e909..0000000000 --- a/phpBB/config/captcha.yml +++ /dev/null @@ -1,59 +0,0 @@ -services: - captcha.factory: - class: phpbb\captcha\factory - arguments: - - @service_container - - @captcha.plugins.service_collection - -# ----- Captcha plugins ----- -# Scope MUST be prototype for all the plugins to work. - captcha.plugins.service_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: captcha.plugins } - - core.captcha.plugins.gd: - class: phpbb\captcha\plugins\gd - scope: prototype - calls: - - [set_name, [core.captcha.plugins.gd]] - tags: - - { name: captcha.plugins } - - core.captcha.plugins.gd_wave: - class: phpbb\captcha\plugins\gd_wave - scope: prototype - calls: - - [set_name, [core.captcha.plugins.gd_wave]] - tags: - - { name: captcha.plugins } - - core.captcha.plugins.nogd: - class: phpbb\captcha\plugins\nogd - scope: prototype - calls: - - [set_name, [core.captcha.plugins.nogd]] - tags: - - { name: captcha.plugins } - - core.captcha.plugins.qa: - class: phpbb\captcha\plugins\qa - scope: prototype - arguments: - - %tables.captcha_qa_questions% - - %tables.captcha_qa_answers% - - %tables.captcha_qa_confirm% - calls: - - [set_name, [core.captcha.plugins.qa]] - tags: - - { name: captcha.plugins } - - core.captcha.plugins.recaptcha: - class: phpbb\captcha\plugins\recaptcha - scope: prototype - calls: - - [set_name, [core.captcha.plugins.recaptcha]] - tags: - - { name: captcha.plugins } diff --git a/phpBB/config/config_debug.yml b/phpBB/config/config_debug.yml new file mode 100644 index 0000000000..6982aa4f83 --- /dev/null +++ b/phpBB/config/config_debug.yml @@ -0,0 +1,2 @@ +imports: + - { resource: services.yml } diff --git a/phpBB/config/config_productive.yml b/phpBB/config/config_productive.yml new file mode 100644 index 0000000000..6982aa4f83 --- /dev/null +++ b/phpBB/config/config_productive.yml @@ -0,0 +1,2 @@ +imports: + - { resource: services.yml } diff --git a/phpBB/config/console.yml b/phpBB/config/console.yml deleted file mode 100644 index 1e18a7dd37..0000000000 --- a/phpBB/config/console.yml +++ /dev/null @@ -1,141 +0,0 @@ -services: - console.command_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: console.command } - - console.command.cache.purge: - class: phpbb\console\command\cache\purge - arguments: - - @user - - @cache.driver - - @dbal.conn - - @auth - - @log - - @config - tags: - - { name: console.command } - - console.command.config.delete: - class: phpbb\console\command\config\delete - arguments: - - @user - - @config - tags: - - { name: console.command } - - console.command.config.increment: - class: phpbb\console\command\config\increment - arguments: - - @user - - @config - tags: - - { name: console.command } - - console.command.config.get: - class: phpbb\console\command\config\get - arguments: - - @user - - @config - tags: - - { name: console.command } - - console.command.config.set: - class: phpbb\console\command\config\set - arguments: - - @user - - @config - tags: - - { name: console.command } - - console.command.config.set_atomic: - class: phpbb\console\command\config\set_atomic - arguments: - - @user - - @config - tags: - - { name: console.command } - - console.command.cron.list: - class: phpbb\console\command\cron\cron_list - arguments: - - @user - - @cron.manager - tags: - - { name: console.command } - - console.command.cron.run: - class: phpbb\console\command\cron\run - arguments: - - @user - - @cron.manager - - @cron.lock_db - tags: - - { name: console.command } - - console.command.db.migrate: - class: phpbb\console\command\db\migrate - arguments: - - @user - - @migrator - - @ext.manager - - @config - - @cache - - @log - - %core.root_path% - tags: - - { name: console.command } - - console.command.dev.migration_tips: - class: phpbb\console\command\dev\migration_tips - arguments: - - @user - - @ext.manager - tags: - - { name: console.command } - - console.command.extension.disable: - class: phpbb\console\command\extension\disable - arguments: - - @user - - @ext.manager - - @log - tags: - - { name: console.command } - - console.command.extension.enable: - class: phpbb\console\command\extension\enable - arguments: - - @user - - @ext.manager - - @log - tags: - - { name: console.command } - - console.command.extension.purge: - class: phpbb\console\command\extension\purge - arguments: - - @user - - @ext.manager - - @log - tags: - - { name: console.command } - - console.command.extension.show: - class: phpbb\console\command\extension\show - arguments: - - @user - - @ext.manager - - @log - tags: - - { name: console.command } - - console.command.fixup.recalculate_email_hash: - class: phpbb\console\command\fixup\recalculate_email_hash - arguments: - - @user - - @dbal.conn - tags: - - { name: console.command } diff --git a/phpBB/config/content.yml b/phpBB/config/content.yml deleted file mode 100644 index f0985f0292..0000000000 --- a/phpBB/config/content.yml +++ /dev/null @@ -1,71 +0,0 @@ -services: - content.visibility: - class: phpbb\content_visibility - arguments: - - @auth - - @config - - @dbal.conn - - @user - - %core.root_path% - - %core.php_ext% - - %tables.forums% - - %tables.posts% - - %tables.topics% - - %tables.users% - - groupposition.legend: - class: phpbb\groupposition\legend - arguments: - - @dbal.conn - - @user - - groupposition.teampage: - class: phpbb\groupposition\teampage - arguments: - - @dbal.conn - - @user - - @cache.driver - - message.form.admin: - class: phpbb\message\admin_form - arguments: - - @auth - - @config - - @config_text - - @dbal.conn - - @user - - %core.root_path% - - %core.php_ext% - - message.form.topic: - class: phpbb\message\topic_form - arguments: - - @auth - - @config - - @dbal.conn - - @user - - %core.root_path% - - %core.php_ext% - - message.form.user: - class: phpbb\message\user_form - arguments: - - @auth - - @config - - @dbal.conn - - @user - - %core.root_path% - - %core.php_ext% - - pagination: - class: phpbb\pagination - arguments: - - @template - - @user - - @controller.helper - - @dispatcher - - viewonline_helper: - class: phpbb\viewonline_helper - arguments: - - @filesystem diff --git a/phpBB/config/cron.yml b/phpBB/config/cron.yml deleted file mode 100644 index 7a90c39733..0000000000 --- a/phpBB/config/cron.yml +++ /dev/null @@ -1,147 +0,0 @@ -services: - cron.manager: - class: phpbb\cron\manager - arguments: - - @cron.task_collection - - %core.root_path% - - %core.php_ext% - - cron.lock_db: - class: phpbb\lock\db - arguments: - - cron_lock - - @config - - @dbal.conn - -# ----- Cron tasks ----- - cron.task_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: cron.task } - - cron.task.core.prune_all_forums: - class: phpbb\cron\task\core\prune_all_forums - arguments: - - %core.root_path% - - %core.php_ext% - - @config - - @dbal.conn - calls: - - [set_name, [cron.task.core.prune_all_forums]] - tags: - - { name: cron.task } - - cron.task.core.prune_forum: - class: phpbb\cron\task\core\prune_forum - arguments: - - %core.root_path% - - %core.php_ext% - - @config - - @dbal.conn - calls: - - [set_name, [cron.task.core.prune_forum]] - tags: - - { name: cron.task } - - cron.task.core.prune_shadow_topics: - class: phpbb\cron\task\core\prune_shadow_topics - arguments: - - %core.root_path% - - %core.php_ext% - - @config - - @dbal.conn - - @log - - @user - calls: - - [set_name, [cron.task.core.prune_shadow_topics]] - tags: - - { name: cron.task } - - cron.task.core.prune_notifications: - class: phpbb\cron\task\core\prune_notifications - arguments: - - @config - - @notification_manager - calls: - - [set_name, [cron.task.core.prune_notifications]] - tags: - - { name: cron.task } - - cron.task.core.queue: - class: phpbb\cron\task\core\queue - arguments: - - %core.root_path% - - %core.php_ext% - - @config - calls: - - [set_name, [cron.task.core.queue]] - tags: - - { name: cron.task } - - cron.task.core.tidy_cache: - class: phpbb\cron\task\core\tidy_cache - arguments: - - @config - - @cache.driver - calls: - - [set_name, [cron.task.core.tidy_cache]] - tags: - - { name: cron.task } - - cron.task.core.tidy_database: - class: phpbb\cron\task\core\tidy_database - arguments: - - %core.root_path% - - %core.php_ext% - - @config - calls: - - [set_name, [cron.task.core.tidy_database]] - tags: - - { name: cron.task } - - cron.task.core.tidy_plupload: - class: phpbb\cron\task\core\tidy_plupload - arguments: - - %core.root_path% - - @config - calls: - - [set_name, [cron.task.core.tidy_plupload]] - tags: - - { name: cron.task } - - cron.task.core.tidy_search: - class: phpbb\cron\task\core\tidy_search - arguments: - - %core.root_path% - - %core.php_ext% - - @auth - - @config - - @dbal.conn - - @user - calls: - - [set_name, [cron.task.core.tidy_search]] - tags: - - { name: cron.task } - - cron.task.core.tidy_sessions: - class: phpbb\cron\task\core\tidy_sessions - arguments: - - @config - - @user - calls: - - [set_name, [cron.task.core.tidy_sessions]] - tags: - - { name: cron.task } - - cron.task.core.tidy_warnings: - class: phpbb\cron\task\core\tidy_warnings - arguments: - - %core.root_path% - - %core.php_ext% - - @config - calls: - - [set_name, [cron.task.core.tidy_warnings]] - tags: - - { name: cron.task } diff --git a/phpBB/config/db.yml b/phpBB/config/db.yml deleted file mode 100644 index b3f1b485ea..0000000000 --- a/phpBB/config/db.yml +++ /dev/null @@ -1,77 +0,0 @@ -services: - dbal.conn: - class: phpbb\db\driver\factory - arguments: - - @service_container - - dbal.conn.driver: - class: %dbal.driver.class% - calls: - - [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]] - - dbal.tools: - class: phpbb\db\tools - arguments: - - @dbal.conn - -# ----- Migrator ----- - 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's tools ----- - 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/event.yml b/phpBB/config/event.yml deleted file mode 100644 index 1ccef78f9b..0000000000 --- a/phpBB/config/event.yml +++ /dev/null @@ -1,25 +0,0 @@ -services: - dispatcher: - class: phpbb\event\dispatcher - arguments: - - @service_container - - hook_finder: - class: phpbb\hook\finder - arguments: - - %core.root_path% - - %core.php_ext% - - @cache.driver - - kernel_exception_subscriber: - class: phpbb\event\kernel_exception_subscriber - arguments: - - @template - - @user - tags: - - { name: kernel.event_subscriber } - - kernel_terminate_subscriber: - class: phpbb\event\kernel_terminate_subscriber - tags: - - { name: kernel.event_subscriber } diff --git a/phpBB/config/feed.yml b/phpBB/config/feed.yml deleted file mode 100644 index 48bd9fe76f..0000000000 --- a/phpBB/config/feed.yml +++ /dev/null @@ -1,106 +0,0 @@ -services: - feed.helper: - class: phpbb\feed\helper - arguments: - - @config - - @user - - %core.root_path% - - %core.php_ext% - - feed.factory: - class: phpbb\feed\factory - arguments: - - @service_container - - @config - - @dbal.conn - - feed.forum: - class: phpbb\feed\forum - scope: prototype - arguments: - - @feed.helper - - @config - - @dbal.conn - - @cache.driver - - @user - - @auth - - @content.visibility - - %core.php_ext% - - feed.forums: - class: phpbb\feed\forums - scope: prototype - arguments: - - @feed.helper - - @config - - @dbal.conn - - @cache.driver - - @user - - @auth - - @content.visibility - - %core.php_ext% - - feed.news: - class: phpbb\feed\news - scope: prototype - arguments: - - @feed.helper - - @config - - @dbal.conn - - @cache.driver - - @user - - @auth - - @content.visibility - - %core.php_ext% - - feed.overall: - class: phpbb\feed\overall - scope: prototype - arguments: - - @feed.helper - - @config - - @dbal.conn - - @cache.driver - - @user - - @auth - - @content.visibility - - %core.php_ext% - - feed.topic: - class: phpbb\feed\topic - scope: prototype - arguments: - - @feed.helper - - @config - - @dbal.conn - - @cache.driver - - @user - - @auth - - @content.visibility - - %core.php_ext% - - feed.topics: - class: phpbb\feed\topics - scope: prototype - arguments: - - @feed.helper - - @config - - @dbal.conn - - @cache.driver - - @user - - @auth - - @content.visibility - - %core.php_ext% - - feed.topics_active: - class: phpbb\feed\topics_active - scope: prototype - arguments: - - @feed.helper - - @config - - @dbal.conn - - @cache.driver - - @user - - @auth - - @content.visibility - - %core.php_ext% diff --git a/phpBB/config/mimetype_guesser.yml b/phpBB/config/mimetype_guesser.yml deleted file mode 100644 index 2e89ed3c1f..0000000000 --- a/phpBB/config/mimetype_guesser.yml +++ /dev/null @@ -1,36 +0,0 @@ -services: - mimetype.guesser_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: mimetype.guessers } - - mimetype.fileinfo_mimetype_guesser: - class: Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser - tags: - - { name: mimetype.guessers } - - mimetype.filebinary_mimetype_guesser: - class: Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser - tags: - - { name: mimetype.guessers } - - mimetype.content_guesser: - class: phpbb\mimetype\content_guesser - calls: - - [set_priority, [%mimetype.guesser.priority.low%]] - tags: - - { name: mimetype.guessers } - - mimetype.extension_guesser: - class: phpbb\mimetype\extension_guesser - calls: - - [set_priority, [%mimetype.guesser.priority.lowest%]] - tags: - - { name: mimetype.guessers } - - mimetype.guesser: - class: phpbb\mimetype\guesser - arguments: - - @mimetype.guesser_collection diff --git a/phpBB/config/notification.yml b/phpBB/config/notification.yml deleted file mode 100644 index add577be2c..0000000000 --- a/phpBB/config/notification.yml +++ /dev/null @@ -1,389 +0,0 @@ -services: - notification_manager: - class: phpbb\notification\manager - arguments: - - @notification.type_collection - - @notification.method_collection - - @service_container - - @user_loader - - @config - - @dbal.conn - - @cache - - @user - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - -# ----- Notification's types ----- -# Scope MUST be prototype for all the plugins to work. - notification.type_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: notification.type } - - notification.type.approve_post: - class: phpbb\notification\type\approve_post - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.approve_topic: - class: phpbb\notification\type\approve_topic - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.bookmark: - class: phpbb\notification\type\bookmark - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.disapprove_post: - class: phpbb\notification\type\disapprove_post - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.disapprove_topic: - class: phpbb\notification\type\disapprove_topic - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.group_request: - class: phpbb\notification\type\group_request - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.group_request_approved: - class: phpbb\notification\type\group_request_approved - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.pm: - class: phpbb\notification\type\pm - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.post: - class: phpbb\notification\type\post - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.post_in_queue: - class: phpbb\notification\type\post_in_queue - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.quote: - class: phpbb\notification\type\quote - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.report_pm: - class: phpbb\notification\type\report_pm - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.report_pm_closed: - class: phpbb\notification\type\report_pm_closed - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.report_post: - class: phpbb\notification\type\report_post - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.report_post_closed: - class: phpbb\notification\type\report_post_closed - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.topic: - class: phpbb\notification\type\topic - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.topic_in_queue: - class: phpbb\notification\type\topic_in_queue - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - - notification.type.admin_activate_user: - class: phpbb\notification\type\admin_activate_user - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - tags: - - { name: notification.type } - -# ----- Notification's methods ----- -# Scope MUST be prototype for all the plugins to work. - notification.method_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: notification.method } - - notification.method.email: - class: phpbb\notification\method\email - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - tags: - - { name: notification.method } - - notification.method.jabber: - class: phpbb\notification\method\jabber - scope: prototype - arguments: - - @user_loader - - @dbal.conn - - @cache.driver - - @user - - @auth - - @config - - %core.root_path% - - %core.php_ext% - tags: - - { name: notification.method } diff --git a/phpBB/config/password.yml b/phpBB/config/password.yml deleted file mode 100644 index cb45ec3d42..0000000000 --- a/phpBB/config/password.yml +++ /dev/null @@ -1,124 +0,0 @@ -services: -# ----- Password management ----- - passwords.manager: - class: phpbb\passwords\manager - arguments: - - @config - - @passwords.driver_collection - - @passwords.helper - - %passwords.algorithms% - - passwords.helper: - class: phpbb\passwords\helper - - passwords.driver_helper: - class: phpbb\passwords\driver\helper - arguments: - - @config - -# ----- Password's drivers ----- - passwords.driver_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: passwords.driver } - - passwords.driver.bcrypt: - class: phpbb\passwords\driver\bcrypt - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.bcrypt_2y: - class: phpbb\passwords\driver\bcrypt_2y - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.bcrypt_wcf2: - class: phpbb\passwords\driver\bcrypt_wcf2 - arguments: - - @passwords.driver.bcrypt - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.salted_md5: - class: phpbb\passwords\driver\salted_md5 - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.phpass: - class: phpbb\passwords\driver\phpass - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.convert_password: - class: phpbb\passwords\driver\convert_password - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.sha1_smf: - class: phpbb\passwords\driver\sha1_smf - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.sha1_wcf1: - class: phpbb\passwords\driver\sha1_wcf1 - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.sha1: - class: phpbb\passwords\driver\sha1 - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.md5_phpbb2: - class: phpbb\passwords\driver\md5_phpbb2 - arguments: - - @request - - @passwords.driver.salted_md5 - - @passwords.driver_helper - - %core.root_path% - - %core.php_ext% - tags: - - { name: passwords.driver } - - passwords.driver.md5_mybb: - class: phpbb\passwords\driver\md5_mybb - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } - - passwords.driver.md5_vb: - class: phpbb\passwords\driver\md5_vb - arguments: - - @config - - @passwords.driver_helper - tags: - - { name: passwords.driver } diff --git a/phpBB/config/profilefield.yml b/phpBB/config/profilefield.yml deleted file mode 100644 index 5ccfef9148..0000000000 --- a/phpBB/config/profilefield.yml +++ /dev/null @@ -1,102 +0,0 @@ -services: - profilefields.manager: - class: phpbb\profilefields\manager - arguments: - - @auth - - @dbal.conn - - @dispatcher - - @request - - @template - - @profilefields.type_collection - - @user - - %tables.profile_fields% - - %tables.profile_fields_language% - - %tables.profile_fields_data% - - profilefields.lang_helper: - class: phpbb\profilefields\lang_helper - arguments: - - @dbal.conn - - %tables.profile_fields_options_language% - -# ----- Profile fields types ----- - profilefields.type_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: profilefield.type } - - profilefields.type.bool: - class: phpbb\profilefields\type\type_bool - arguments: - - @profilefields.lang_helper - - @request - - @template - - @user - tags: - - { name: profilefield.type } - - profilefields.type.date: - class: phpbb\profilefields\type\type_date - arguments: - - @request - - @template - - @user - tags: - - { name: profilefield.type } - - profilefields.type.dropdown: - class: phpbb\profilefields\type\type_dropdown - arguments: - - @profilefields.lang_helper - - @request - - @template - - @user - tags: - - { name: profilefield.type } - - profilefields.type.googleplus: - class: phpbb\profilefields\type\type_googleplus - arguments: - - @request - - @template - - @user - tags: - - { name: profilefield.type } - - profilefields.type.int: - class: phpbb\profilefields\type\type_int - arguments: - - @request - - @template - - @user - tags: - - { name: profilefield.type } - - profilefields.type.string: - class: phpbb\profilefields\type\type_string - arguments: - - @request - - @template - - @user - tags: - - { name: profilefield.type } - - profilefields.type.text: - class: phpbb\profilefields\type\type_text - arguments: - - @request - - @template - - @user - tags: - - { name: profilefield.type } - - profilefields.type.url: - class: phpbb\profilefields\type\type_url - arguments: - - @request - - @template - - @user - tags: - - { name: profilefield.type } diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index f6dbae4a76..3f36a5178a 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -1,19 +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: twig.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 } diff --git a/phpBB/config/services_auth.yml b/phpBB/config/services_auth.yml new file mode 100644 index 0000000000..88a90ca2d6 --- /dev/null +++ b/phpBB/config/services_auth.yml @@ -0,0 +1,100 @@ +services: +# ----- Auth management ----- + auth: + class: phpbb\auth\auth + +# ----- Auth providers ----- + auth.provider_collection: + class: phpbb\auth\provider_collection + arguments: + - @service_container + - @config + tags: + - { name: service_collection, tag: auth.provider } + + auth.provider.db: + class: phpbb\auth\provider\db + arguments: + - @dbal.conn + - @config + - @passwords.manager + - @request + - @user + - @service_container + - %core.root_path% + - %core.php_ext% + tags: + - { name: auth.provider } + + auth.provider.apache: + class: phpbb\auth\provider\apache + arguments: + - @dbal.conn + - @config + - @passwords.manager + - @request + - @user + - %core.root_path% + - %core.php_ext% + tags: + - { name: auth.provider } + + auth.provider.ldap: + class: phpbb\auth\provider\ldap + arguments: + - @dbal.conn + - @config + - @passwords.manager + - @user + tags: + - { name: auth.provider } + + auth.provider.oauth: + class: phpbb\auth\provider\oauth\oauth + arguments: + - @dbal.conn + - @config + - @passwords.manager + - @request + - @user + - %tables.auth_provider_oauth_token_storage% + - %tables.auth_provider_oauth_account_assoc% + - @auth.provider.oauth.service_collection + - %tables.users% + - @service_container + - %core.root_path% + - %core.php_ext% + tags: + - { name: auth.provider } + +# ----- OAuth services providers ----- + auth.provider.oauth.service_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: auth.provider.oauth.service } + + auth.provider.oauth.service.bitly: + class: phpbb\auth\provider\oauth\service\bitly + arguments: + - @config + - @request + tags: + - { name: auth.provider.oauth.service } + + auth.provider.oauth.service.facebook: + class: phpbb\auth\provider\oauth\service\facebook + arguments: + - @config + - @request + tags: + - { name: auth.provider.oauth.service } + + auth.provider.oauth.service.google: + class: phpbb\auth\provider\oauth\service\google + arguments: + - @config + - @request + tags: + - { name: auth.provider.oauth.service } diff --git a/phpBB/config/services_avatar.yml b/phpBB/config/services_avatar.yml new file mode 100644 index 0000000000..5292489715 --- /dev/null +++ b/phpBB/config/services_avatar.yml @@ -0,0 +1,67 @@ +services: + avatar.manager: + class: phpbb\avatar\manager + arguments: + - @config + - @avatar.driver_collection + +# ----- Avatar drivers ----- + avatar.driver_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: avatar.driver } + + avatar.driver.gravatar: + class: phpbb\avatar\driver\gravatar + arguments: + - @config + - %core.root_path% + - %core.php_ext% + - @path_helper + - @cache.driver + calls: + - [set_name, [avatar.driver.gravatar]] + tags: + - { name: avatar.driver } + + avatar.driver.local: + class: phpbb\avatar\driver\local + arguments: + - @config + - %core.root_path% + - %core.php_ext% + - @path_helper + - @cache.driver + calls: + - [set_name, [avatar.driver.local]] + tags: + - { name: avatar.driver } + + avatar.driver.remote: + class: phpbb\avatar\driver\remote + arguments: + - @config + - %core.root_path% + - %core.php_ext% + - @path_helper + - @cache.driver + calls: + - [set_name, [avatar.driver.remote]] + tags: + - { name: avatar.driver } + + avatar.driver.upload: + class: phpbb\avatar\driver\upload + arguments: + - @config + - %core.root_path% + - %core.php_ext% + - @path_helper + - @mimetype.guesser + - @cache.driver + calls: + - [set_name, [avatar.driver.upload]] + tags: + - { name: avatar.driver } diff --git a/phpBB/config/services_captcha.yml b/phpBB/config/services_captcha.yml new file mode 100644 index 0000000000..e3f617e909 --- /dev/null +++ b/phpBB/config/services_captcha.yml @@ -0,0 +1,59 @@ +services: + captcha.factory: + class: phpbb\captcha\factory + arguments: + - @service_container + - @captcha.plugins.service_collection + +# ----- Captcha plugins ----- +# Scope MUST be prototype for all the plugins to work. + captcha.plugins.service_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: captcha.plugins } + + core.captcha.plugins.gd: + class: phpbb\captcha\plugins\gd + scope: prototype + calls: + - [set_name, [core.captcha.plugins.gd]] + tags: + - { name: captcha.plugins } + + core.captcha.plugins.gd_wave: + class: phpbb\captcha\plugins\gd_wave + scope: prototype + calls: + - [set_name, [core.captcha.plugins.gd_wave]] + tags: + - { name: captcha.plugins } + + core.captcha.plugins.nogd: + class: phpbb\captcha\plugins\nogd + scope: prototype + calls: + - [set_name, [core.captcha.plugins.nogd]] + tags: + - { name: captcha.plugins } + + core.captcha.plugins.qa: + class: phpbb\captcha\plugins\qa + scope: prototype + arguments: + - %tables.captcha_qa_questions% + - %tables.captcha_qa_answers% + - %tables.captcha_qa_confirm% + calls: + - [set_name, [core.captcha.plugins.qa]] + tags: + - { name: captcha.plugins } + + core.captcha.plugins.recaptcha: + class: phpbb\captcha\plugins\recaptcha + scope: prototype + calls: + - [set_name, [core.captcha.plugins.recaptcha]] + tags: + - { name: captcha.plugins } diff --git a/phpBB/config/services_console.yml b/phpBB/config/services_console.yml new file mode 100644 index 0000000000..1e18a7dd37 --- /dev/null +++ b/phpBB/config/services_console.yml @@ -0,0 +1,141 @@ +services: + console.command_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: console.command } + + console.command.cache.purge: + class: phpbb\console\command\cache\purge + arguments: + - @user + - @cache.driver + - @dbal.conn + - @auth + - @log + - @config + tags: + - { name: console.command } + + console.command.config.delete: + class: phpbb\console\command\config\delete + arguments: + - @user + - @config + tags: + - { name: console.command } + + console.command.config.increment: + class: phpbb\console\command\config\increment + arguments: + - @user + - @config + tags: + - { name: console.command } + + console.command.config.get: + class: phpbb\console\command\config\get + arguments: + - @user + - @config + tags: + - { name: console.command } + + console.command.config.set: + class: phpbb\console\command\config\set + arguments: + - @user + - @config + tags: + - { name: console.command } + + console.command.config.set_atomic: + class: phpbb\console\command\config\set_atomic + arguments: + - @user + - @config + tags: + - { name: console.command } + + console.command.cron.list: + class: phpbb\console\command\cron\cron_list + arguments: + - @user + - @cron.manager + tags: + - { name: console.command } + + console.command.cron.run: + class: phpbb\console\command\cron\run + arguments: + - @user + - @cron.manager + - @cron.lock_db + tags: + - { name: console.command } + + console.command.db.migrate: + class: phpbb\console\command\db\migrate + arguments: + - @user + - @migrator + - @ext.manager + - @config + - @cache + - @log + - %core.root_path% + tags: + - { name: console.command } + + console.command.dev.migration_tips: + class: phpbb\console\command\dev\migration_tips + arguments: + - @user + - @ext.manager + tags: + - { name: console.command } + + console.command.extension.disable: + class: phpbb\console\command\extension\disable + arguments: + - @user + - @ext.manager + - @log + tags: + - { name: console.command } + + console.command.extension.enable: + class: phpbb\console\command\extension\enable + arguments: + - @user + - @ext.manager + - @log + tags: + - { name: console.command } + + console.command.extension.purge: + class: phpbb\console\command\extension\purge + arguments: + - @user + - @ext.manager + - @log + tags: + - { name: console.command } + + console.command.extension.show: + class: phpbb\console\command\extension\show + arguments: + - @user + - @ext.manager + - @log + tags: + - { name: console.command } + + console.command.fixup.recalculate_email_hash: + class: phpbb\console\command\fixup\recalculate_email_hash + arguments: + - @user + - @dbal.conn + tags: + - { name: console.command } diff --git a/phpBB/config/services_content.yml b/phpBB/config/services_content.yml new file mode 100644 index 0000000000..f0985f0292 --- /dev/null +++ b/phpBB/config/services_content.yml @@ -0,0 +1,71 @@ +services: + content.visibility: + class: phpbb\content_visibility + arguments: + - @auth + - @config + - @dbal.conn + - @user + - %core.root_path% + - %core.php_ext% + - %tables.forums% + - %tables.posts% + - %tables.topics% + - %tables.users% + + groupposition.legend: + class: phpbb\groupposition\legend + arguments: + - @dbal.conn + - @user + + groupposition.teampage: + class: phpbb\groupposition\teampage + arguments: + - @dbal.conn + - @user + - @cache.driver + + message.form.admin: + class: phpbb\message\admin_form + arguments: + - @auth + - @config + - @config_text + - @dbal.conn + - @user + - %core.root_path% + - %core.php_ext% + + message.form.topic: + class: phpbb\message\topic_form + arguments: + - @auth + - @config + - @dbal.conn + - @user + - %core.root_path% + - %core.php_ext% + + message.form.user: + class: phpbb\message\user_form + arguments: + - @auth + - @config + - @dbal.conn + - @user + - %core.root_path% + - %core.php_ext% + + pagination: + class: phpbb\pagination + arguments: + - @template + - @user + - @controller.helper + - @dispatcher + + viewonline_helper: + class: phpbb\viewonline_helper + arguments: + - @filesystem diff --git a/phpBB/config/services_cron.yml b/phpBB/config/services_cron.yml new file mode 100644 index 0000000000..7a90c39733 --- /dev/null +++ b/phpBB/config/services_cron.yml @@ -0,0 +1,147 @@ +services: + cron.manager: + class: phpbb\cron\manager + arguments: + - @cron.task_collection + - %core.root_path% + - %core.php_ext% + + cron.lock_db: + class: phpbb\lock\db + arguments: + - cron_lock + - @config + - @dbal.conn + +# ----- Cron tasks ----- + cron.task_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: cron.task } + + cron.task.core.prune_all_forums: + class: phpbb\cron\task\core\prune_all_forums + arguments: + - %core.root_path% + - %core.php_ext% + - @config + - @dbal.conn + calls: + - [set_name, [cron.task.core.prune_all_forums]] + tags: + - { name: cron.task } + + cron.task.core.prune_forum: + class: phpbb\cron\task\core\prune_forum + arguments: + - %core.root_path% + - %core.php_ext% + - @config + - @dbal.conn + calls: + - [set_name, [cron.task.core.prune_forum]] + tags: + - { name: cron.task } + + cron.task.core.prune_shadow_topics: + class: phpbb\cron\task\core\prune_shadow_topics + arguments: + - %core.root_path% + - %core.php_ext% + - @config + - @dbal.conn + - @log + - @user + calls: + - [set_name, [cron.task.core.prune_shadow_topics]] + tags: + - { name: cron.task } + + cron.task.core.prune_notifications: + class: phpbb\cron\task\core\prune_notifications + arguments: + - @config + - @notification_manager + calls: + - [set_name, [cron.task.core.prune_notifications]] + tags: + - { name: cron.task } + + cron.task.core.queue: + class: phpbb\cron\task\core\queue + arguments: + - %core.root_path% + - %core.php_ext% + - @config + calls: + - [set_name, [cron.task.core.queue]] + tags: + - { name: cron.task } + + cron.task.core.tidy_cache: + class: phpbb\cron\task\core\tidy_cache + arguments: + - @config + - @cache.driver + calls: + - [set_name, [cron.task.core.tidy_cache]] + tags: + - { name: cron.task } + + cron.task.core.tidy_database: + class: phpbb\cron\task\core\tidy_database + arguments: + - %core.root_path% + - %core.php_ext% + - @config + calls: + - [set_name, [cron.task.core.tidy_database]] + tags: + - { name: cron.task } + + cron.task.core.tidy_plupload: + class: phpbb\cron\task\core\tidy_plupload + arguments: + - %core.root_path% + - @config + calls: + - [set_name, [cron.task.core.tidy_plupload]] + tags: + - { name: cron.task } + + cron.task.core.tidy_search: + class: phpbb\cron\task\core\tidy_search + arguments: + - %core.root_path% + - %core.php_ext% + - @auth + - @config + - @dbal.conn + - @user + calls: + - [set_name, [cron.task.core.tidy_search]] + tags: + - { name: cron.task } + + cron.task.core.tidy_sessions: + class: phpbb\cron\task\core\tidy_sessions + arguments: + - @config + - @user + calls: + - [set_name, [cron.task.core.tidy_sessions]] + tags: + - { name: cron.task } + + cron.task.core.tidy_warnings: + class: phpbb\cron\task\core\tidy_warnings + arguments: + - %core.root_path% + - %core.php_ext% + - @config + calls: + - [set_name, [cron.task.core.tidy_warnings]] + tags: + - { name: cron.task } diff --git a/phpBB/config/services_db.yml b/phpBB/config/services_db.yml new file mode 100644 index 0000000000..b3f1b485ea --- /dev/null +++ b/phpBB/config/services_db.yml @@ -0,0 +1,77 @@ +services: + dbal.conn: + class: phpbb\db\driver\factory + arguments: + - @service_container + + dbal.conn.driver: + class: %dbal.driver.class% + calls: + - [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]] + + dbal.tools: + class: phpbb\db\tools + arguments: + - @dbal.conn + +# ----- Migrator ----- + 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's tools ----- + 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/services_event.yml b/phpBB/config/services_event.yml new file mode 100644 index 0000000000..1ccef78f9b --- /dev/null +++ b/phpBB/config/services_event.yml @@ -0,0 +1,25 @@ +services: + dispatcher: + class: phpbb\event\dispatcher + arguments: + - @service_container + + hook_finder: + class: phpbb\hook\finder + arguments: + - %core.root_path% + - %core.php_ext% + - @cache.driver + + kernel_exception_subscriber: + class: phpbb\event\kernel_exception_subscriber + arguments: + - @template + - @user + tags: + - { name: kernel.event_subscriber } + + kernel_terminate_subscriber: + class: phpbb\event\kernel_terminate_subscriber + tags: + - { name: kernel.event_subscriber } diff --git a/phpBB/config/services_feed.yml b/phpBB/config/services_feed.yml new file mode 100644 index 0000000000..48bd9fe76f --- /dev/null +++ b/phpBB/config/services_feed.yml @@ -0,0 +1,106 @@ +services: + feed.helper: + class: phpbb\feed\helper + arguments: + - @config + - @user + - %core.root_path% + - %core.php_ext% + + feed.factory: + class: phpbb\feed\factory + arguments: + - @service_container + - @config + - @dbal.conn + + feed.forum: + class: phpbb\feed\forum + scope: prototype + arguments: + - @feed.helper + - @config + - @dbal.conn + - @cache.driver + - @user + - @auth + - @content.visibility + - %core.php_ext% + + feed.forums: + class: phpbb\feed\forums + scope: prototype + arguments: + - @feed.helper + - @config + - @dbal.conn + - @cache.driver + - @user + - @auth + - @content.visibility + - %core.php_ext% + + feed.news: + class: phpbb\feed\news + scope: prototype + arguments: + - @feed.helper + - @config + - @dbal.conn + - @cache.driver + - @user + - @auth + - @content.visibility + - %core.php_ext% + + feed.overall: + class: phpbb\feed\overall + scope: prototype + arguments: + - @feed.helper + - @config + - @dbal.conn + - @cache.driver + - @user + - @auth + - @content.visibility + - %core.php_ext% + + feed.topic: + class: phpbb\feed\topic + scope: prototype + arguments: + - @feed.helper + - @config + - @dbal.conn + - @cache.driver + - @user + - @auth + - @content.visibility + - %core.php_ext% + + feed.topics: + class: phpbb\feed\topics + scope: prototype + arguments: + - @feed.helper + - @config + - @dbal.conn + - @cache.driver + - @user + - @auth + - @content.visibility + - %core.php_ext% + + feed.topics_active: + class: phpbb\feed\topics_active + scope: prototype + arguments: + - @feed.helper + - @config + - @dbal.conn + - @cache.driver + - @user + - @auth + - @content.visibility + - %core.php_ext% diff --git a/phpBB/config/services_mimetype_guesser.yml b/phpBB/config/services_mimetype_guesser.yml new file mode 100644 index 0000000000..2e89ed3c1f --- /dev/null +++ b/phpBB/config/services_mimetype_guesser.yml @@ -0,0 +1,36 @@ +services: + mimetype.guesser_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: mimetype.guessers } + + mimetype.fileinfo_mimetype_guesser: + class: Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser + tags: + - { name: mimetype.guessers } + + mimetype.filebinary_mimetype_guesser: + class: Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser + tags: + - { name: mimetype.guessers } + + mimetype.content_guesser: + class: phpbb\mimetype\content_guesser + calls: + - [set_priority, [%mimetype.guesser.priority.low%]] + tags: + - { name: mimetype.guessers } + + mimetype.extension_guesser: + class: phpbb\mimetype\extension_guesser + calls: + - [set_priority, [%mimetype.guesser.priority.lowest%]] + tags: + - { name: mimetype.guessers } + + mimetype.guesser: + class: phpbb\mimetype\guesser + arguments: + - @mimetype.guesser_collection diff --git a/phpBB/config/services_notification.yml b/phpBB/config/services_notification.yml new file mode 100644 index 0000000000..add577be2c --- /dev/null +++ b/phpBB/config/services_notification.yml @@ -0,0 +1,389 @@ +services: + notification_manager: + class: phpbb\notification\manager + arguments: + - @notification.type_collection + - @notification.method_collection + - @service_container + - @user_loader + - @config + - @dbal.conn + - @cache + - @user + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + +# ----- Notification's types ----- +# Scope MUST be prototype for all the plugins to work. + notification.type_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: notification.type } + + notification.type.approve_post: + class: phpbb\notification\type\approve_post + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.approve_topic: + class: phpbb\notification\type\approve_topic + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.bookmark: + class: phpbb\notification\type\bookmark + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.disapprove_post: + class: phpbb\notification\type\disapprove_post + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.disapprove_topic: + class: phpbb\notification\type\disapprove_topic + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.group_request: + class: phpbb\notification\type\group_request + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.group_request_approved: + class: phpbb\notification\type\group_request_approved + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.pm: + class: phpbb\notification\type\pm + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.post: + class: phpbb\notification\type\post + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.post_in_queue: + class: phpbb\notification\type\post_in_queue + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.quote: + class: phpbb\notification\type\quote + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.report_pm: + class: phpbb\notification\type\report_pm + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.report_pm_closed: + class: phpbb\notification\type\report_pm_closed + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.report_post: + class: phpbb\notification\type\report_post + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.report_post_closed: + class: phpbb\notification\type\report_post_closed + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.topic: + class: phpbb\notification\type\topic + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.topic_in_queue: + class: phpbb\notification\type\topic_in_queue + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + + notification.type.admin_activate_user: + class: phpbb\notification\type\admin_activate_user + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% + tags: + - { name: notification.type } + +# ----- Notification's methods ----- +# Scope MUST be prototype for all the plugins to work. + notification.method_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: notification.method } + + notification.method.email: + class: phpbb\notification\method\email + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + tags: + - { name: notification.method } + + notification.method.jabber: + class: phpbb\notification\method\jabber + scope: prototype + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @auth + - @config + - %core.root_path% + - %core.php_ext% + tags: + - { name: notification.method } diff --git a/phpBB/config/services_password.yml b/phpBB/config/services_password.yml new file mode 100644 index 0000000000..cb45ec3d42 --- /dev/null +++ b/phpBB/config/services_password.yml @@ -0,0 +1,124 @@ +services: +# ----- Password management ----- + passwords.manager: + class: phpbb\passwords\manager + arguments: + - @config + - @passwords.driver_collection + - @passwords.helper + - %passwords.algorithms% + + passwords.helper: + class: phpbb\passwords\helper + + passwords.driver_helper: + class: phpbb\passwords\driver\helper + arguments: + - @config + +# ----- Password's drivers ----- + passwords.driver_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: passwords.driver } + + passwords.driver.bcrypt: + class: phpbb\passwords\driver\bcrypt + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.bcrypt_2y: + class: phpbb\passwords\driver\bcrypt_2y + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.bcrypt_wcf2: + class: phpbb\passwords\driver\bcrypt_wcf2 + arguments: + - @passwords.driver.bcrypt + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.salted_md5: + class: phpbb\passwords\driver\salted_md5 + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.phpass: + class: phpbb\passwords\driver\phpass + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.convert_password: + class: phpbb\passwords\driver\convert_password + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.sha1_smf: + class: phpbb\passwords\driver\sha1_smf + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.sha1_wcf1: + class: phpbb\passwords\driver\sha1_wcf1 + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.sha1: + class: phpbb\passwords\driver\sha1 + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.md5_phpbb2: + class: phpbb\passwords\driver\md5_phpbb2 + arguments: + - @request + - @passwords.driver.salted_md5 + - @passwords.driver_helper + - %core.root_path% + - %core.php_ext% + tags: + - { name: passwords.driver } + + passwords.driver.md5_mybb: + class: phpbb\passwords\driver\md5_mybb + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } + + passwords.driver.md5_vb: + class: phpbb\passwords\driver\md5_vb + arguments: + - @config + - @passwords.driver_helper + tags: + - { name: passwords.driver } diff --git a/phpBB/config/services_profilefield.yml b/phpBB/config/services_profilefield.yml new file mode 100644 index 0000000000..5ccfef9148 --- /dev/null +++ b/phpBB/config/services_profilefield.yml @@ -0,0 +1,102 @@ +services: + profilefields.manager: + class: phpbb\profilefields\manager + arguments: + - @auth + - @dbal.conn + - @dispatcher + - @request + - @template + - @profilefields.type_collection + - @user + - %tables.profile_fields% + - %tables.profile_fields_language% + - %tables.profile_fields_data% + + profilefields.lang_helper: + class: phpbb\profilefields\lang_helper + arguments: + - @dbal.conn + - %tables.profile_fields_options_language% + +# ----- Profile fields types ----- + profilefields.type_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: profilefield.type } + + profilefields.type.bool: + class: phpbb\profilefields\type\type_bool + arguments: + - @profilefields.lang_helper + - @request + - @template + - @user + tags: + - { name: profilefield.type } + + profilefields.type.date: + class: phpbb\profilefields\type\type_date + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } + + profilefields.type.dropdown: + class: phpbb\profilefields\type\type_dropdown + arguments: + - @profilefields.lang_helper + - @request + - @template + - @user + tags: + - { name: profilefield.type } + + profilefields.type.googleplus: + class: phpbb\profilefields\type\type_googleplus + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } + + profilefields.type.int: + class: phpbb\profilefields\type\type_int + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } + + profilefields.type.string: + class: phpbb\profilefields\type\type_string + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } + + profilefields.type.text: + class: phpbb\profilefields\type\type_text + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } + + profilefields.type.url: + class: phpbb\profilefields\type\type_url + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } diff --git a/phpBB/config/services_twig.yml b/phpBB/config/services_twig.yml new file mode 100644 index 0000000000..0745d8b47e --- /dev/null +++ b/phpBB/config/services_twig.yml @@ -0,0 +1,43 @@ +parameters: + core.template.cache_path: %core.root_path%cache/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/services_user.yml b/phpBB/config/services_user.yml new file mode 100644 index 0000000000..1ca853ea45 --- /dev/null +++ b/phpBB/config/services_user.yml @@ -0,0 +1,19 @@ +services: + acl.permissions: + class: phpbb\permissions + arguments: + - @dispatcher + - @user + + user: + class: phpbb\user + arguments: + - %datetime.class% + + user_loader: + class: phpbb\user_loader + arguments: + - @dbal.conn + - %core.root_path% + - %core.php_ext% + - %tables.users% diff --git a/phpBB/config/twig.yml b/phpBB/config/twig.yml deleted file mode 100644 index 0745d8b47e..0000000000 --- a/phpBB/config/twig.yml +++ /dev/null @@ -1,43 +0,0 @@ -parameters: - core.template.cache_path: %core.root_path%cache/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/user.yml deleted file mode 100644 index 1ca853ea45..0000000000 --- a/phpBB/config/user.yml +++ /dev/null @@ -1,19 +0,0 @@ -services: - acl.permissions: - class: phpbb\permissions - arguments: - - @dispatcher - - @user - - user: - class: phpbb\user - arguments: - - %datetime.class% - - user_loader: - class: phpbb\user_loader - arguments: - - @dbal.conn - - %core.root_path% - - %core.php_ext% - - %tables.users% diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index 28cc603bdb..2be8e6e860 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -453,11 +453,11 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_cont if ($debug) { - $config_data .= "@define('DEBUG', true);\n"; + $config_data .= "@define('ENVIRONMENT', 'debug');\n"; } else { - $config_data .= "// @define('DEBUG', true);\n"; + $config_data .= "@define('ENVIRONMENT', 'productive');\n"; } if ($debug_container) diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index ca4fa5c082..d203cc7049 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -50,7 +50,7 @@ class core extends Extension public function load(array $config, ContainerBuilder $container) { $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->config_path))); - $loader->load('services.yml'); + $loader->load('config_' . ENVIRONMENT . '.yml'); } /** -- cgit v1.2.1