-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathupdate.php
More file actions
25 lines (19 loc) · 837 Bytes
/
update.php
File metadata and controls
25 lines (19 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
declare(strict_types=1);
$addon = rex_addon::get('demo_fullpage');
// copy backup files
rex_dir::copy(
__DIR__ . DIRECTORY_SEPARATOR . 'backups',
rex_addon::get('backup')->getDataPath(),
);
// update config
// merge current config with additional config
// Background information:
// We need the demo to be installed first of all to fetch required packages and import data.
// To make this happen, we need to keep the config free of external dependencies and use an
// additional config which will be merged into the config when the demo is installed.
$config = array_replace_recursive(
rex_file::getConfig(__DIR__ . DIRECTORY_SEPARATOR . 'package.yml'),
rex_file::getConfig(__DIR__ . DIRECTORY_SEPARATOR . 'package.setup.yml'),
);
rex_file::putConfig(__DIR__ . DIRECTORY_SEPARATOR . 'package.yml', $config);