1imports:
2    - { resource: services_file_updater.yml }
3    - { resource: services_install_console.yml }
4    - { resource: services_install_controller.yml }
5    - { resource: services_install_data.yml }
6    - { resource: services_install_database.yml }
7    - { resource: services_install_filesystem.yml }
8    - { resource: services_install_finish.yml }
9    - { resource: services_install_navigation.yml }
10    - { resource: services_install_obtain_data.yml }
11    - { resource: services_install_requirements.yml }
12    - { resource: services_update_database.yml }
13    - { resource: services_update_filesystem.yml }
14    - { resource: services_update_obtain_data.yml }
15    - { resource: services_update_requirements.yml }
16
17services:
18# -------- Installer helpers ------------------------
19    installer.helper.config:
20        class: phpbb\install\helper\config
21        arguments:
22            - '@filesystem'
23            - '@php_ini'
24            - '%core.root_path%'
25
26    installer.helper.database:
27        class: phpbb\install\helper\database
28        arguments:
29            - '@filesystem'
30            - '%core.root_path%'
31
32    installer.helper.iohandler_factory:
33        class: phpbb\install\helper\iohandler\factory
34        arguments:
35            - '@service_container'
36
37    installer.helper.iohandler_abstract:
38        abstract: true
39        calls:
40            - [set_language, ['@language']]
41
42    installer.helper.iohandler_ajax:
43        class: phpbb\install\helper\iohandler\ajax_iohandler
44        parent: installer.helper.iohandler_abstract
45        arguments:
46            - '@path_helper'
47            - '@request'
48            - '@template'
49            - '@router'
50            - '%core.root_path%'
51
52    installer.helper.iohandler_cli:
53        class: phpbb\install\helper\iohandler\cli_iohandler
54        parent: installer.helper.iohandler_abstract
55
56    installer.helper.iohandler:
57        class: phpbb\install\helper\iohandler\iohandler_interface
58        factory: ['@installer.helper.iohandler_factory', get]
59
60    installer.helper.container_factory:
61        class: phpbb\install\helper\container_factory
62        arguments:
63            - '@language'
64            - '@request'
65            - '@installer.helper.update_helper'
66            - '%core.root_path%'
67            - '%core.php_ext%'
68
69    installer.helper.install_helper:
70        class: phpbb\install\helper\install_helper
71        arguments:
72            - '%core.root_path%'
73            - '%core.php_ext%'
74
75    installer.helper.update_helper:
76        class: phpbb\install\helper\update_helper
77        arguments:
78            - '%core.root_path%'
79
80# -------- Installer --------------------------------
81    installer.module_base:
82        abstract: true
83        calls:
84            - [setup, ['@installer.helper.config', '@installer.helper.iohandler']]
85
86    installer.installer.abstract:
87        class: phpbb\install\installer
88        abstract: true
89        arguments:
90            - '@cache.driver'
91            - '@installer.helper.config'
92            - '@path_helper'
93            - '@installer.helper.container_factory'
94
95    installer.install.module_collection:
96        class: phpbb\di\ordered_service_collection
97        arguments:
98            - '@service_container'
99        tags:
100            - { name: service_collection, tag: installer_install_module }
101
102    installer.update.module_collection:
103        class: phpbb\di\ordered_service_collection
104        arguments:
105            - '@service_container'
106        tags:
107            - { name: service_collection, tag: installer_update_module }
108
109    installer.installer.install:
110        parent: installer.installer.abstract
111        calls:
112            - [set_modules, ['@installer.install.module_collection']]
113            - [set_purge_cache_before, [false]]
114
115    installer.installer.update:
116        parent: installer.installer.abstract
117        calls:
118            - [set_modules, ['@installer.update.module_collection']]
119            - [set_purge_cache_before, [true]]
120