aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2025-02-07 11:28:45 +0000
committerMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2025-02-07 11:28:45 +0000
commitb6fe480a1f11a7fe260c7a3a04c9c0cbfff3ef90 (patch)
treee90d9c8732331fb2cfc2d799a12bb48be4417942
parent3936a9f38c5c566b9bce20b2a11a1513d2f5d8bb (diff)
add zorac/phpstan-php-di to phpstan configuration so that phpstan will not stumble upon seeminly uninitialized properties, re #5214
Merge request studip/studip!3916
-rw-r--r--composer.json3
-rw-r--r--composer.lock64
-rw-r--r--phpstan.neon.dist3
3 files changed, 65 insertions, 5 deletions
diff --git a/composer.json b/composer.json
index ea95764..3d671a9 100644
--- a/composer.json
+++ b/composer.json
@@ -75,7 +75,8 @@
"phpstan/phpstan": "^2.0",
"symfony/var-dumper": "6.4.7",
"maximebf/debugbar": "1.22.3",
- "codeception/specify": "^2.0"
+ "codeception/specify": "^2.0",
+ "zorac/phpstan-php-di": "^1.0"
},
"require": {
"php": "^8.1",
diff --git a/composer.lock b/composer.lock
index d889e8f..059497a 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": "3a2daa57e8228dca24a4ab68a05bb5a3",
+ "content-hash": "2d334aeeaac9b0c0745b0936f7f82913",
"packages": [
{
"name": "algo26-matthias/idna-convert",
@@ -9619,6 +9619,61 @@
"source": "https://github.com/woohoolabs/yang"
},
"time": "2023-09-06T09:39:12+00:00"
+ },
+ {
+ "name": "zorac/phpstan-php-di",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zorac/phpstan-php-di.git",
+ "reference": "9718748382f1f1817ef34c331b4f42df3092d1fa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zorac/phpstan-php-di/zipball/9718748382f1f1817ef34c331b4f42df3092d1fa",
+ "reference": "9718748382f1f1817ef34c331b4f42df3092d1fa",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.0",
+ "php-di/php-di": "^7.0",
+ "phpstan/phpstan": "^1.10|^2.0"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zorac\\PhpStanPhpDI\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mark Rigby-Jones",
+ "email": "mark@rigby-jones.net",
+ "homepage": "https://mark.rigby-jones.net/"
+ }
+ ],
+ "description": "Extansion adding support for PHP-DI to PHPStan.",
+ "homepage": "https://www.github.com/zorac/phpstan-php-di/",
+ "keywords": [
+ "PHPStan",
+ "php-di"
+ ],
+ "support": {
+ "issues": "https://github.com/zorac/phpstan-php-di/issues",
+ "source": "https://github.com/zorac/phpstan-php-di/tree/1.0.1"
+ },
+ "time": "2024-12-24T11:33:19+00:00"
}
],
"aliases": [],
@@ -9641,11 +9696,12 @@
"ext-pdo": "*",
"ext-mbstring": "*",
"ext-dom": "*",
- "ext-iconv": "*"
+ "ext-iconv": "*",
+ "ext-simplexml": "*"
},
- "platform-dev": [],
+ "platform-dev": {},
"platform-overrides": {
"php": "8.1"
},
- "plugin-api-version": "2.3.0"
+ "plugin-api-version": "2.6.0"
}
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index 4576401..f95ee2d 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -20,3 +20,6 @@ parameters:
-
message: '#Unsafe usage of new static\(\)\.#'
path: lib/classes/SimpleORMap.php
+
+includes:
+ - ./composer/zorac/phpstan-php-di/extension.neon