Skip to content

Commit 7061745

Browse files
committed
support redaxo 5.15.0-dev
1 parent ba64ad7 commit 7061745

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

config/_from-r5_15.neon

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# config settings required starting with redaxo 5.15.+
2+
3+
parameters:
4+
phpVersion: 80100 # PHP 8.1

config/_up-to-r5_14.neon

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# config settings required up to redaxo 5.14.*
2+
3+
parameters:
4+
scanFiles:
5+
- ../../core/vendor/symfony/polyfill-php80/bootstrap.php
6+
- ../../core/vendor/symfony/polyfill-php81/bootstrap.php
7+
8+
phpVersion: 70300 # PHP 7.3

default-config.neon

-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ parameters:
3535
# autoload core symbols which are not autoloadable
3636
scanDirectories:
3737
- ../../core/functions/
38-
scanFiles:
39-
- ../../core/vendor/symfony/polyfill-php80/bootstrap.php
40-
- ../../core/vendor/symfony/polyfill-php81/bootstrap.php
4138

42-
phpVersion: 70300 # PHP 7.3
4339
treatPhpDocTypesAsCertain: false
4440

4541
bootstrapFiles:

install.php

+13-4
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,20 @@
5252

5353
RexStanUserConfig::save(0, $paths, [], 70300);
5454
}
55+
if (rex_version::compare(rex::getVersion(), '5.15.0-dev', '>=')) {
56+
$configFileContent = '# rexstan auto generated file - do not edit, delete, rename'. PHP_EOL . PHP_EOL .
57+
'includes:'. PHP_EOL .
58+
' - ' . $addon->getPath('default-config.neon') . PHP_EOL .
59+
' - ' . $addon->getPath('config/_from-r5_15.neon') . PHP_EOL .
60+
' - ' . $userConfigPath. PHP_EOL;
61+
} else {
62+
$configFileContent = '# rexstan auto generated file - do not edit, delete, rename'. PHP_EOL . PHP_EOL .
63+
'includes:'. PHP_EOL .
64+
' - ' . $addon->getPath('default-config.neon') . PHP_EOL .
65+
' - ' . $addon->getPath('config/_up-to-r5_14.neon') . PHP_EOL .
66+
' - ' . $userConfigPath. PHP_EOL;
67+
}
5568

56-
$configFileContent = '# rexstan auto generated file - do not edit, delete, rename'. PHP_EOL . PHP_EOL .
57-
'includes:'. PHP_EOL .
58-
' - ' . $addon->getPath('default-config.neon') . PHP_EOL .
59-
' - ' . $userConfigPath. PHP_EOL;
6069
$configPath = __DIR__.'/phpstan.neon';
6170
if (false === rex_file::put($configPath, $configFileContent)) {
6271
$addon->setProperty('installmsg', sprintf('Unable to write rexstan config "%s"', $configPath));

0 commit comments

Comments
 (0)