From 6247a091de631ec56c71ab9b52b8a69687422ed6 Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Fri, 10 Apr 2026 18:06:40 +0200 Subject: [PATCH 1/4] feat!: require PHP 8.5 as minimum version Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/code-style.yml | 4 ++-- .github/workflows/unit-tests.yml | 4 ++-- .tools/constants.php | 2 +- addons/debug/composer.json | 2 +- addons/test/composer.json | 2 +- boot/core.php | 2 +- composer.json | 7 ++++--- phpstan.dist.neon | 2 +- rector.php | 2 +- setup/update.php | 4 ++-- 10 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index ebb0b16b37..f8ab270c32 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -56,7 +56,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: - php-version: '8.4' + php-version: '8.5' coverage: none # disable xdebug, pcov tools: cs2pr @@ -101,7 +101,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: - php-version: '8.4' + php-version: '8.5' coverage: none # disable xdebug, pcov - name: Composer install diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index cd19440dc2..20c18257f0 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: include: - - php-version: '8.4' + - php-version: '8.5' db-image: 'mysql:8.0' composer-flags: '--prefer-lowest' - php-version: '8.5' @@ -31,7 +31,7 @@ jobs: - php-version: '8.6' db-image: 'mysql:latest' composer-flags: '--ignore-platform-req=php' - - php-version: '8.4' + - php-version: '8.5' db-image: 'mariadb:10.4' - php-version: '8.5' db-image: 'mariadb:latest' diff --git a/.tools/constants.php b/.tools/constants.php index 4445392721..b9fb532c0a 100644 --- a/.tools/constants.php +++ b/.tools/constants.php @@ -3,4 +3,4 @@ // For static analysis we do not boot redaxo. // But to avoid errors about non-existing constants (usually defined while booting redaxo), we define them here. -define('REX_MIN_PHP_VERSION', '8.4'); +define('REX_MIN_PHP_VERSION', '8.5'); diff --git a/addons/debug/composer.json b/addons/debug/composer.json index 19f3362d40..90ef70356a 100644 --- a/addons/debug/composer.json +++ b/addons/debug/composer.json @@ -17,7 +17,7 @@ ], "require": { - "php": "^8.4", + "php": "^8.5", "ext-zip": "*", "redaxo/core": "@dev", "itsgoingd/clockwork": "^5.3.5" diff --git a/addons/test/composer.json b/addons/test/composer.json index 9551ddb4dd..8ea89e90bb 100644 --- a/addons/test/composer.json +++ b/addons/test/composer.json @@ -17,7 +17,7 @@ ], "require": { - "php": "^8.4", + "php": "^8.5", "redaxo/core": "@dev" } } diff --git a/boot/core.php b/boot/core.php index ba21db9799..cace5a6813 100644 --- a/boot/core.php +++ b/boot/core.php @@ -40,7 +40,7 @@ * URL_PROVIDER [Required] Url provider */ -define('REX_MIN_PHP_VERSION', '8.4'); +define('REX_MIN_PHP_VERSION', '8.5'); if (version_compare(PHP_VERSION, REX_MIN_PHP_VERSION) < 0) { echo 'Ooops, something went wrong!
'; diff --git a/composer.json b/composer.json index 249bf3027d..84809d1145 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { - "php": "^8.4", + "php": "^8.5", "ext-ctype": "*", "ext-gd": "*", "ext-iconv": "*", @@ -75,7 +75,8 @@ "symfony/polyfill-php81": "*", "symfony/polyfill-php82": "*", "symfony/polyfill-php83": "*", - "symfony/polyfill-php84": "*" + "symfony/polyfill-php84": "*", + "symfony/polyfill-php85": "*" }, "conflict": { @@ -183,7 +184,7 @@ "config": { "platform": { - "php": "8.4.5" + "php": "8.5.4" }, "sort-packages": true, "allow-plugins": { diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 6f3d9392dd..22f78fb941 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -4,7 +4,7 @@ includes: parameters: level: 6 - phpVersion: 80400 # PHP 8.4 + phpVersion: 80500 # PHP 8.5 treatPhpDocTypesAsCertain: false editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' featureToggles: diff --git a/rector.php b/rector.php index cb86b29d5b..a92430dac2 100644 --- a/rector.php +++ b/rector.php @@ -89,7 +89,7 @@ 'tests/', ]) ->withParallel() - ->withPhpVersion(PhpVersion::PHP_84) + ->withPhpVersion(PhpVersion::PHP_85) ->withPreparedSets(typeDeclarations: false, privatization: true) // ->withPhpSets() ->withImportNames() diff --git a/setup/update.php b/setup/update.php index 7fe0d3cf6f..801f083223 100644 --- a/setup/update.php +++ b/setup/update.php @@ -17,8 +17,8 @@ throw new UserMessageException(sprintf('The REDAXO version "%s" is too old for this update, please update to 5.16 before.', escape(Core::getVersion()))); } -if (PHP_VERSION_ID < 80400) { - throw new UserMessageException(I18n::msg('setup_201', PHP_VERSION, '8.4')); +if (PHP_VERSION_ID < 80500) { + throw new UserMessageException(I18n::msg('setup_201', PHP_VERSION, '8.5')); } $minExtensions = ['ctype', 'fileinfo', 'filter', 'iconv', 'intl', 'mbstring', 'pcre', 'pdo', 'pdo_mysql', 'session', 'tokenizer']; From e1379df38241dff928cbab85bb9bf18d06ef4c45 Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Fri, 10 Apr 2026 18:15:23 +0200 Subject: [PATCH 2/4] remove imagedestroy --- src/MediaManager/Effect/FilterSharpenEffect.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MediaManager/Effect/FilterSharpenEffect.php b/src/MediaManager/Effect/FilterSharpenEffect.php index 4714ea9361..91885d189d 100644 --- a/src/MediaManager/Effect/FilterSharpenEffect.php +++ b/src/MediaManager/Effect/FilterSharpenEffect.php @@ -160,8 +160,7 @@ public function execute() } } } - imagedestroy($imgCanvas); - imagedestroy($imgBlur); + $this->media->setImage($gdimage); } From 20676ab5a6f1aafd678a97c520930bd83c53e6ea Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Sun, 12 Apr 2026 18:21:23 +0200 Subject: [PATCH 3/4] test --- .github/workflows/static-analysis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index e37d08a1c0..ff9efb4c58 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -73,6 +73,7 @@ jobs: - name: Check psalm baseline and show type coverage id: baseline run: | + php -i vendor/bin/psalm --set-baseline=.tools/psalm/baseline.xml --stats git diff --exit-code .tools/psalm/baseline.xml || (echo "::error file=.tools/psalm/baseline.xml,line=1,col=1::Psalm baseline file is outdated and must be regenerated via \`composer psalm:baseline\`." && exit 1) From 3eb6441835e212ecc1bae73894849a04d0eeabcd Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Sun, 12 Apr 2026 18:22:41 +0200 Subject: [PATCH 4/4] test --- .github/workflows/static-analysis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index ff9efb4c58..fa8a6a511d 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -68,12 +68,13 @@ jobs: - name: Run psalm analysis if: github.event_name != 'repository_dispatch' - run: vendor/bin/psalm --show-info=false --shepherd --diff --output-format=github + run: | + php -i + vendor/bin/psalm --show-info=false --shepherd --diff --output-format=github - name: Check psalm baseline and show type coverage id: baseline run: | - php -i vendor/bin/psalm --set-baseline=.tools/psalm/baseline.xml --stats git diff --exit-code .tools/psalm/baseline.xml || (echo "::error file=.tools/psalm/baseline.xml,line=1,col=1::Psalm baseline file is outdated and must be regenerated via \`composer psalm:baseline\`." && exit 1)