From 52f6c8399b41e0c8be49dd56c89f451843189791 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 15 Jan 2024 10:32:30 +0100 Subject: Explicit PHP version for Composer (#6039) * Explicit PHP version for Composer Follow-up of https://github.com/FreshRSS/FreshRSS/pull/6038 Ensure that we do not depend on incompatible libraries like in https://github.com/FreshRSS/FreshRSS/pull/6030 * Explicit version for PHPStan Due to changes in types, we only support PHPStan in PHP 8 mode --- composer.json | 13 ++++++++----- composer.lock | 7 +++++-- phpstan.neon | 1 + 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 89a077032..154d97ac3 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,14 @@ "ext-pdo_mysql": "*", "ext-pdo_pgsql": "*" }, + "config": { + "allow-plugins": { + "phpstan/extension-installer": false + }, + "platform": { + "php": "7.4" + } + }, "require-dev": { "php": ">=7.4", "ext-phar": "*", @@ -76,10 +84,5 @@ "@translations", "@phpcbf" ] - }, - "config": { - "allow-plugins": { - "phpstan/extension-installer": false - } } } diff --git a/composer.lock b/composer.lock index 65fcd29e3..dd66d6753 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "68ad77514e7c3945e8a7c72dc8e69200", + "content-hash": "4d335c3e4437b2f9ff6b0b75bfeaacf4", "packages": [], "packages-dev": [ { @@ -2019,5 +2019,8 @@ "ext-tokenizer": "*", "ext-xmlwriter": "*" }, - "plugin-api-version": "2.6.0" + "platform-overrides": { + "php": "7.4" + }, + "plugin-api-version": "2.3.0" } diff --git a/phpstan.neon b/phpstan.neon index 2335f6ac9..0d9f1861a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,7 @@ parameters: # TODO: Increase rule-level https://phpstan.org/user-guide/rule-levels level: 8 + phpVersion: 80399 # TODO: Remove line when moving composer.json to PHP 8+ fileExtensions: - php - phtml -- cgit v1.2.3