diff options
Diffstat (limited to 'phpBB/config')
19 files changed, 329 insertions, 23 deletions
diff --git a/phpBB/config/default/container/services.yml b/phpBB/config/default/container/services.yml index 49d2f21c43..e67af18a9c 100644 --- a/phpBB/config/default/container/services.yml +++ b/phpBB/config/default/container/services.yml @@ -10,7 +10,9 @@ imports: - { resource: services_event.yml } - { resource: services_feed.yml } - { resource: services_files.yml } + - { resource: services_filesystem.yml } - { resource: services_help.yml } + - { resource: services_hook.yml } - { resource: services_http.yml } - { resource: services_language.yml } - { resource: services_migrator.yml } diff --git a/phpBB/config/default/container/services_console.yml b/phpBB/config/default/container/services_console.yml index 6b46375c7d..6f6e129b29 100644 --- a/phpBB/config/default/container/services_console.yml +++ b/phpBB/config/default/container/services_console.yml @@ -98,6 +98,7 @@ services: class: phpbb\console\command\db\migrate arguments: - @user + - @language - @migrator - @ext.manager - @config @@ -112,6 +113,7 @@ services: class: phpbb\console\command\db\revert arguments: - @user + - @language - @migrator - @ext.manager - @config diff --git a/phpBB/config/default/container/services_event.yml b/phpBB/config/default/container/services_event.yml index 8fd4faa274..4a35add776 100644 --- a/phpBB/config/default/container/services_event.yml +++ b/phpBB/config/default/container/services_event.yml @@ -4,18 +4,11 @@ services: arguments: - @service_container - hook_finder: - class: phpbb\hook\finder - arguments: - - %core.root_path% - - %core.php_ext% - - @cache.driver - kernel_exception_subscriber: class: phpbb\event\kernel_exception_subscriber arguments: - @template - - @user + - @language tags: - { name: kernel.event_subscriber } diff --git a/phpBB/config/default/container/services_files.yml b/phpBB/config/default/container/services_files.yml index cfdade37df..425df6dc9b 100644 --- a/phpBB/config/default/container/services_files.yml +++ b/phpBB/config/default/container/services_files.yml @@ -1,7 +1,4 @@ services: - filesystem: - class: phpbb\filesystem\filesystem - files.factory: class: phpbb\files\factory arguments: diff --git a/phpBB/config/default/container/services_filesystem.yml b/phpBB/config/default/container/services_filesystem.yml new file mode 100644 index 0000000000..828f9076dd --- /dev/null +++ b/phpBB/config/default/container/services_filesystem.yml @@ -0,0 +1,3 @@ +services: + filesystem: + class: phpbb\filesystem\filesystem diff --git a/phpBB/config/default/container/services_hook.yml b/phpBB/config/default/container/services_hook.yml new file mode 100644 index 0000000000..9d0d355cff --- /dev/null +++ b/phpBB/config/default/container/services_hook.yml @@ -0,0 +1,7 @@ +services: + hook_finder: + class: phpbb\hook\finder + arguments: + - %core.root_path% + - %core.php_ext% + - @cache.driver diff --git a/phpBB/config/default/container/services_routing.yml b/phpBB/config/default/container/services_routing.yml index 12fc98ce74..4bedc951ee 100644 --- a/phpBB/config/default/container/services_routing.yml +++ b/phpBB/config/default/container/services_routing.yml @@ -56,7 +56,7 @@ services: tags: - { name: routing.loader } -# ---- Resources Locators ---- +# ---- Resources Locators ---- routing.chained_resources_locator: class: phpbb\routing\resources_locator\chained_resources_locator diff --git a/phpBB/config/installer/container/services.yml b/phpBB/config/installer/container/services.yml index 5cd30f9222..e7325399ad 100644 --- a/phpBB/config/installer/container/services.yml +++ b/phpBB/config/installer/container/services.yml @@ -1,6 +1,7 @@ imports: - { resource: services_installer.yml } - - { resource: ../../default/container/services_files.yml } + - { resource: ../../default/container/services_event.yml } + - { resource: ../../default/container/services_filesystem.yml } - { resource: ../../default/container/services_http.yml } - { resource: ../../default/container/services_language.yml } - { resource: ../../default/container/services_php.yml } @@ -20,10 +21,11 @@ services: - %core.root_path% - @template - dispatcher: - class: phpbb\event\dispatcher + file_locator: + class: phpbb\routing\file_locator arguments: - - @service_container + - @filesystem + - %core.root_path% language.loader: parent: language.loader_abstract @@ -37,14 +39,14 @@ services: - %core.root_path% - %core.php_ext% - router: - class: phpbb\routing\router + routing.resources_locator.default: + class: phpbb\routing\resources_locator\installer_resources_locator arguments: - - @service_container - @filesystem - %core.root_path% - - %core.php_ext% - %core.environment% + tags: + - { name: routing.resources_locator } template: class: phpbb\template\twig\twig diff --git a/phpBB/config/installer/container/services_file_updater.yml b/phpBB/config/installer/container/services_file_updater.yml new file mode 100644 index 0000000000..10e52acd16 --- /dev/null +++ b/phpBB/config/installer/container/services_file_updater.yml @@ -0,0 +1,38 @@ +services: + installer.file_updater.factory: + class: phpbb\install\helper\file_updater\factory + arguments: + - @installer.file_updater.collection + + installer.file_updater.collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: file_updater } + + installer.file_updater.compress: + class: phpbb\install\helper\file_updater\compression_file_updater + arguments: + - @installer.helper.update_helper + - %core.root_path% + - %core.php_ext% + tags: + - { name: file_updater } + + installer.file_updater.ftp: + class: phpbb\install\helper\file_updater\ftp_file_updater + arguments: + - @installer.helper.update_helper + - %core.root_path% + - %core.php_ext% + tags: + - { name: file_updater } + + installer.file_updater.file: + class: phpbb\install\helper\file_updater\file_updater + arguments: + - @filesystem + - %core.root_path% + tags: + - { name: file_updater } diff --git a/phpBB/config/installer/container/services_install_controller.yml b/phpBB/config/installer/container/services_install_controller.yml index a3595ff0a3..221a73f2c3 100644 --- a/phpBB/config/installer/container/services_install_controller.yml +++ b/phpBB/config/installer/container/services_install_controller.yml @@ -10,6 +10,7 @@ services: phpbb.installer.controller.helper: class: phpbb\install\controller\helper arguments: + - @installer.helper.config - @language - @language.helper.language_file - @installer.navigation.provider @@ -24,7 +25,6 @@ services: class: phpbb\install\controller\install arguments: - @phpbb.installer.controller.helper - - @installer.helper.config - @installer.helper.iohandler_factory - @installer.navigation.provider - @language @@ -32,3 +32,20 @@ services: - @request - @installer.installer.install - @installer.helper.install_helper + + phpbb.installer.controller.update: + class: phpbb\install\controller\update + arguments: + - @phpbb.installer.controller.helper + - @installer.installer.update + - @installer.helper.install_helper + - @installer.helper.iohandler_factory + - @language + - @installer.navigation.provider + - @request + - @template + + phpbb.installer.controller.file_downloader: + class: phpbb\install\controller\archive_download + arguments: + - @installer.helper.config diff --git a/phpBB/config/installer/container/services_install_navigation.yml b/phpBB/config/installer/container/services_install_navigation.yml index 53e20e89cc..4e39e07043 100644 --- a/phpBB/config/installer/container/services_install_navigation.yml +++ b/phpBB/config/installer/container/services_install_navigation.yml @@ -25,3 +25,11 @@ services: tags: - { name: installer.navigation } + installer.navigation.update_navigation: + class: phpbb\install\helper\navigation\update_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 index a1fab313c4..dce261b8c7 100644 --- a/phpBB/config/installer/container/services_install_obtain_data.yml +++ b/phpBB/config/installer/container/services_install_obtain_data.yml @@ -56,7 +56,7 @@ services: - { name: service_collection, tag: install_obtain_data, class_name_aware: true } installer.module.obtain_data_install: - class: phpbb\install\module\obtain_data\module + class: phpbb\install\module\obtain_data\install_module parent: installer.module_base arguments: - @installer.module.install_obtain_data_collection diff --git a/phpBB/config/installer/container/services_install_requirements.yml b/phpBB/config/installer/container/services_install_requirements.yml index f368031707..47910e7200 100644 --- a/phpBB/config/installer/container/services_install_requirements.yml +++ b/phpBB/config/installer/container/services_install_requirements.yml @@ -16,6 +16,7 @@ services: - @installer.helper.iohandler tags: - { name: installer_requirements, order: 20 } + - { name: update_requirements, order: 20 } installer.module.install_requirements_collection: class: phpbb\di\ordered_service_collection @@ -26,7 +27,7 @@ services: # 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 + class: phpbb\install\module\requirements\install_module parent: installer.module_base arguments: - @installer.module.install_requirements_collection diff --git a/phpBB/config/installer/container/services_installer.yml b/phpBB/config/installer/container/services_installer.yml index 62137aa9d8..667ff2bafd 100644 --- a/phpBB/config/installer/container/services_installer.yml +++ b/phpBB/config/installer/container/services_installer.yml @@ -1,4 +1,5 @@ imports: + - { resource: services_file_updater.yml } - { resource: services_install_console.yml } - { resource: services_install_controller.yml } - { resource: services_install_data.yml } @@ -8,6 +9,10 @@ imports: - { resource: services_install_navigation.yml } - { resource: services_install_obtain_data.yml } - { resource: services_install_requirements.yml } + - { resource: services_update_database.yml } + - { resource: services_update_filesystem.yml } + - { resource: services_update_obtain_data.yml } + - { resource: services_update_requirements.yml } services: # -------- Installer helpers ------------------------ @@ -38,8 +43,10 @@ services: class: phpbb\install\helper\iohandler\ajax_iohandler parent: installer.helper.iohandler_abstract arguments: + - @path_helper - @request - @template + - @router installer.helper.iohandler_cli: class: phpbb\install\helper\iohandler\cli_iohandler @@ -52,7 +59,9 @@ services: installer.helper.container_factory: class: phpbb\install\helper\container_factory arguments: + - @language - @request + - @installer.helper.update_helper - %core.root_path% - %core.php_ext% @@ -62,6 +71,11 @@ services: - %core.root_path% - %core.php_ext% + installer.helper.update_helper: + class: phpbb\install\helper\update_helper + arguments: + - %core.root_path% + # -------- Installer -------------------------------- installer.module_base: abstract: true @@ -73,6 +87,7 @@ services: abstract: true arguments: - @installer.helper.config + - @path_helper installer.install.module_collection: class: phpbb\di\ordered_service_collection @@ -81,7 +96,19 @@ services: tags: - { name: service_collection, tag: installer_install_module } + installer.update.module_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: installer_update_module } + installer.installer.install: parent: installer.installer.abstract calls: - [set_modules, [@installer.install.module_collection]] + + installer.installer.update: + parent: installer.installer.abstract + calls: + - [set_modules, [@installer.update.module_collection]] diff --git a/phpBB/config/installer/container/services_update_database.yml b/phpBB/config/installer/container/services_update_database.yml new file mode 100644 index 0000000000..85f943f928 --- /dev/null +++ b/phpBB/config/installer/container/services_update_database.yml @@ -0,0 +1,29 @@ +services: + installer.update_database.update_task: + class: phpbb\install\module\update_database\task\update + arguments: + - @installer.helper.container_factory + - @filesystem + - @installer.helper.config + - @installer.helper.iohandler + - @language + - %core.root_path% + tags: + - { name: update_database_task, order: 10 } + + installer.module.update_database_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: update_database_task, class_name_aware: true } + + installer.module.update_database: + class: phpbb\install\module\update_database\module + parent: installer.module_base + arguments: + - @installer.module.update_database_collection + - true + - false + tags: + - { name: installer_update_module, order: 40 } diff --git a/phpBB/config/installer/container/services_update_filesystem.yml b/phpBB/config/installer/container/services_update_filesystem.yml new file mode 100644 index 0000000000..2882df4294 --- /dev/null +++ b/phpBB/config/installer/container/services_update_filesystem.yml @@ -0,0 +1,72 @@ +services: + installer.update_filesystem.check_task: + class: phpbb\install\module\update_filesystem\task\file_check + arguments: + - @filesystem + - @installer.helper.config + - @installer.helper.iohandler + - @installer.helper.update_helper + - %core.root_path% + tags: + - { name: update_filesystem, order: 10 } + + installer.update_filesystem.diff_files: + class: phpbb\install\module\update_filesystem\task\diff_files + arguments: + - @installer.helper.container_factory + - @installer.helper.config + - @installer.helper.iohandler + - @installer.helper.update_helper + - %core.root_path% + - %core.php_ext% + tags: + - { name: update_filesystem, order: 20 } + + installer.update_filesystem.show_file_status: + class: phpbb\install\module\update_filesystem\task\show_file_status + arguments: + - @installer.helper.container_factory + - @installer.helper.config + - @installer.helper.iohandler + - @filesystem + - @installer.file_updater.factory + tags: + - { name: update_filesystem, order: 30 } + + installer.update_filesystem.update_files: + class: phpbb\install\module\update_filesystem\task\update_files + arguments: + - @installer.helper.container_factory + - @installer.helper.config + - @installer.helper.iohandler + - @installer.file_updater.factory + - @installer.helper.update_helper + - %core.root_path% + tags: + - { name: update_filesystem, order: 40 } + + installer.update_filesystem.download_updated_files: + class: phpbb\install\module\update_filesystem\task\download_updated_files + arguments: + - @installer.helper.config + - @installer.helper.iohandler + - @filesystem + tags: + - { name: update_filesystem, order: 50 } + + installer.module.update_filesystem_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: update_filesystem, class_name_aware: true } + + installer.module.filesystem_update: + class: phpbb\install\module\update_filesystem\module + parent: installer.module_base + arguments: + - @installer.module.update_filesystem_collection + - true + - false + tags: + - { name: installer_update_module, order: 30 } diff --git a/phpBB/config/installer/container/services_update_obtain_data.yml b/phpBB/config/installer/container/services_update_obtain_data.yml new file mode 100644 index 0000000000..fe0d3bc43f --- /dev/null +++ b/phpBB/config/installer/container/services_update_obtain_data.yml @@ -0,0 +1,53 @@ +services: + installer.obtain_data.update_options: + class: phpbb\install\module\obtain_data\task\obtain_update_settings + arguments: + - @installer.helper.config + - @installer.helper.iohandler + tags: + - { name: update_obtain_data, order: 10 } + + installer.obtain_data.file_updater_method: + class: phpbb\install\module\obtain_data\task\obtain_file_updater_method + arguments: + - @installer.helper.config + - @installer.helper.iohandler + tags: + - { name: update_obtain_data, order: 20 } + + installer.obtain_data.update_files: + class: phpbb\install\module\obtain_data\task\obtain_update_files + arguments: + - @installer.helper.config + - @installer.helper.iohandler + - %core.root_path% + - %core.php_ext% + tags: + - { name: update_obtain_data, order: 30 } + + installer.obtain_data.update_ftp_settings: + class: phpbb\install\module\obtain_data\task\obtain_update_ftp_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + - @installer.helper.update_helper + - %core.php_ext% + tags: + - { name: update_obtain_data, order: 40 } + + installer.module.update_obtain_data_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: update_obtain_data, class_name_aware: true } + + installer.module.obtain_data_update: + class: phpbb\install\module\obtain_data\update_module + parent: installer.module_base + arguments: + - @installer.module.update_obtain_data_collection + - true + - false + tags: + - { name: installer_update_module, order: 20 } diff --git a/phpBB/config/installer/container/services_update_requirements.yml b/phpBB/config/installer/container/services_update_requirements.yml new file mode 100644 index 0000000000..ebb1bea409 --- /dev/null +++ b/phpBB/config/installer/container/services_update_requirements.yml @@ -0,0 +1,40 @@ +services: + installer.requirements.check_filesystem_update: + class: phpbb\install\module\requirements\task\check_filesystem + arguments: + - @filesystem + - @installer.helper.iohandler + - %core.root_path% + - %core.php_ext% + - false + tags: + - { name: update_requirements, order: 10 } + + installer.requirements.update_requirements: + class: phpbb\install\module\requirements\task\check_update + arguments: + - @installer.helper.container_factory + - @filesystem + - @installer.helper.iohandler + - @installer.helper.update_helper + - %core.root_path% + - %core.php_ext% + tags: + - { name: update_requirements, order: 30 } + + installer.module.update_requirements_collection: + class: phpbb\di\ordered_service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: update_requirements, class_name_aware: true } + + installer.module.requirements_update: + class: phpbb\install\module\requirements\update_module + parent: installer.module_base + arguments: + - @installer.module.update_requirements_collection + - true + - false + tags: + - { name: installer_update_module, order: 10 } diff --git a/phpBB/config/installer/routing/installer.yml b/phpBB/config/installer/routing/installer.yml index 80a995ab6e..49e103dd7d 100644 --- a/phpBB/config/installer/routing/installer.yml +++ b/phpBB/config/installer/routing/installer.yml @@ -20,3 +20,18 @@ phpbb_installer_install: path: /install defaults: _controller: phpbb.installer.controller.install:handle + +phpbb_installer_update: + path: /update + defaults: + _controller: phpbb.installer.controller.update:handle + +phpbb_installer_update_file_download: + path: /download/updated + defaults: + _controller: phpbb.installer.controller.file_downloader:update_archive + +phpbb_installer_update_conflict_download: + path: /download/conflict + defaults: + _controller: phpbb.installer.controller.file_downloader:conflict_archive |