Просмотр исходного кода

Composer require php extensions (#4497)

#fix https://github.com/FreshRSS/FreshRSS/discussions/4494
Alexandre Alapetite 3 лет назад
Родитель
Сommit
e86c10e2f5
4 измененных файлов с 59 добавлено и 11 удалено
  1. 27 1
      composer.json
  2. 30 9
      composer.lock
  3. 1 1
      docs/en/developers/02_First_steps.md
  4. 1 0
      p/ext.php

+ 27 - 1
composer.json

@@ -17,10 +17,36 @@
         "WebSub"
     ],
     "require": {
-        "php": ">=7.0"
+        "php": ">=7.0",
+        "ext-ctype": "*",
+        "ext-curl": "*",
+        "ext-dom": "*",
+        "ext-fileinfo": "*",
+        "ext-gmp": "*",
+        "ext-intl": "*",
+        "ext-json": "*",
+        "ext-mbstring": "*",
+        "ext-openssl": "*",
+        "ext-pcre": "*",
+        "ext-pdo_sqlite": "*",
+        "ext-session": "*",
+        "ext-simplexml": "*",
+        "ext-xml": "*",
+        "ext-xmlreader": "*",
+        "ext-zend-opcache": "*",
+        "ext-zip": "*",
+        "ext-zlib": "*"
+    },
+    "suggest": {
+        "ext-iconv": "*",
+        "ext-pdo_mysql": "*",
+        "ext-pdo_pgsql": "*"
     },
     "require-dev": {
         "php": ">=8.0",
+        "ext-phar": "*",
+        "ext-tokenizer": "*",
+        "ext-xmlwriter": "*",
         "phpstan/phpstan": "~1.7.14",
         "phpunit/phpunit": "^9",
         "squizlabs/php_codesniffer": "^3.7"

+ 30 - 9
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": "a51faa9a0e83f4566bf5f07e33483e6a",
+    "content-hash": "b52a52e72b9449a7d252d92ccc62c826",
     "packages": [],
     "packages-dev": [
         {
@@ -532,16 +532,16 @@
         },
         {
             "name": "phpstan/phpstan",
-            "version": "1.7.14",
+            "version": "1.7.15",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan.git",
-                "reference": "e6f145f196a59c7ca91ea926c87ef3d936c4305f"
+                "reference": "cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e6f145f196a59c7ca91ea926c87ef3d936c4305f",
-                "reference": "e6f145f196a59c7ca91ea926c87ef3d936c4305f",
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a",
+                "reference": "cd0202ea1b1fc6d1bbe156c6e2e18a03e0ff160a",
                 "shasum": ""
             },
             "require": {
@@ -567,7 +567,7 @@
             "description": "PHPStan - PHP Static Analysis Tool",
             "support": {
                 "issues": "https://github.com/phpstan/phpstan/issues",
-                "source": "https://github.com/phpstan/phpstan/tree/1.7.14"
+                "source": "https://github.com/phpstan/phpstan/tree/1.7.15"
             },
             "funding": [
                 {
@@ -587,7 +587,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-06-14T13:09:35+00:00"
+            "time": "2022-06-20T08:29:01+00:00"
         },
         {
             "name": "phpunit/php-code-coverage",
@@ -2144,10 +2144,31 @@
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
-        "php": ">=7.0"
+        "php": ">=7.0",
+        "ext-ctype": "*",
+        "ext-curl": "*",
+        "ext-dom": "*",
+        "ext-fileinfo": "*",
+        "ext-gmp": "*",
+        "ext-intl": "*",
+        "ext-json": "*",
+        "ext-mbstring": "*",
+        "ext-openssl": "*",
+        "ext-pcre": "*",
+        "ext-pdo_sqlite": "*",
+        "ext-session": "*",
+        "ext-simplexml": "*",
+        "ext-xml": "*",
+        "ext-xmlreader": "*",
+        "ext-zend-opcache": "*",
+        "ext-zip": "*",
+        "ext-zlib": "*"
     },
     "platform-dev": {
-        "php": ">=8.0"
+        "php": ">=8.0",
+        "ext-phar": "*",
+        "ext-tokenizer": "*",
+        "ext-xmlwriter": "*"
     },
     "plugin-api-version": "2.2.0"
 }

+ 1 - 1
docs/en/developers/02_First_steps.md

@@ -104,7 +104,7 @@ yum install -y git make npm php-cli php-curl php-mbstring php-xml php-pdo unzip
 ### Alpine Linux
 
 ```sh
-apk add git make npm php-cli php-curl php-ctype php-dom php-mbstring php-openssl php-phar php-simplexml php-xml php-pdo php-tokenizer php-xmlwriter unzip wget
+apk add git make npm php-cli php-curl php-ctype php-dom php-mbstring php-openssl php-phar php-simplexml php-xml php-pdo php-tokenizer php-xmlreader php-xmlwriter unzip wget
 ```
 
 ### Partial fixes & tests

+ 1 - 0
p/ext.php

@@ -60,6 +60,7 @@ function is_valid_path_extension($path, $extensionPath, $isStatic = true) {
 
 	// Static files to serve must be under a `ext_dir/static/` directory.
 	$path_relative_to_ext = substr($path, strlen($real_ext_path) + 1);
+	// @phpstan-ignore-next-line
 	list(,$static,$file) = sscanf($path_relative_to_ext, '%[^/]/%[^/]/%s');
 	if (null === $file || 'static' !== $static) {
 		return false;