diff options
author | MateBartus <mate.bartus@gmail.com> | 2015-04-19 00:43:51 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-07-08 01:27:58 +0200 |
commit | 0b74e3b0dea723cf0e5a83dcd910bc29941d1456 (patch) | |
tree | 3cea83aef8dda9bec0a099ef65581a08f1e1da32 /phpBB/config/installer/container | |
parent | 11623dd6718ec12504286db3dfcd042ccb4e3688 (diff) | |
download | forums-0b74e3b0dea723cf0e5a83dcd910bc29941d1456.tar forums-0b74e3b0dea723cf0e5a83dcd910bc29941d1456.tar.gz forums-0b74e3b0dea723cf0e5a83dcd910bc29941d1456.tar.bz2 forums-0b74e3b0dea723cf0e5a83dcd910bc29941d1456.tar.xz forums-0b74e3b0dea723cf0e5a83dcd910bc29941d1456.zip |
[ticket/13740] Installer's install tasks and modules
[ci skip]
PHPBB3-13740
Diffstat (limited to 'phpBB/config/installer/container')
12 files changed, 363 insertions, 0 deletions
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..8296bcc079 --- /dev/null +++ b/phpBB/config/installer/container/services.yml @@ -0,0 +1,70 @@ +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 + - [] 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..5eea133590 --- /dev/null +++ b/phpBB/config/installer/container/services_install_controller.yml @@ -0,0 +1,29 @@ +services: + phpbb.installer.controller.welcome: + class: phpbb\install\controller\install_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 + - @symfony_request + - @router + - %core.root_path% + + phpbb.installer.controller.install: + class: phpbb\install\controller\install + arguments: + - @phpbb.installer.controller.helper + - @installer.helper.iohandler_factory + - @template + - @request + - @installer.installer.install 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..5e01be2bce --- /dev/null +++ b/phpBB/config/installer/container/services_install_data.yml @@ -0,0 +1,29 @@ +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% + + 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 + + installer.install_data.add_modules: + class: phpbb\install\module\install_data\task\add_modules + arguments: + - @installer.helper.iohandler + - @installer.helper.container_factory + + installer.module.data_install: + class: phpbb\install\module\install_data\module + parent: installer.module_base + arguments: + - ["installer.install_data.add_languages", "installer.install_data.add_bots", "installer.install_data.add_modules"] 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..865f2d8ab6 --- /dev/null +++ b/phpBB/config/installer/container/services_install_database.yml @@ -0,0 +1,36 @@ +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 + # - @installer.helper.container_factory + - %core.root_path% + - %core.php_ext% + + 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 + + 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% + + installer.module.database_install: + class: phpbb\install\module\install_database\module + parent: installer.module_base + arguments: + - ["installer.install_database.create_schema", "installer.install_database.add_default_data", "installer.install_database.add_config_settings"] 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..24497d330a --- /dev/null +++ b/phpBB/config/installer/container/services_install_filesystem.yml @@ -0,0 +1,16 @@ +services: + installer.filesystem.create_config: + 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% + + installer.module.filesystem_install: + class: phpbb\install\module\install_filesystem\module + parent: installer.module_base + arguments: + - ["installer.filesystem.create_config"] 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..20cd60983b --- /dev/null +++ b/phpBB/config/installer/container/services_install_finish.yml @@ -0,0 +1,20 @@ +services: + installer.finish.populate_migrations: + class: phpbb\install\module\install_finish\task\populate_migrations + arguments: + - @installer.helper.container_factory + + installer.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% + + installer.module.finish_install: + class: phpbb\install\module\install_filesystem\module + parent: installer.module_base + arguments: + - ["installer.finish.populate_migrations", "installer.finish.notify_user"] 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..88c495825b --- /dev/null +++ b/phpBB/config/installer/container/services_install_navigation.yml @@ -0,0 +1,25 @@ +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 + 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..2800392c58 --- /dev/null +++ b/phpBB/config/installer/container/services_install_obtain_data.yml @@ -0,0 +1,43 @@ +services: + installer.obtain_data.admin: + class: phpbb\install\module\obtain_data\task\obtain_admin_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + + installer.obtain_data.board: + class: phpbb\install\module\obtain_data\task\obtain_board_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + - @language.helper.language_file + + installer.obtain_data.database: + class: phpbb\install\module\obtain_data\task\obtain_database_data + arguments: + - @installer.helper.database + - @installer.helper.config + - @installer.helper.iohandler + + installer.obtain_data.email: + class: phpbb\install\module\obtain_data\task\obtain_email_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + + installer.obtain_data.imagick: + class: phpbb\install\module\obtain_data\task\obtain_imagick_path + arguments: + - @installer.helper.config + + installer.obtain_data.server: + class: phpbb\install\module\obtain_data\task\obtain_server_data + arguments: + - @installer.helper.config + - @installer.helper.iohandler + + installer.module.obtain_data_install: + class: phpbb\install\module\obtain_data\module + parent: installer.module_base + arguments: + - ["installer.obtain_data.admin", "installer.obtain_data.database", "installer.obtain_data.server", "installer.obtain_data.email", "installer.obtain_data.board", "installer.obtain_data.imagick"] 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..afbe341c06 --- /dev/null +++ b/phpBB/config/installer/container/services_install_requirements.yml @@ -0,0 +1,20 @@ +services: + installer.requirements.task.filesystem: + class: phpbb\install\module\requirements\task\check_filesystem + arguments: + - @filesystem + - @installer.helper.iohandler + - %core.root_path% + - %core.php_ext% + + installer.requirements.task.server: + class: phpbb\install\module\requirements\task\check_server_environment + arguments: + - @installer.helper.database + - @installer.helper.iohandler + + installer.module.requirements_install: + class: phpbb\install\module\requirements\module + parent: installer.module_base + arguments: + - ["installer.requirements.task.filesystem", "installer.requirements.task.server"] diff --git a/phpBB/config/installer/container/services_installer.yml b/phpBB/config/installer/container/services_installer.yml new file mode 100644 index 0000000000..ce27ae8abd --- /dev/null +++ b/phpBB/config/installer/container/services_installer.yml @@ -0,0 +1,70 @@ +imports: + - { 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: + 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 -------------------------------- + installer.module_base: + abstract: true + calls: + - [setup, [@service_container, @installer.helper.config, @installer.helper.iohandler]] + + installer.installer.abstract: + class: phpbb\install\installer + abstract: true + arguments: + - @installer.helper.config + - @service_container + + installer.installer.install: + parent: installer.installer.abstract + calls: + - [set_modules, [["installer.module.requirements_install", "installer.module.obtain_data_install", "installer.module.filesystem_install", "installer.module.database_install", "installer.module.data_install", "installer.module.finish_install"]]] |