Pārlūkot izejas kodu

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
Alexandre Alapetite 2 gadi atpakaļ
vecāks
revīzija
52f6c8399b
3 mainītis faili ar 14 papildinājumiem un 7 dzēšanām
  1. 8 5
      composer.json
  2. 5 2
      composer.lock
  3. 1 0
      phpstan.neon

+ 8 - 5
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
-        }
     }
 }

+ 5 - 2
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"
 }

+ 1 - 0
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