mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14039] Revamp updater
PHPBB3-14039
This commit is contained in:
@@ -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 }
|
||||
|
@@ -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
|
||||
|
@@ -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 }
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
services:
|
||||
filesystem:
|
||||
class: phpbb\filesystem\filesystem
|
||||
|
||||
files.factory:
|
||||
class: phpbb\files\factory
|
||||
arguments:
|
||||
|
3
phpBB/config/default/container/services_filesystem.yml
Normal file
3
phpBB/config/default/container/services_filesystem.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
services:
|
||||
filesystem:
|
||||
class: phpbb\filesystem\filesystem
|
7
phpBB/config/default/container/services_hook.yml
Normal file
7
phpBB/config/default/container/services_hook.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
hook_finder:
|
||||
class: phpbb\hook\finder
|
||||
arguments:
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- @cache.driver
|
@@ -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
|
||||
|
@@ -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
|
||||
|
38
phpBB/config/installer/container/services_file_updater.yml
Normal file
38
phpBB/config/installer/container/services_file_updater.yml
Normal file
@@ -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 }
|
@@ -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
|
||||
|
@@ -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 }
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
@@ -62,6 +69,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
|
||||
@@ -81,7 +93,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]]
|
||||
|
@@ -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 }
|
@@ -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 }
|
@@ -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 }
|
@@ -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 }
|
@@ -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
|
||||
|
Reference in New Issue
Block a user