From ebaec047f271a5304162795ea388cc699c7e90b7 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Mon, 29 Sep 2014 12:13:17 +0200 Subject: [ticket/12987] Cleanup the services.yml file PHPBB3-12987 --- phpBB/config/auth.yml | 100 ++++++++++ phpBB/config/auth_providers.yml | 86 -------- phpBB/config/avatar.yml | 67 +++++++ phpBB/config/avatars.yml | 60 ------ phpBB/config/captcha.yml | 17 +- phpBB/config/content.yml | 71 +++++++ phpBB/config/cron.yml | 147 ++++++++++++++ phpBB/config/cron_tasks.yml | 125 ------------ phpBB/config/db.yml | 77 ++++++++ phpBB/config/event.yml | 34 ++++ phpBB/config/migrator.yml | 60 ------ phpBB/config/mimetype_guesser.yml | 36 ++++ phpBB/config/mimetype_guessers.yml | 43 ---- phpBB/config/notification.yml | 389 +++++++++++++++++++++++++++++++++++++ phpBB/config/notifications.yml | 368 ----------------------------------- phpBB/config/parameters.yml | 17 ++ phpBB/config/password.yml | 123 ++++++++++++ phpBB/config/passwords.yml | 128 ------------ phpBB/config/profilefield.yml | 102 ++++++++++ phpBB/config/profilefields.yml | 101 ---------- phpBB/config/services.yml | 212 ++------------------ phpBB/config/tables.yml | 3 + phpBB/config/user.yml | 19 ++ 23 files changed, 1207 insertions(+), 1178 deletions(-) create mode 100644 phpBB/config/auth.yml delete mode 100644 phpBB/config/auth_providers.yml create mode 100644 phpBB/config/avatar.yml delete mode 100644 phpBB/config/avatars.yml create mode 100644 phpBB/config/content.yml create mode 100644 phpBB/config/cron.yml delete mode 100644 phpBB/config/cron_tasks.yml create mode 100644 phpBB/config/db.yml create mode 100644 phpBB/config/event.yml delete mode 100644 phpBB/config/migrator.yml create mode 100644 phpBB/config/mimetype_guesser.yml delete mode 100644 phpBB/config/mimetype_guessers.yml create mode 100644 phpBB/config/notification.yml delete mode 100644 phpBB/config/notifications.yml create mode 100644 phpBB/config/password.yml delete mode 100644 phpBB/config/passwords.yml create mode 100644 phpBB/config/profilefield.yml delete mode 100644 phpBB/config/profilefields.yml create mode 100644 phpBB/config/user.yml (limited to 'phpBB') diff --git a/phpBB/config/auth.yml b/phpBB/config/auth.yml new file mode 100644 index 0000000000..88a90ca2d6 --- /dev/null +++ b/phpBB/config/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/auth_providers.yml b/phpBB/config/auth_providers.yml deleted file mode 100644 index 89303a684a..0000000000 --- a/phpBB/config/auth_providers.yml +++ /dev/null @@ -1,86 +0,0 @@ -services: - 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 } - 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 new file mode 100644 index 0000000000..5292489715 --- /dev/null +++ b/phpBB/config/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/avatars.yml b/phpBB/config/avatars.yml deleted file mode 100644 index 8e5b1fdbfe..0000000000 --- a/phpBB/config/avatars.yml +++ /dev/null @@ -1,60 +0,0 @@ -services: - 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 } - - avatar.driver_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: avatar.driver } diff --git a/phpBB/config/captcha.yml b/phpBB/config/captcha.yml index bca37767af..e3f617e909 100644 --- a/phpBB/config/captcha.yml +++ b/phpBB/config/captcha.yml @@ -1,8 +1,3 @@ -parameters: - tables.captcha_qa_questions: %core.table_prefix%captcha_questions - tables.captcha_qa_answers: %core.table_prefix%captcha_answers - tables.captcha_qa_confirm: %core.table_prefix%qa_confirm - services: captcha.factory: class: phpbb\captcha\factory @@ -10,6 +5,8 @@ services: - @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: @@ -19,7 +16,7 @@ services: core.captcha.plugins.gd: class: phpbb\captcha\plugins\gd - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.gd]] tags: @@ -27,7 +24,7 @@ services: core.captcha.plugins.gd_wave: class: phpbb\captcha\plugins\gd_wave - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.gd_wave]] tags: @@ -35,7 +32,7 @@ services: core.captcha.plugins.nogd: class: phpbb\captcha\plugins\nogd - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.nogd]] tags: @@ -43,7 +40,7 @@ services: core.captcha.plugins.qa: class: phpbb\captcha\plugins\qa - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - %tables.captcha_qa_questions% - %tables.captcha_qa_answers% @@ -55,7 +52,7 @@ services: core.captcha.plugins.recaptcha: class: phpbb\captcha\plugins\recaptcha - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.recaptcha]] tags: diff --git a/phpBB/config/content.yml b/phpBB/config/content.yml new file mode 100644 index 0000000000..f0985f0292 --- /dev/null +++ b/phpBB/config/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/cron.yml b/phpBB/config/cron.yml new file mode 100644 index 0000000000..7a90c39733 --- /dev/null +++ b/phpBB/config/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/cron_tasks.yml b/phpBB/config/cron_tasks.yml deleted file mode 100644 index acf9a48bf9..0000000000 --- a/phpBB/config/cron_tasks.yml +++ /dev/null @@ -1,125 +0,0 @@ -services: - 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 new file mode 100644 index 0000000000..b3f1b485ea --- /dev/null +++ b/phpBB/config/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/event.yml b/phpBB/config/event.yml new file mode 100644 index 0000000000..599b3cbb40 --- /dev/null +++ b/phpBB/config/event.yml @@ -0,0 +1,34 @@ +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_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: + - @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/migrator.yml b/phpBB/config/migrator.yml deleted file mode 100644 index cd04eea5c2..0000000000 --- a/phpBB/config/migrator.yml +++ /dev/null @@ -1,60 +0,0 @@ -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/mimetype_guesser.yml new file mode 100644 index 0000000000..2e89ed3c1f --- /dev/null +++ b/phpBB/config/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/mimetype_guessers.yml b/phpBB/config/mimetype_guessers.yml deleted file mode 100644 index 0115146deb..0000000000 --- a/phpBB/config/mimetype_guessers.yml +++ /dev/null @@ -1,43 +0,0 @@ -parameters: - mimetype.guesser.priority.lowest: -2 - mimetype.guesser.priority.low: -1 - mimetype.guesser.priority.default: 0 - mimetype.guesser.priority.high: 1 - mimetype.guesser.priority.highest: 2 - -services: - 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_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: mimetype.guessers } - - mimetype.guesser: - class: phpbb\mimetype\guesser - arguments: - - @mimetype.guesser_collection diff --git a/phpBB/config/notification.yml b/phpBB/config/notification.yml new file mode 100644 index 0000000000..add577be2c --- /dev/null +++ b/phpBB/config/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/notifications.yml b/phpBB/config/notifications.yml deleted file mode 100644 index 5675e76a99..0000000000 --- a/phpBB/config/notifications.yml +++ /dev/null @@ -1,368 +0,0 @@ -services: - notification.type_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: notification.type } - - notification.method_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: notification.method } - - notification.type.approve_post: - class: phpbb\notification\type\approve_post - scope: prototype # scope MUST be prototype for this to work! # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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.method.email: - class: phpbb\notification\method\email - scope: prototype # scope MUST be prototype for this to work! - 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 # scope MUST be prototype for this to work! - 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/parameters.yml b/phpBB/config/parameters.yml index b076ea3ecb..8ecc1428f4 100644 --- a/phpBB/config/parameters.yml +++ b/phpBB/config/parameters.yml @@ -1,3 +1,20 @@ parameters: + # Disable the usage of the super globals (_GET, _POST, _SERVER...) core.disable_super_globals: true + + # Datetime class to use datetime.class: \phpbb\datetime + + # Mimetype guesser priorities + mimetype.guesser.priority.lowest: -2 + mimetype.guesser.priority.low: -1 + mimetype.guesser.priority.default: 0 + mimetype.guesser.priority.high: 1 + mimetype.guesser.priority.highest: 2 + + # List of default password driver types + passwords.algorithms: + - passwords.driver.bcrypt_2y + - passwords.driver.bcrypt + - passwords.driver.salted_md5 + - passwords.driver.phpass diff --git a/phpBB/config/password.yml b/phpBB/config/password.yml new file mode 100644 index 0000000000..09e935016e --- /dev/null +++ b/phpBB/config/password.yml @@ -0,0 +1,123 @@ +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 + - %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/passwords.yml b/phpBB/config/passwords.yml deleted file mode 100644 index 3dc217286f..0000000000 --- a/phpBB/config/passwords.yml +++ /dev/null @@ -1,128 +0,0 @@ -parameters: - passwords.algorithms: - - passwords.driver.bcrypt_2y - - passwords.driver.bcrypt - - passwords.driver.salted_md5 - - passwords.driver.phpass - -services: - 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 - - %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 } - - passwords.driver_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: passwords.driver } - - passwords.driver_helper: - class: phpbb\passwords\driver\helper - arguments: - - @config - - passwords.manager: - class: phpbb\passwords\manager - arguments: - - @config - - @passwords.driver_collection - - @passwords.helper - - %passwords.algorithms% - - passwords.helper: - class: phpbb\passwords\helper diff --git a/phpBB/config/profilefield.yml b/phpBB/config/profilefield.yml new file mode 100644 index 0000000000..5ccfef9148 --- /dev/null +++ b/phpBB/config/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/profilefields.yml b/phpBB/config/profilefields.yml deleted file mode 100644 index ce2a84b12b..0000000000 --- a/phpBB/config/profilefields.yml +++ /dev/null @@ -1,101 +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% - - 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 d32b665039..5003697564 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -1,34 +1,23 @@ imports: - - { resource: tables.yml } - - { resource: cron_tasks.yml } - - { resource: notifications.yml } - - { resource: migrator.yml } - - { resource: avatars.yml } - - { resource: feed.yml } - - { resource: auth_providers.yml } - - { resource: console.yml } - - { resource: mimetype_guessers.yml } - - { resource: passwords.yml } - - { resource: profilefields.yml } + - { 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: tables.yml } - { resource: parameters.yml } services: - acl.permissions: - class: phpbb\permissions - arguments: - - @dispatcher - - @user - - auth: - class: phpbb\auth\auth - - avatar.manager: - class: phpbb\avatar\manager - arguments: - - @config - - @avatar.driver_collection - cache: class: phpbb\cache\service arguments: @@ -77,20 +66,6 @@ services: - @dbal.conn - %tables.config_text% - 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% - controller.helper: class: phpbb\controller\helper arguments: @@ -117,47 +92,6 @@ services: calls: - [find, [%core.root_path%]] - cron.task_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: cron.task } - - 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 - - dispatcher: - class: phpbb\event\dispatcher - arguments: - - @service_container - - 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 - ext.manager: class: phpbb\extension\manager arguments: @@ -174,54 +108,12 @@ services: filesystem: class: phpbb\filesystem - groupposition.legend: - class: phpbb\groupposition\legend - arguments: - - @dbal.conn - - @user - - groupposition.teampage: - class: phpbb\groupposition\teampage - arguments: - - @dbal.conn - - @user - - @cache.driver - http_kernel: class: Symfony\Component\HttpKernel\HttpKernel arguments: - @dispatcher - @controller.resolver - hook_finder: - class: phpbb\hook\finder - arguments: - - %core.root_path% - - %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: - - @template - - @user - tags: - - { name: kernel.event_subscriber } - - kernel_terminate_subscriber: - class: phpbb\event\kernel_terminate_subscriber - tags: - - { name: kernel.event_subscriber } - log: class: phpbb\log\log arguments: @@ -234,62 +126,6 @@ services: - %core.php_ext% - %tables.log% - 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% - - 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% - - pagination: - class: phpbb\pagination - arguments: - - @template - - @user - - @controller.helper - - @dispatcher - path_helper: class: phpbb\path_helper arguments: @@ -336,19 +172,6 @@ services: template_context: class: phpbb\template\context - user: - class: phpbb\user - arguments: - - %datetime.class% - - user_loader: - class: phpbb\user_loader - arguments: - - @dbal.conn - - %core.root_path% - - %core.php_ext% - - %tables.users% - version_helper: class: phpbb\version_helper scope: prototype @@ -356,8 +179,3 @@ services: - @cache - @config - @user - - viewonline_helper: - class: phpbb\viewonline_helper - arguments: - - @filesystem diff --git a/phpBB/config/tables.yml b/phpBB/config/tables.yml index e4f7bda89b..2fe2a33be8 100644 --- a/phpBB/config/tables.yml +++ b/phpBB/config/tables.yml @@ -1,6 +1,9 @@ parameters: tables.auth_provider_oauth_token_storage: %core.table_prefix%oauth_tokens tables.auth_provider_oauth_account_assoc: %core.table_prefix%oauth_accounts + tables.captcha_qa_questions: %core.table_prefix%captcha_questions + tables.captcha_qa_answers: %core.table_prefix%captcha_answers + tables.captcha_qa_confirm: %core.table_prefix%qa_confirm tables.config: %core.table_prefix%config tables.config_text: %core.table_prefix%config_text tables.ext: %core.table_prefix%ext diff --git a/phpBB/config/user.yml b/phpBB/config/user.yml new file mode 100644 index 0000000000..1ca853ea45 --- /dev/null +++ b/phpBB/config/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% -- cgit v1.2.1