diff options
Diffstat (limited to 'phpBB/config')
68 files changed, 1648 insertions, 491 deletions
diff --git a/phpBB/config/default/config.yml b/phpBB/config/default/config.yml new file mode 100644 index 0000000000..e8d0536287 --- /dev/null +++ b/phpBB/config/default/config.yml @@ -0,0 +1 @@ +# phpBB's config file (This line is needed because of the packager) diff --git a/phpBB/config/parameters.yml b/phpBB/config/default/container/parameters.yml index 8ecc1428f4..8ecc1428f4 100644 --- a/phpBB/config/parameters.yml +++ b/phpBB/config/default/container/parameters.yml diff --git a/phpBB/config/services.yml b/phpBB/config/default/container/services.yml index 8667cbbf84..49d2f21c43 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/default/container/services.yml @@ -1,18 +1,31 @@ imports: - - { resource: auth.yml } - - { resource: avatar.yml } - - { resource: captcha.yml } - - { resource: console.yml } - - { resource: content.yml } - - { resource: cron.yml } - - { resource: db.yml } - - { resource: event.yml } - - { resource: feed.yml } - - { resource: mimetype_guesser.yml } - - { resource: notification.yml } - - { resource: password.yml } - - { resource: profilefield.yml } - - { resource: user.yml } + - { resource: services_attachment.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_files.yml } + - { resource: services_help.yml } + - { resource: services_http.yml } + - { resource: services_language.yml } + - { resource: services_migrator.yml } + - { resource: services_mimetype_guesser.yml } + - { resource: services_module.yml } + - { resource: services_notification.yml } + - { resource: services_password.yml } + - { resource: services_php.yml } + - { resource: services_profilefield.yml } + - { resource: services_report.yml } + - { resource: services_routing.yml } + - { resource: services_text_formatter.yml } + - { resource: services_text_reparser.yml } + - { resource: services_twig.yml } + - { resource: services_user.yml } - { resource: tables.yml } - { resource: parameters.yml } @@ -72,27 +85,17 @@ services: - @template - @user - @config - - @controller.provider - - @ext.manager - @symfony_request - @request - - @filesystem - - %core.root_path% - - %core.php_ext% + - @routing.helper controller.resolver: class: phpbb\controller\resolver arguments: - - @user - @service_container - %core.root_path% - @template - controller.provider: - class: phpbb\controller\provider - calls: - - [find, [%core.root_path%]] - ext.manager: class: phpbb\extension\manager arguments: @@ -100,23 +103,24 @@ services: - @dbal.conn - @config - @filesystem - - @user - %tables.ext% - %core.root_path% - %core.php_ext% - @cache.driver - filesystem: - class: phpbb\filesystem - file_downloader: class: phpbb\file_downloader - http_kernel: - class: Symfony\Component\HttpKernel\HttpKernel + file_locator: + class: phpbb\routing\file_locator arguments: - - @dispatcher - - @controller.resolver + - @filesystem + - %core.root_path% + + group_helper: + class: phpbb\group\helper + arguments: + - @language log: class: phpbb\log\log @@ -140,9 +144,6 @@ services: - %core.php_ext% - %core.adm_relative_path% - php_ini: - class: phpbb\php\ini - plupload: class: phpbb\plupload\plupload arguments: @@ -153,30 +154,8 @@ services: - @php_ini - @mimetype.guesser - request: - class: phpbb\request\request - arguments: - - null - - %core.disable_super_globals% - - # WARNING: The Symfony request does not escape the input and should be used very carefully - # prefer the phpbb request (service @request) as possible - symfony_request: - class: phpbb\symfony_request - arguments: - - @request - - template: - class: phpbb\template\twig\twig - arguments: - - @path_helper - - @config - - @user - - @template_context - - @ext.manager - - template_context: - class: phpbb\template\context + upload_imagesize: + class: FastImageSize\FastImageSize version_helper: class: phpbb\version_helper diff --git a/phpBB/config/default/container/services_attachment.yml b/phpBB/config/default/container/services_attachment.yml new file mode 100644 index 0000000000..5506b2ec90 --- /dev/null +++ b/phpBB/config/default/container/services_attachment.yml @@ -0,0 +1,40 @@ +services: + attachment.delete: + class: phpbb\attachment\delete + scope: prototype + arguments: + - @config + - @dbal.conn + - @dispatcher + - @filesystem + - @attachment.resync + - %core.root_path% + + attachment.manager: + class: phpbb\attachment\manager + scope: prototype + arguments: + - @attachment.delete + - @attachment.resync + - @attachment.upload + + attachment.resync: + class: phpbb\attachment\resync + scope: prototype + arguments: + - @dbal.conn + + attachment.upload: + class: phpbb\attachment\upload + scope: prototype + arguments: + - @auth + - @cache + - @config + - @files.upload + - @language + - @mimetype.guesser + - @dispatcher + - @plupload + - @user + - %core.root_path% diff --git a/phpBB/config/auth.yml b/phpBB/config/default/container/services_auth.yml index 88a90ca2d6..88a90ca2d6 100644 --- a/phpBB/config/auth.yml +++ b/phpBB/config/default/container/services_auth.yml diff --git a/phpBB/config/avatar.yml b/phpBB/config/default/container/services_avatar.yml index b0dca137b0..76057cf5a7 100644 --- a/phpBB/config/avatar.yml +++ b/phpBB/config/default/container/services_avatar.yml @@ -17,6 +17,7 @@ services: class: phpbb\avatar\driver\gravatar arguments: - @config + - @upload_imagesize - %core.root_path% - %core.php_ext% - @path_helper @@ -30,6 +31,7 @@ services: class: phpbb\avatar\driver\local arguments: - @config + - @upload_imagesize - %core.root_path% - %core.php_ext% - @path_helper @@ -43,6 +45,7 @@ services: class: phpbb\avatar\driver\remote arguments: - @config + - @upload_imagesize - %core.root_path% - %core.php_ext% - @path_helper @@ -58,9 +61,10 @@ services: - @config - %core.root_path% - %core.php_ext% + - @filesystem - @path_helper - - @mimetype.guesser - @dispatcher + - @files.factory - @cache.driver calls: - [set_name, [avatar.driver.upload]] diff --git a/phpBB/config/captcha.yml b/phpBB/config/default/container/services_captcha.yml index e3f617e909..e3f617e909 100644 --- a/phpBB/config/captcha.yml +++ b/phpBB/config/default/container/services_captcha.yml diff --git a/phpBB/config/console.yml b/phpBB/config/default/container/services_console.yml index 1e18a7dd37..6b46375c7d 100644 --- a/phpBB/config/console.yml +++ b/phpBB/config/default/container/services_console.yml @@ -1,4 +1,12 @@ services: + console.exception_subscriber: + class: phpbb\console\exception_subscriber + arguments: + - @language + - %debug.exceptions% + tags: + - { name: kernel.event_subscriber } + console.command_collection: class: phpbb\di\service_collection arguments: @@ -75,6 +83,17 @@ services: tags: - { name: console.command } + console.command.db.list: + class: phpbb\console\command\db\list_command + arguments: + - @user + - @migrator + - @ext.manager + - @config + - @cache + tags: + - { name: console.command } + console.command.db.migrate: class: phpbb\console\command\db\migrate arguments: @@ -84,6 +103,20 @@ services: - @config - @cache - @log + - @filesystem + - %core.root_path% + tags: + - { name: console.command } + + console.command.db.revert: + class: phpbb\console\command\db\revert + arguments: + - @user + - @migrator + - @ext.manager + - @config + - @cache + - @filesystem - %core.root_path% tags: - { name: console.command } @@ -139,3 +172,47 @@ services: - @dbal.conn tags: - { name: console.command } + + console.command.reparser.list: + class: phpbb\console\command\reparser\list_all + arguments: + - @user + - @text_reparser_collection + tags: + - { name: console.command } + + console.command.reparser.reparse: + class: phpbb\console\command\reparser\reparse + arguments: + - @user + - @text_reparser_collection + - @config_text + tags: + - { name: console.command } + + console.command.thumbnail.delete: + class: phpbb\console\command\thumbnail\delete + arguments: + - @user + - @dbal.conn + - %core.root_path% + tags: + - { name: console.command } + + console.command.thumbnail.generate: + class: phpbb\console\command\thumbnail\generate + arguments: + - @user + - @dbal.conn + - @cache + - %core.root_path% + - %core.php_ext% + tags: + - { name: console.command } + + console.command.thumbnail.recreate: + class: phpbb\console\command\thumbnail\recreate + arguments: + - @user + tags: + - { name: console.command } diff --git a/phpBB/config/content.yml b/phpBB/config/default/container/services_content.yml index 4d9ee31335..4d9ee31335 100644 --- a/phpBB/config/content.yml +++ b/phpBB/config/default/container/services_content.yml diff --git a/phpBB/config/cron.yml b/phpBB/config/default/container/services_cron.yml index c5b88df181..c5b88df181 100644 --- a/phpBB/config/cron.yml +++ b/phpBB/config/default/container/services_cron.yml diff --git a/phpBB/config/default/container/services_db.yml b/phpBB/config/default/container/services_db.yml new file mode 100644 index 0000000000..ed3f88c704 --- /dev/null +++ b/phpBB/config/default/container/services_db.yml @@ -0,0 +1,81 @@ +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%]] + +# ----- DB Tools ----- + dbal.tools.factory: + class: phpbb\db\tools\factory + + dbal.tools: + class: phpbb\db\tools\tools_interface + factory: ["@dbal.tools.factory", get] + arguments: + - @dbal.conn.driver + +# ----- DB Extractor ----- + dbal.extractor.factory: + class: phpbb\db\extractor\factory + arguments: + - @dbal.conn.driver + - @service_container + + dbal.extractor: + class: phpbb\db\extractor\extractor_interface + factory: ["@dbal.extractor.factory", get] + +# ----- DB Extractors for different drivers ----- +# Scope MUST be prototype for all the handlers to work correctly. + dbal.extractor.extractors.mssql_extractor: + class: phpbb\db\extractor\mssql_extractor + scope: prototype + arguments: + - %core.root_path% + - @request + - @dbal.conn.driver + + dbal.extractor.extractors.mysql_extractor: + class: phpbb\db\extractor\mysql_extractor + scope: prototype + arguments: + - %core.root_path% + - @request + - @dbal.conn.driver + + dbal.extractor.extractors.oracle_extractor: + class: phpbb\db\extractor\oracle_extractor + scope: prototype + arguments: + - %core.root_path% + - @request + - @dbal.conn.driver + + dbal.extractor.extractors.postgres_extractor: + class: phpbb\db\extractor\postgres_extractor + scope: prototype + arguments: + - %core.root_path% + - @request + - @dbal.conn.driver + + dbal.extractor.extractors.sqlite3_extractor: + class: phpbb\db\extractor\sqlite3_extractor + scope: prototype + arguments: + - %core.root_path% + - @request + - @dbal.conn.driver + + dbal.extractor.extractors.sqlite_extractor: + class: phpbb\db\extractor\sqlite_extractor + scope: prototype + arguments: + - %core.root_path% + - @request + - @dbal.conn.driver diff --git a/phpBB/config/event.yml b/phpBB/config/default/container/services_event.yml index 7bc4cb0042..8fd4faa274 100644 --- a/phpBB/config/event.yml +++ b/phpBB/config/default/container/services_event.yml @@ -11,15 +11,6 @@ services: - %core.php_ext% - @cache.driver - kernel_request_subscriber: - class: phpbb\event\kernel_request_subscriber - arguments: - - @ext.manager - - %core.root_path% - - %core.php_ext% - tags: - - { name: kernel.event_subscriber } - kernel_exception_subscriber: class: phpbb\event\kernel_exception_subscriber arguments: diff --git a/phpBB/config/feed.yml b/phpBB/config/default/container/services_feed.yml index 48bd9fe76f..2133b3c489 100644 --- a/phpBB/config/feed.yml +++ b/phpBB/config/default/container/services_feed.yml @@ -1,18 +1,25 @@ services: - feed.helper: - class: phpbb\feed\helper + phpbb.feed.controller: + class: phpbb\feed\controller\feed arguments: + - @template.twig.environment + - @symfony_request + - @controller.helper - @config + - @dbal.conn + - @service_container + - @feed.helper - @user - - %core.root_path% + - @auth - %core.php_ext% - feed.factory: - class: phpbb\feed\factory + feed.helper: + class: phpbb\feed\helper arguments: - - @service_container - @config - - @dbal.conn + - @user + - %core.root_path% + - %core.php_ext% feed.forum: class: phpbb\feed\forum diff --git a/phpBB/config/default/container/services_files.yml b/phpBB/config/default/container/services_files.yml new file mode 100644 index 0000000000..cfdade37df --- /dev/null +++ b/phpBB/config/default/container/services_files.yml @@ -0,0 +1,60 @@ +services: + filesystem: + class: phpbb\filesystem\filesystem + + files.factory: + class: phpbb\files\factory + arguments: + - @service_container + + files.filespec: + class: phpbb\files\filespec + scope: prototype + arguments: + - @filesystem + - @language + - @php_ini + - @upload_imagesize + - %core.root_path% + - @mimetype.guesser + - @plupload + + files.upload: + class: phpbb\files\upload + scope: prototype + arguments: + - @filesystem + - @files.factory + - @language + - @php_ini + - @request + - %core.root_path% + + files.types.form: + class: phpbb\files\types\form + scope: prototype + arguments: + - @files.factory + - @language + - @php_ini + - @plupload + - @request + + files.types.local: + class: phpbb\files\types\form + scope: prototype + arguments: + - @files.factory + - @language + - @php_ini + - @request + + files.types.remote: + class: phpbb\files\types\remote + scope: prototype + arguments: + - @files.factory + - @language + - @php_ini + - @request + - %core.root_path% diff --git a/phpBB/config/default/container/services_help.yml b/phpBB/config/default/container/services_help.yml new file mode 100644 index 0000000000..8b9d497945 --- /dev/null +++ b/phpBB/config/default/container/services_help.yml @@ -0,0 +1,27 @@ +services: + phpbb.help.manager: + class: phpbb\help\manager + arguments: + - @dispatcher + - @language + - @template + + phpbb.help.controller.bbcode: + class: phpbb\help\controller\bbcode + arguments: + - @controller.helper + - @phpbb.help.manager + - @template + - @language + - %core.root_path% + - %core.php_ext% + + phpbb.help.controller.faq: + class: phpbb\help\controller\faq + arguments: + - @controller.helper + - @phpbb.help.manager + - @template + - @language + - %core.root_path% + - %core.php_ext% diff --git a/phpBB/config/default/container/services_http.yml b/phpBB/config/default/container/services_http.yml new file mode 100644 index 0000000000..1285fd1d88 --- /dev/null +++ b/phpBB/config/default/container/services_http.yml @@ -0,0 +1,23 @@ +services: + http_kernel: + class: Symfony\Component\HttpKernel\HttpKernel + arguments: + - @dispatcher + - @controller.resolver + - @request_stack + + # WARNING: The Symfony request does not escape the input and should be used very carefully + # prefer the phpbb request (service @request) as possible + symfony_request: + class: phpbb\symfony_request + arguments: + - @request + + request_stack: + class: Symfony\Component\HttpFoundation\RequestStack + + request: + class: phpbb\request\request + arguments: + - null + - %core.disable_super_globals% diff --git a/phpBB/config/default/container/services_language.yml b/phpBB/config/default/container/services_language.yml new file mode 100644 index 0000000000..aa3631ded1 --- /dev/null +++ b/phpBB/config/default/container/services_language.yml @@ -0,0 +1,22 @@ +services: + language.helper.language_file: + class: phpbb\language\language_file_helper + arguments: + - %core.root_path% + + language: + class: phpbb\language\language + arguments: + - @language.loader + + language.loader_abstract: + abstract: true + class: phpbb\language\language_file_loader + arguments: + - %core.root_path% + - %core.php_ext% + + language.loader: + parent: language.loader_abstract + calls: + - [set_extension_manager, ["@ext.manager"]] diff --git a/phpBB/config/db.yml b/phpBB/config/default/container/services_migrator.yml index d11669d8a3..01bd7d3a11 100644 --- a/phpBB/config/db.yml +++ b/phpBB/config/default/container/services_migrator.yml @@ -1,19 +1,4 @@ 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 @@ -60,6 +45,7 @@ services: - @dbal.conn - @cache - @user + - @module.manager - %core.root_path% - %core.php_ext% - %tables.modules% diff --git a/phpBB/config/mimetype_guesser.yml b/phpBB/config/default/container/services_mimetype_guesser.yml index 2e89ed3c1f..2e89ed3c1f 100644 --- a/phpBB/config/mimetype_guesser.yml +++ b/phpBB/config/default/container/services_mimetype_guesser.yml diff --git a/phpBB/config/default/container/services_module.yml b/phpBB/config/default/container/services_module.yml new file mode 100644 index 0000000000..513b71553a --- /dev/null +++ b/phpBB/config/default/container/services_module.yml @@ -0,0 +1,10 @@ +services: + module.manager: + class: phpbb\module\module_manager + arguments: + - @cache.driver + - @dbal.conn + - @ext.manager + - %tables.modules% + - %core.root_path% + - %core.php_ext% diff --git a/phpBB/config/default/container/services_notification.yml b/phpBB/config/default/container/services_notification.yml new file mode 100644 index 0000000000..c842656575 --- /dev/null +++ b/phpBB/config/default/container/services_notification.yml @@ -0,0 +1,222 @@ +services: + notification_manager: + class: phpbb\notification\manager + arguments: + - @notification.type_collection + - @notification.method_collection + - @service_container + - @user_loader + - @dispatcher + - @dbal.conn + - @cache + - @user + - %tables.notification_types% + - %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.base: + abstract: true + arguments: + - @dbal.conn + - @user + - @auth + - %core.root_path% + - %core.php_ext% + - %tables.user_notifications% + + notification.type.admin_activate_user: + class: phpbb\notification\type\admin_activate_user + scope: prototype + parent: notification.type.base + calls: + - [set_user_loader, [@user_loader]] + - [set_config, [@config]] + tags: + - { name: notification.type } + + notification.type.approve_post: + class: phpbb\notification\type\approve_post + scope: prototype + parent: notification.type.post + tags: + - { name: notification.type } + + notification.type.approve_topic: + class: phpbb\notification\type\approve_topic + scope: prototype + parent: notification.type.topic + tags: + - { name: notification.type } + + notification.type.bookmark: + class: phpbb\notification\type\bookmark + scope: prototype + parent: notification.type.post + tags: + - { name: notification.type } + + notification.type.disapprove_post: + class: phpbb\notification\type\disapprove_post + scope: prototype + parent: notification.type.post + tags: + - { name: notification.type } + + notification.type.disapprove_topic: + class: phpbb\notification\type\disapprove_topic + scope: prototype + parent: notification.type.topic + tags: + - { name: notification.type } + + notification.type.group_request: + class: phpbb\notification\type\group_request + scope: prototype + parent: notification.type.base + calls: + - [set_user_loader, [@user_loader]] + tags: + - { name: notification.type } + + notification.type.group_request_approved: + class: phpbb\notification\type\group_request_approved + scope: prototype + parent: notification.type.base + tags: + - { name: notification.type } + + notification.type.pm: + class: phpbb\notification\type\pm + scope: prototype + parent: notification.type.base + calls: + - [set_user_loader, [@user_loader]] + - [set_config, [@config]] + tags: + - { name: notification.type } + + notification.type.post: + class: phpbb\notification\type\post + scope: prototype + parent: notification.type.base + calls: + - [set_user_loader, [@user_loader]] + - [set_config, [@config]] + tags: + - { name: notification.type } + + notification.type.post_in_queue: + class: phpbb\notification\type\post_in_queue + scope: prototype + parent: notification.type.post + tags: + - { name: notification.type } + + notification.type.quote: + class: phpbb\notification\type\quote + scope: prototype + parent: notification.type.post + calls: + - [set_utils, [@text_formatter.utils]] + tags: + - { name: notification.type } + + notification.type.report_pm: + class: phpbb\notification\type\report_pm + scope: prototype + parent: notification.type.pm + tags: + - { name: notification.type } + + notification.type.report_pm_closed: + class: phpbb\notification\type\report_pm_closed + scope: prototype + parent: notification.type.pm + tags: + - { name: notification.type } + + notification.type.report_post: + class: phpbb\notification\type\report_post + scope: prototype + parent: notification.type.post + tags: + - { name: notification.type } + + notification.type.report_post_closed: + class: phpbb\notification\type\report_post_closed + scope: prototype + parent: notification.type.post + tags: + - { name: notification.type } + + notification.type.topic: + class: phpbb\notification\type\topic + scope: prototype + parent: notification.type.base + calls: + - [set_user_loader, [@user_loader]] + - [set_config, [@config]] + tags: + - { name: notification.type } + + notification.type.topic_in_queue: + class: phpbb\notification\type\topic_in_queue + scope: prototype + parent: notification.type.topic + 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.board: + class: phpbb\notification\method\board + scope: prototype # scope MUST be prototype for this to work! + arguments: + - @user_loader + - @dbal.conn + - @cache.driver + - @user + - @config + - %tables.notification_types% + - %tables.notifications% + tags: + - { name: notification.method } + + notification.method.email: + class: phpbb\notification\method\email + scope: prototype + arguments: + - @user_loader + - @user + - @config + - %core.root_path% + - %core.php_ext% + tags: + - { name: notification.method } + + notification.method.jabber: + class: phpbb\notification\method\jabber + scope: prototype + arguments: + - @user_loader + - @user + - @config + - %core.root_path% + - %core.php_ext% + tags: + - { name: notification.method } diff --git a/phpBB/config/password.yml b/phpBB/config/default/container/services_password.yml index cb45ec3d42..cb45ec3d42 100644 --- a/phpBB/config/password.yml +++ b/phpBB/config/default/container/services_password.yml diff --git a/phpBB/config/default/container/services_php.yml b/phpBB/config/default/container/services_php.yml new file mode 100644 index 0000000000..29349960f3 --- /dev/null +++ b/phpBB/config/default/container/services_php.yml @@ -0,0 +1,3 @@ +services: + php_ini: + class: bantu\IniGetWrapper\IniGetWrapper diff --git a/phpBB/config/profilefield.yml b/phpBB/config/default/container/services_profilefield.yml index 5ccfef9148..5ccfef9148 100644 --- a/phpBB/config/profilefield.yml +++ b/phpBB/config/default/container/services_profilefield.yml diff --git a/phpBB/config/default/container/services_report.yml b/phpBB/config/default/container/services_report.yml new file mode 100644 index 0000000000..4bf929429e --- /dev/null +++ b/phpBB/config/default/container/services_report.yml @@ -0,0 +1,53 @@ +services: +# ----- Report controller ----- + phpbb.report.controller: + class: phpbb\report\controller\report + arguments: + - @config + - @user + - @template + - @controller.helper + - @request + - @captcha.factory + - @phpbb.report.handler_factory + - @phpbb.report.report_reason_list_provider + - %core.root_path% + - %core.php_ext% + +# ----- Report handler factory ----- + phpbb.report.handler_factory: + class: phpbb\report\handler_factory + arguments: + - @service_container + +# ----- Report UI provider ----- + phpbb.report.report_reason_list_provider: + class: phpbb\report\report_reason_list_provider + arguments: + - @dbal.conn.driver + - @template + - @user + +# ----- Report handlers ----- +# Scope MUST be prototype for all the handlers to work correctly. + phpbb.report.handlers.report_handler_pm: + class: phpbb\report\report_handler_pm + scope: prototype + arguments: + - @dbal.conn.driver + - @dispatcher + - @config + - @auth + - @user + - @notification_manager + + phpbb.report.handlers.report_handler_post: + class: phpbb\report\report_handler_post + scope: prototype + arguments: + - @dbal.conn.driver + - @dispatcher + - @config + - @auth + - @user + - @notification_manager diff --git a/phpBB/config/default/container/services_routing.yml b/phpBB/config/default/container/services_routing.yml new file mode 100644 index 0000000000..12fc98ce74 --- /dev/null +++ b/phpBB/config/default/container/services_routing.yml @@ -0,0 +1,80 @@ +services: + router: + class: phpbb\routing\router + arguments: + - @service_container + - @routing.chained_resources_locator + - @routing.delegated_loader + - %core.root_path% + - %core.php_ext% + - %core.environment% + + router.listener: + class: Symfony\Component\HttpKernel\EventListener\RouterListener + arguments: + - @router + - null + - null + - @request_stack + tags: + - { name: kernel.event_subscriber } + + routing.helper: + class: phpbb\routing\helper + arguments: + - @config + - @router + - @symfony_request + - @request + - @filesystem + - %core.root_path% + - %core.php_ext% + +# ---- Route loaders ---- + + routing.delegated_loader: + class: Symfony\Component\Config\Loader\DelegatingLoader + arguments: + - @routing.resolver + + routing.resolver: + class: phpbb\routing\loader_resolver + arguments: + - @routing.loader.collection + + routing.loader.collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: routing.loader } + + routing.loader.yaml: + class: Symfony\Component\Routing\Loader\YamlFileLoader + arguments: + - @file_locator + tags: + - { name: routing.loader } + +# ---- Resources Locators ---- + + routing.chained_resources_locator: + class: phpbb\routing\resources_locator\chained_resources_locator + arguments: + - @routing.resources_locator.collection + + routing.resources_locator.collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: routing.resources_locator } + + routing.resources_locator.default: + class: phpbb\routing\resources_locator\default_resources_locator + arguments: + - %core.root_path% + - %core.environment% + - @ext.manager + tags: + - { name: routing.resources_locator } diff --git a/phpBB/config/default/container/services_text_formatter.yml b/phpBB/config/default/container/services_text_formatter.yml new file mode 100644 index 0000000000..5a3307175f --- /dev/null +++ b/phpBB/config/default/container/services_text_formatter.yml @@ -0,0 +1,69 @@ +parameters: + text_formatter.cache.dir: %core.root_path%cache/%core.environment%/ + text_formatter.cache.parser.key: _text_formatter_parser + text_formatter.cache.renderer.key: _text_formatter_renderer + +services: + text_formatter.cache: + alias: text_formatter.s9e.factory + + text_formatter.data_access: + class: phpbb\textformatter\data_access + arguments: + - @dbal.conn + - %tables.bbcodes% + - %tables.smilies% + - %tables.styles% + - %tables.words% + - %core.root_path%styles/ + + text_formatter.parser: + alias: text_formatter.s9e.parser + + text_formatter.renderer: + alias: text_formatter.s9e.renderer + + text_formatter.utils: + alias: text_formatter.s9e.utils + + text_formatter.s9e.factory: + class: phpbb\textformatter\s9e\factory + arguments: + - @text_formatter.data_access + - @cache.driver + - @dispatcher + - @config + - %text_formatter.cache.dir% + - %text_formatter.cache.parser.key% + - %text_formatter.cache.renderer.key% + + text_formatter.s9e.parser: + class: phpbb\textformatter\s9e\parser + arguments: + - @cache.driver + - %text_formatter.cache.parser.key% + - @text_formatter.s9e.factory + - @dispatcher + + text_formatter.s9e.quote_helper: + class: phpbb\textformatter\s9e\quote_helper + arguments: + - @user + - %core.root_path% + - %core.php_ext% + + text_formatter.s9e.renderer: + class: phpbb\textformatter\s9e\renderer + arguments: + - @cache.driver + - %text_formatter.cache.dir% + - %text_formatter.cache.renderer.key% + - @text_formatter.s9e.factory + - @dispatcher + calls: + - [configure_quote_helper, [@text_formatter.s9e.quote_helper]] + - [configure_smilies_path, [@config, @path_helper]] + - [configure_user, [@user, @config, @auth]] + + text_formatter.s9e.utils: + class: phpbb\textformatter\s9e\utils diff --git a/phpBB/config/default/container/services_text_reparser.yml b/phpBB/config/default/container/services_text_reparser.yml new file mode 100644 index 0000000000..5d54e8dc82 --- /dev/null +++ b/phpBB/config/default/container/services_text_reparser.yml @@ -0,0 +1,70 @@ +services: + text_reparser_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: text_reparser.plugin } + + text_reparser.contact_admin_info: + class: phpbb\textreparser\plugins\contact_admin_info + arguments: + - @config_text + tags: + - { name: text_reparser.plugin } + + text_reparser.forum_description: + class: phpbb\textreparser\plugins\forum_description + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } + + text_reparser.forum_rules: + class: phpbb\textreparser\plugins\forum_rules + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } + + text_reparser.group_description: + class: phpbb\textreparser\plugins\group_description + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } + + text_reparser.pm_text: + class: phpbb\textreparser\plugins\pm_text + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } + + text_reparser.poll_option: + class: phpbb\textreparser\plugins\poll_option + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } + + text_reparser.poll_title: + class: phpbb\textreparser\plugins\poll_title + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } + + text_reparser.post_text: + class: phpbb\textreparser\plugins\post_text + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } + + text_reparser.user_signature: + class: phpbb\textreparser\plugins\user_signature + arguments: + - @dbal.conn + tags: + - { name: text_reparser.plugin } diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml new file mode 100644 index 0000000000..4132be49fa --- /dev/null +++ b/phpBB/config/default/container/services_twig.yml @@ -0,0 +1,65 @@ +parameters: + core.template.cache_path: %core.root_path%cache/%core.environment%/twig/ + +services: + template.twig.environment: + class: phpbb\template\twig\environment + arguments: + - @config + - @filesystem + - @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 + arguments: + - @filesystem + + 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 + - @language + tags: + - { name: twig.extension } + + template.twig.extensions.routing: + class: phpbb\template\twig\extension\routing + arguments: + - @routing.helper + tags: + - { name: twig.extension } + + template.twig.extensions.debug: + class: Twig_Extension_Debug + + template: + class: phpbb\template\twig\twig + arguments: + - @path_helper + - @config + - @template_context + - @template.twig.environment + - %core.template.cache_path% + - @user + - @template.twig.extensions.collection + - @ext.manager + + template_context: + class: phpbb\template\context diff --git a/phpBB/config/user.yml b/phpBB/config/default/container/services_user.yml index 1ca853ea45..ff114f022a 100644 --- a/phpBB/config/user.yml +++ b/phpBB/config/default/container/services_user.yml @@ -8,6 +8,7 @@ services: user: class: phpbb\user arguments: + - @language - %datetime.class% user_loader: diff --git a/phpBB/config/tables.yml b/phpBB/config/default/container/tables.yml index 2fe2a33be8..c4b5ac2375 100644 --- a/phpBB/config/tables.yml +++ b/phpBB/config/default/container/tables.yml @@ -1,6 +1,7 @@ parameters: tables.auth_provider_oauth_token_storage: %core.table_prefix%oauth_tokens tables.auth_provider_oauth_account_assoc: %core.table_prefix%oauth_accounts + tables.bbcodes: %core.table_prefix%bbcodes 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 @@ -10,6 +11,7 @@ parameters: tables.forums: %core.table_prefix%forums tables.log: %core.table_prefix%log tables.migrations: %core.table_prefix%migrations + tables.moderator_cache: %core.table_prefix%moderator_cache tables.modules: %core.table_prefix%modules tables.notification_types: %core.table_prefix%notification_types tables.notifications: %core.table_prefix%notifications @@ -18,6 +20,9 @@ parameters: tables.profile_fields_options_language: %core.table_prefix%profile_fields_lang tables.profile_fields_language: %core.table_prefix%profile_lang tables.posts: %core.table_prefix%posts + tables.smilies: %core.table_prefix%smilies + tables.styles: %core.table_prefix%styles tables.topics: %core.table_prefix%topics tables.user_notifications: %core.table_prefix%user_notifications tables.users: %core.table_prefix%users + tables.words: %core.table_prefix%words diff --git a/phpBB/config/default/routing/feed.yml b/phpBB/config/default/routing/feed.yml new file mode 100644 index 0000000000..22c9ea5755 --- /dev/null +++ b/phpBB/config/default/routing/feed.yml @@ -0,0 +1,35 @@ +phpbb_feed_forums: + path: /forums + defaults: { _controller: phpbb.feed.controller:forums } + +phpbb_feed_news: + path: /news + defaults: { _controller: phpbb.feed.controller:news } + +phpbb_feed_topics: + path: /topics + defaults: { _controller: phpbb.feed.controller:topics } + +phpbb_feed_topics_active: + path: /topics_active + defaults: { _controller: phpbb.feed.controller:topics_active } + +phpbb_feed_topics_new: + path: /topics_new + defaults: { _controller: phpbb.feed.controller:topics_new } + +phpbb_feed_forum: + path: /forum/{forum_id} + defaults: { _controller: phpbb.feed.controller:forum } + requirements: + forum_id: \d+ + +phpbb_feed_topic: + path: /topic/{topic_id} + defaults: { _controller: phpbb.feed.controller:topic } + requirements: + topic_id: \d+ + +phpbb_feed_overall: + path: /{mode} + defaults: { _controller: phpbb.feed.controller:overall } diff --git a/phpBB/config/default/routing/help.yml b/phpBB/config/default/routing/help.yml new file mode 100644 index 0000000000..8d43839d1e --- /dev/null +++ b/phpBB/config/default/routing/help.yml @@ -0,0 +1,7 @@ +phpbb_help_bbcode_controller: + path: /bbcode + defaults: { _controller: phpbb.help.controller.bbcode:handle } + +phpbb_help_faq_controller: + path: /faq + defaults: { _controller: phpbb.help.controller.faq:handle } diff --git a/phpBB/config/default/routing/report.yml b/phpBB/config/default/routing/report.yml new file mode 100644 index 0000000000..dbe2d853c0 --- /dev/null +++ b/phpBB/config/default/routing/report.yml @@ -0,0 +1,17 @@ +phpbb_report_pm_controller: + path: /pm/{id}/report + methods: [GET, POST] + defaults: + _controller: phpbb.report.controller:handle + mode: "pm" + requirements: + id: \d+ + +phpbb_report_post_controller: + path: /post/{id}/report + methods: [GET, POST] + defaults: + _controller: phpbb.report.controller:handle + mode: "post" + requirements: + id: \d+ diff --git a/phpBB/config/default/routing/routing.yml b/phpBB/config/default/routing/routing.yml new file mode 100644 index 0000000000..073984841a --- /dev/null +++ b/phpBB/config/default/routing/routing.yml @@ -0,0 +1,24 @@ +# Structure: +# +# foo_controller: +# path: /foo +# defaults: { _controller: foo_sevice:method } +# +# The above will be accessed via app.php?controller=foo and it will +# instantiate the "foo_service" service and call the "method" method. +# + +phpbb_feed_routing: + resource: "feed.yml" + prefix: /feed + +phpbb_feed_index: + path: /feed + defaults: { _controller: phpbb.feed.controller:overall } + +phpbb_help_routing: + resource: "help.yml" + prefix: /help + +phpbb_report_routing: + resource: "report.yml" diff --git a/phpBB/config/development/config.yml b/phpBB/config/development/config.yml new file mode 100644 index 0000000000..f39eb52e73 --- /dev/null +++ b/phpBB/config/development/config.yml @@ -0,0 +1,13 @@ +imports: + - { resource: ../default/config.yml } + +core: + require_dev_dependencies: true + + debug: + exceptions: true + + twig: + debug: true + auto_reload: true + enable_debug_extension: true diff --git a/phpBB/config/development/container/environment.yml b/phpBB/config/development/container/environment.yml new file mode 100644 index 0000000000..40a3c7a683 --- /dev/null +++ b/phpBB/config/development/container/environment.yml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yml } + - { resource: parameters.yml } diff --git a/phpBB/config/development/container/parameters.yml b/phpBB/config/development/container/parameters.yml new file mode 100644 index 0000000000..0447646806 --- /dev/null +++ b/phpBB/config/development/container/parameters.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/parameters.yml } diff --git a/phpBB/config/development/container/services.yml b/phpBB/config/development/container/services.yml new file mode 100644 index 0000000000..b302f0f966 --- /dev/null +++ b/phpBB/config/development/container/services.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/services.yml } diff --git a/phpBB/config/development/routing/environment.yml b/phpBB/config/development/routing/environment.yml new file mode 100644 index 0000000000..0cddfb7521 --- /dev/null +++ b/phpBB/config/development/routing/environment.yml @@ -0,0 +1,2 @@ +core.default: + resource: "../../default/routing/routing.yml" diff --git a/phpBB/config/installer/config.yml b/phpBB/config/installer/config.yml new file mode 100644 index 0000000000..979dbbcdd9 --- /dev/null +++ b/phpBB/config/installer/config.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../default/config.yml } diff --git a/phpBB/config/installer/container/environment.yml b/phpBB/config/installer/container/environment.yml new file mode 100644 index 0000000000..40a3c7a683 --- /dev/null +++ b/phpBB/config/installer/container/environment.yml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yml } + - { resource: parameters.yml } diff --git a/phpBB/config/installer/container/parameters.yml b/phpBB/config/installer/container/parameters.yml new file mode 100644 index 0000000000..0447646806 --- /dev/null +++ b/phpBB/config/installer/container/parameters.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/parameters.yml } diff --git a/phpBB/config/installer/container/services.yml b/phpBB/config/installer/container/services.yml new file mode 100644 index 0000000000..5cd30f9222 --- /dev/null +++ b/phpBB/config/installer/container/services.yml @@ -0,0 +1,78 @@ +imports: + - { resource: services_installer.yml } + - { resource: ../../default/container/services_files.yml } + - { resource: ../../default/container/services_http.yml } + - { resource: ../../default/container/services_language.yml } + - { resource: ../../default/container/services_php.yml } + - { resource: ../../default/container/services_routing.yml } + - { resource: ../../default/container/services_twig.yml } + +services: + config: + class: phpbb\config\config + arguments: + - [] + + controller.resolver: + class: phpbb\controller\resolver + arguments: + - @service_container + - %core.root_path% + - @template + + dispatcher: + class: phpbb\event\dispatcher + arguments: + - @service_container + + language.loader: + parent: language.loader_abstract + + path_helper: + class: phpbb\path_helper + arguments: + - @symfony_request + - @filesystem + - @request + - %core.root_path% + - %core.php_ext% + + router: + class: phpbb\routing\router + arguments: + - @service_container + - @filesystem + - %core.root_path% + - %core.php_ext% + - %core.environment% + + template: + class: phpbb\template\twig\twig + arguments: + - @path_helper + - @config + - @template_context + - @template.twig.environment + - %core.template.cache_path% + - null + - @template.twig.extensions.collection + + template.twig.environment: + class: phpbb\template\twig\environment + arguments: + - @config + - @filesystem + - @path_helper + - @service_container + - %core.template.cache_path% + - null + - @template.twig.loader + - [] + + console.exception_subscriber: + class: phpbb\console\exception_subscriber + arguments: + - @language + - %debug.exceptions% + tags: + - { name: kernel.event_subscriber } diff --git a/phpBB/config/installer/container/services_install_console.yml b/phpBB/config/installer/container/services_install_console.yml new file mode 100644 index 0000000000..1c1b819e82 --- /dev/null +++ b/phpBB/config/installer/container/services_install_console.yml @@ -0,0 +1,36 @@ +services: + console.installer.command_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: console.installer.command } + + console.installer.command.install: + class: phpbb\install\console\command\install\install + arguments: + - @language + - @installer.helper.iohandler_factory + - @installer.installer.install + - @installer.helper.install_helper + tags: + - { name: console.installer.command } + + console.installer.command.config.show: + class: phpbb\install\console\command\install\config\show + arguments: + - @language + - @installer.helper.iohandler_factory + - @installer.installer.install + tags: + - { name: console.installer.command } + + + console.installer.command.config.validate: + class: phpbb\install\console\command\install\config\validate + arguments: + - @language + - @installer.helper.iohandler_factory + - @installer.installer.install + tags: + - { name: console.installer.command } diff --git a/phpBB/config/installer/container/services_install_controller.yml b/phpBB/config/installer/container/services_install_controller.yml new file mode 100644 index 0000000000..a3595ff0a3 --- /dev/null +++ b/phpBB/config/installer/container/services_install_controller.yml @@ -0,0 +1,34 @@ +services: + phpbb.installer.controller.welcome: + class: phpbb\install\controller\installer_index + arguments: + - @phpbb.installer.controller.helper + - @language + - @template + - %core.root_path% + + phpbb.installer.controller.helper: + class: phpbb\install\controller\helper + arguments: + - @language + - @language.helper.language_file + - @installer.navigation.provider + - @template + - @path_helper + - @request + - @symfony_request + - @router + - %core.root_path% + + phpbb.installer.controller.install: + class: phpbb\install\controller\install + arguments: + - @phpbb.installer.controller.helper + - @installer.helper.config + - @installer.helper.iohandler_factory + - @installer.navigation.provider + - @language + - @template + - @request + - @installer.installer.install + - @installer.helper.install_helper diff --git a/phpBB/config/installer/container/services_install_data.yml b/phpBB/config/installer/container/services_install_data.yml new file mode 100644 index 0000000000..ea5b5a2c52 --- /dev/null +++ b/phpBB/config/installer/container/services_install_data.yml @@ -0,0 +1,44 @@ +services: + installer.install_data.add_bots: + class: phpbb\install\module\install_data\task\add_bots + arguments: + - @installer.helper.config + - @installer.helper.iohandler + - @installer.helper.container_factory + - @language + - %core.root_path% + - %core.php_ext% + tags: + - { name: install_data_install, order: 20 } + + installer.install_data.add_languages: + class: phpbb\install\module\install_data\task\add_languages + arguments: + - @installer.helper.iohandler + - @installer.helper.container_factory + - @language.helper.language_file + tags: + - { name: install_data_install, order: 10 } + + installer.install_data.add_modules: + class: phpbb\install\module\install_data\task\add_modules + arguments: + - @installer.helper.iohandler + - @installer.helper.container_factory + tags: + - { name: install_data_install, order: 30 } + + installer.module.data_install_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: install_data_install, class_name_aware: true } + + installer.module.data_install: + class: phpbb\install\module\install_data\module + parent: installer.module_base + arguments: + - @installer.module.data_install_collection + tags: + - { name: installer_install_module, order: 50 } diff --git a/phpBB/config/installer/container/services_install_database.yml b/phpBB/config/installer/container/services_install_database.yml new file mode 100644 index 0000000000..743d62bae5 --- /dev/null +++ b/phpBB/config/installer/container/services_install_database.yml @@ -0,0 +1,51 @@ +services: + installer.install_database.create_schema: + class: phpbb\install\module\install_database\task\create_schema + arguments: + - @installer.helper.config + - @installer.helper.database + - @filesystem + - @installer.helper.iohandler + - %core.root_path% + - %core.php_ext% + tags: + - { name: install_database_install, order: 10 } + + installer.install_database.add_default_data: + class: phpbb\install\module\install_database\task\add_default_data + arguments: + - @installer.helper.database + - @installer.helper.config + - @installer.helper.iohandler + - @installer.helper.container_factory + - @language + - %core.root_path% + tags: + - { name: install_database_install, order: 20 } + + installer.install_database.add_config_settings: + class: phpbb\install\module\install_database\task\add_config_settings + arguments: + - @filesystem + - @installer.helper.config + - @installer.helper.iohandler + - @installer.helper.container_factory + - @language + - %core.root_path% + tags: + - { name: install_database_install, order: 30 } + + installer.module.install_database_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: install_database_install, class_name_aware: true } + + installer.module.database_install: + class: phpbb\install\module\install_database\module + parent: installer.module_base + arguments: + - @installer.module.install_database_collection + tags: + - { name: installer_install_module, order: 40 } diff --git a/phpBB/config/installer/container/services_install_filesystem.yml b/phpBB/config/installer/container/services_install_filesystem.yml new file mode 100644 index 0000000000..776d7b9198 --- /dev/null +++ b/phpBB/config/installer/container/services_install_filesystem.yml @@ -0,0 +1,27 @@ +services: + installer.install_filesystem.create_config_file: + class: phpbb\install\module\install_filesystem\task\create_config_file + arguments: + - @filesystem + - @installer.helper.config + - @installer.helper.database + - @installer.helper.iohandler + - %core.root_path% + - %core.php_ext% + tags: + - { name: install_filesystem_install, order: 10 } + + installer.module.install_filesystem_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: install_filesystem_install, class_name_aware: true } + + installer.module.filesystem_install: + class: phpbb\install\module\install_filesystem\module + parent: installer.module_base + arguments: + - @installer.module.install_filesystem_collection + tags: + - { name: installer_install_module, order: 30 } diff --git a/phpBB/config/installer/container/services_install_finish.yml b/phpBB/config/installer/container/services_install_finish.yml new file mode 100644 index 0000000000..1dd280306a --- /dev/null +++ b/phpBB/config/installer/container/services_install_finish.yml @@ -0,0 +1,33 @@ +services: + installer.install_finish.populate_migrations: + class: phpbb\install\module\install_finish\task\populate_migrations + arguments: + - @installer.helper.container_factory + tags: + - { name: install_finish, order: 10 } + + installer.install_finish.notify_user: + class: phpbb\install\module\install_finish\task\notify_user + arguments: + - @installer.helper.container_factory + - @installer.helper.config + - @installer.helper.iohandler + - %core.root_path% + - %core.php_ext% + tags: + - { name: install_finish, order: 20 } + + installer.module.install_finish_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: install_finish, class_name_aware: true } + + installer.module.finish_install: + class: phpbb\install\module\install_filesystem\module + parent: installer.module_base + arguments: + - @installer.module.install_finish_collection + tags: + - { name: installer_install_module, order: 60 } diff --git a/phpBB/config/installer/container/services_install_navigation.yml b/phpBB/config/installer/container/services_install_navigation.yml new file mode 100644 index 0000000000..53e20e89cc --- /dev/null +++ b/phpBB/config/installer/container/services_install_navigation.yml @@ -0,0 +1,27 @@ +services: + installer.navigation.provider: + class: phpbb\install\helper\navigation\navigation_provider + arguments: + - @installer.navigation.service_collection + + installer.navigation.service_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: installer.navigation } + + installer.navigation.main_navigation: + class: phpbb\install\helper\navigation\main_navigation + scope: prototype + tags: + - { name: installer.navigation } + + installer.navigation.install_navigation: + class: phpbb\install\helper\navigation\install_navigation + arguments: + - @installer.helper.install_helper + scope: prototype + tags: + - { name: installer.navigation } + diff --git a/phpBB/config/installer/container/services_install_obtain_data.yml b/phpBB/config/installer/container/services_install_obtain_data.yml new file mode 100644 index 0000000000..a1fab313c4 --- /dev/null +++ b/phpBB/config/installer/container/services_install_obtain_data.yml @@ -0,0 +1,66 @@ +services: + installer.obtain_data.obtain_admin_data: + class: phpbb\install\module\obtain_data\task\obtain_admin_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + tags: + - { name: install_obtain_data, order: 10 } + + installer.obtain_data.obtain_board_data: + class: phpbb\install\module\obtain_data\task\obtain_board_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + - @language.helper.language_file + tags: + - { name: install_obtain_data, order: 50 } + + installer.obtain_data.obtain_database_data: + class: phpbb\install\module\obtain_data\task\obtain_database_data + arguments: + - @installer.helper.database + - @installer.helper.config + - @installer.helper.iohandler + tags: + - { name: install_obtain_data, order: 20 } + + installer.obtain_data.obtain_email_data: + class: phpbb\install\module\obtain_data\task\obtain_email_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + tags: + - { name: install_obtain_data, order: 40 } + + installer.obtain_data.obtain_imagick_path: + class: phpbb\install\module\obtain_data\task\obtain_imagick_path + arguments: + - @installer.helper.config + tags: + - { name: install_obtain_data, order: 60 } + + installer.obtain_data.obtain_server_data: + class: phpbb\install\module\obtain_data\task\obtain_server_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + tags: + - { name: install_obtain_data, order: 30 } + + installer.module.install_obtain_data_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: install_obtain_data, class_name_aware: true } + + installer.module.obtain_data_install: + class: phpbb\install\module\obtain_data\module + parent: installer.module_base + arguments: + - @installer.module.install_obtain_data_collection + - true + - false + tags: + - { name: installer_install_module, order: 20 } diff --git a/phpBB/config/installer/container/services_install_requirements.yml b/phpBB/config/installer/container/services_install_requirements.yml new file mode 100644 index 0000000000..f368031707 --- /dev/null +++ b/phpBB/config/installer/container/services_install_requirements.yml @@ -0,0 +1,36 @@ +services: + installer.requirements.check_filesystem: + class: phpbb\install\module\requirements\task\check_filesystem + arguments: + - @filesystem + - @installer.helper.iohandler + - %core.root_path% + - %core.php_ext% + tags: + - { name: installer_requirements, order: 10 } + + installer.requirements.check_server_environment: + class: phpbb\install\module\requirements\task\check_server_environment + arguments: + - @installer.helper.database + - @installer.helper.iohandler + tags: + - { name: installer_requirements, order: 20 } + + installer.module.install_requirements_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: installer_requirements, class_name_aware: true } + +# Please note, that the name of this module is hard coded in the installer service + installer.module.requirements_install: + class: phpbb\install\module\requirements\module + parent: installer.module_base + arguments: + - @installer.module.install_requirements_collection + - true + - false + tags: + - { name: installer_install_module, order: 10 } diff --git a/phpBB/config/installer/container/services_installer.yml b/phpBB/config/installer/container/services_installer.yml new file mode 100644 index 0000000000..62137aa9d8 --- /dev/null +++ b/phpBB/config/installer/container/services_installer.yml @@ -0,0 +1,87 @@ +imports: + - { resource: services_install_console.yml } + - { resource: services_install_controller.yml } + - { resource: services_install_data.yml } + - { resource: services_install_database.yml } + - { resource: services_install_filesystem.yml } + - { resource: services_install_finish.yml } + - { resource: services_install_navigation.yml } + - { resource: services_install_obtain_data.yml } + - { resource: services_install_requirements.yml } + +services: +# -------- Installer helpers ------------------------ + installer.helper.config: + class: phpbb\install\helper\config + arguments: + - @filesystem + - @php_ini + - %core.root_path% + + installer.helper.database: + class: phpbb\install\helper\database + arguments: + - @filesystem + - %core.root_path% + + installer.helper.iohandler_factory: + class: phpbb\install\helper\iohandler\factory + arguments: + - @service_container + + installer.helper.iohandler_abstract: + abstract: true + calls: + - [set_language, ["@language"]] + + installer.helper.iohandler_ajax: + class: phpbb\install\helper\iohandler\ajax_iohandler + parent: installer.helper.iohandler_abstract + arguments: + - @request + - @template + + installer.helper.iohandler_cli: + class: phpbb\install\helper\iohandler\cli_iohandler + parent: installer.helper.iohandler_abstract + + installer.helper.iohandler: + class: phpbb\install\helper\iohandler\iohandler_interface + factory: ["@installer.helper.iohandler_factory", get] + + installer.helper.container_factory: + class: phpbb\install\helper\container_factory + arguments: + - @request + - %core.root_path% + - %core.php_ext% + + installer.helper.install_helper: + class: phpbb\install\helper\install_helper + arguments: + - %core.root_path% + - %core.php_ext% + +# -------- Installer -------------------------------- + installer.module_base: + abstract: true + calls: + - [setup, [@installer.helper.config, @installer.helper.iohandler]] + + installer.installer.abstract: + class: phpbb\install\installer + abstract: true + arguments: + - @installer.helper.config + + installer.install.module_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: installer_install_module } + + installer.installer.install: + parent: installer.installer.abstract + calls: + - [set_modules, [@installer.install.module_collection]] diff --git a/phpBB/config/installer/routing/environment.yml b/phpBB/config/installer/routing/environment.yml new file mode 100644 index 0000000000..60324c975b --- /dev/null +++ b/phpBB/config/installer/routing/environment.yml @@ -0,0 +1,2 @@ +core.default: + resource: "installer.yml" diff --git a/phpBB/config/installer/routing/installer.yml b/phpBB/config/installer/routing/installer.yml new file mode 100644 index 0000000000..80a995ab6e --- /dev/null +++ b/phpBB/config/installer/routing/installer.yml @@ -0,0 +1,22 @@ +phpbb_installer_index: + path: / + defaults: + _controller: phpbb.installer.controller.welcome:handle + mode: "intro" + +phpbb_installer_license: + path: /license + defaults: + _controller: phpbb.installer.controller.welcome:handle + mode: "license" + +phpbb_installer_support: + path: /support + defaults: + _controller: phpbb.installer.controller.welcome:handle + mode: "support" + +phpbb_installer_install: + path: /install + defaults: + _controller: phpbb.installer.controller.install:handle diff --git a/phpBB/config/notification.yml b/phpBB/config/notification.yml deleted file mode 100644 index b17a172fb5..0000000000 --- a/phpBB/config/notification.yml +++ /dev/null @@ -1,390 +0,0 @@ -services: - notification_manager: - class: phpbb\notification\manager - arguments: - - @notification.type_collection - - @notification.method_collection - - @service_container - - @user_loader - - @config - - @dispatcher - - @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/production/config.yml b/phpBB/config/production/config.yml new file mode 100644 index 0000000000..979dbbcdd9 --- /dev/null +++ b/phpBB/config/production/config.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../default/config.yml } diff --git a/phpBB/config/production/container/environment.yml b/phpBB/config/production/container/environment.yml new file mode 100644 index 0000000000..40a3c7a683 --- /dev/null +++ b/phpBB/config/production/container/environment.yml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yml } + - { resource: parameters.yml } diff --git a/phpBB/config/production/container/parameters.yml b/phpBB/config/production/container/parameters.yml new file mode 100644 index 0000000000..0447646806 --- /dev/null +++ b/phpBB/config/production/container/parameters.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/parameters.yml } diff --git a/phpBB/config/production/container/services.yml b/phpBB/config/production/container/services.yml new file mode 100644 index 0000000000..b302f0f966 --- /dev/null +++ b/phpBB/config/production/container/services.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/services.yml } diff --git a/phpBB/config/production/routing/environment.yml b/phpBB/config/production/routing/environment.yml new file mode 100644 index 0000000000..0cddfb7521 --- /dev/null +++ b/phpBB/config/production/routing/environment.yml @@ -0,0 +1,2 @@ +core.default: + resource: "../../default/routing/routing.yml" diff --git a/phpBB/config/routing.yml b/phpBB/config/routing.yml deleted file mode 100644 index 94146e1ec2..0000000000 --- a/phpBB/config/routing.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Structure: -# -# foo_controller: -# path: /foo -# defaults: { _controller: foo_sevice:method } -# -# The above will be accessed via app.php?controller=foo and it will -# instantiate the "foo_service" service and call the "method" method. -# diff --git a/phpBB/config/test/config.yml b/phpBB/config/test/config.yml new file mode 100644 index 0000000000..1c17b08931 --- /dev/null +++ b/phpBB/config/test/config.yml @@ -0,0 +1,5 @@ +imports: + - { resource: ../default/config.yml } + +core: + require_dev_dependencies: true diff --git a/phpBB/config/test/container/environment.yml b/phpBB/config/test/container/environment.yml new file mode 100644 index 0000000000..40a3c7a683 --- /dev/null +++ b/phpBB/config/test/container/environment.yml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yml } + - { resource: parameters.yml } diff --git a/phpBB/config/test/container/parameters.yml b/phpBB/config/test/container/parameters.yml new file mode 100644 index 0000000000..0447646806 --- /dev/null +++ b/phpBB/config/test/container/parameters.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/parameters.yml } diff --git a/phpBB/config/test/container/services.yml b/phpBB/config/test/container/services.yml new file mode 100644 index 0000000000..b302f0f966 --- /dev/null +++ b/phpBB/config/test/container/services.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../../default/container/services.yml } diff --git a/phpBB/config/test/routing/environment.yml b/phpBB/config/test/routing/environment.yml new file mode 100644 index 0000000000..0cddfb7521 --- /dev/null +++ b/phpBB/config/test/routing/environment.yml @@ -0,0 +1,2 @@ +core.default: + resource: "../../default/routing/routing.yml" |