mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Lint: Disallow usage of deprecated functions (#13267)
This commit is contained in:
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@@ -81,6 +81,10 @@ jobs:
|
||||
name: Composer install
|
||||
run: composer install --prefer-dist --no-interaction --no-progress
|
||||
|
||||
-
|
||||
name: Run PHPStan (Deprecated functions)
|
||||
run: ./vendor/bin/phpstan analyze --no-interaction --no-progress --error-format=github --memory-limit=4G --configuration=phpstan-deprecated.neon
|
||||
|
||||
-
|
||||
name: Run PHPStan
|
||||
run: ./vendor/bin/phpstan analyze --no-interaction --no-progress --error-format=github --memory-limit=4G
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"php-parallel-lint/php-parallel-lint": "^1.1",
|
||||
"phpstan/phpstan-mockery": "^0.12.13",
|
||||
"phpunit/phpunit": "^9.3.3",
|
||||
"spaze/phpstan-disallowed-calls": "^1.9",
|
||||
"staudenmeir/dusk-updater": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
|
||||
58
composer.lock
generated
58
composer.lock
generated
@@ -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": "7971c0ef0ed8ea90a3df66dbd8f05295",
|
||||
"content-hash": "9ab00e7f7d4af766342b38b9019f7fe7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amenadiel/jpgraph",
|
||||
@@ -11008,6 +11008,62 @@
|
||||
},
|
||||
"time": "2020-07-07T18:42:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spaze/phpstan-disallowed-calls",
|
||||
"version": "v1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spaze/phpstan-disallowed-calls.git",
|
||||
"reference": "2f5402fd88a2a7345a5cca28e98b84f559cdc0f2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spaze/phpstan-disallowed-calls/zipball/2f5402fd88a2a7345a5cca28e98b84f559cdc0f2",
|
||||
"reference": "2f5402fd88a2a7345a5cca28e98b84f559cdc0f2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0",
|
||||
"phpstan/phpstan": "^0.12"
|
||||
},
|
||||
"require-dev": {
|
||||
"nette/neon": "^3.2",
|
||||
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.2",
|
||||
"phpunit/phpunit": "^7.0 || ^9.4.2",
|
||||
"spaze/coding-standard": "^0.0"
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"extension.neon"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Spaze\\PHPStan\\Rules\\Disallowed\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michal Špaček",
|
||||
"email": "mail@michalspacek.cz",
|
||||
"homepage": "https://www.michalspacek.cz"
|
||||
}
|
||||
],
|
||||
"description": "Disallowed method and function calls plug-in for PHPStan",
|
||||
"support": {
|
||||
"issues": "https://github.com/spaze/phpstan-disallowed-calls/issues",
|
||||
"source": "https://github.com/spaze/phpstan-disallowed-calls/tree/v1.9.0"
|
||||
},
|
||||
"time": "2021-08-18T22:45:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "staudenmeir/dusk-updater",
|
||||
"version": "v1.2.2",
|
||||
|
||||
3837
phpstan-baseline-deprecated.neon
Normal file
3837
phpstan-baseline-deprecated.neon
Normal file
File diff suppressed because it is too large
Load Diff
31
phpstan-deprecated.neon
Normal file
31
phpstan-deprecated.neon
Normal file
@@ -0,0 +1,31 @@
|
||||
includes:
|
||||
- phpstan-baseline-deprecated.neon
|
||||
- vendor/spaze/phpstan-disallowed-calls/extension.neon
|
||||
|
||||
parameters:
|
||||
|
||||
customRulesetUsed: true
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
|
||||
paths:
|
||||
- LibreNMS
|
||||
- bootstrap
|
||||
- cache
|
||||
- html
|
||||
- storage
|
||||
- app
|
||||
- config
|
||||
- database
|
||||
- doc
|
||||
- includes
|
||||
- licenses
|
||||
- misc
|
||||
- resources
|
||||
- routes
|
||||
- sql-schema
|
||||
- tests
|
||||
|
||||
disallowedFunctionCalls:
|
||||
-
|
||||
function: 'db*()'
|
||||
message: 'use Eloquent instead; https://laravel.com/docs/8.x/eloquent'
|
||||
Reference in New Issue
Block a user