Issue #3178534 by mondrake, klausi, alexpott, longwave, mallezie, Taran2L, mglaman, Spokje, kim.pepper, daffie, andypost, neclimdul, xjm, Gábor Hojtsy, cmlara: Start running PHPStan on Drupal core (level 0)
2022-01-18 09:34:31 +00:00
|
|
|
# Configuration file for PHPStan static code checking, see https://phpstan.org .
|
|
|
|
# PHPStan is triggered on Drupal CI in commit-code-check.sh.
|
|
|
|
includes:
|
|
|
|
- phpstan-baseline.neon
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
|
2022-11-07 12:38:24 +00:00
|
|
|
level: 1
|
Issue #3178534 by mondrake, klausi, alexpott, longwave, mallezie, Taran2L, mglaman, Spokje, kim.pepper, daffie, andypost, neclimdul, xjm, Gábor Hojtsy, cmlara: Start running PHPStan on Drupal core (level 0)
2022-01-18 09:34:31 +00:00
|
|
|
|
|
|
|
paths:
|
|
|
|
- .
|
|
|
|
- ../composer
|
|
|
|
|
|
|
|
excludePaths:
|
2022-11-21 14:57:42 +00:00
|
|
|
# Skip sites directory.
|
|
|
|
- ../sites
|
Issue #3178534 by mondrake, klausi, alexpott, longwave, mallezie, Taran2L, mglaman, Spokje, kim.pepper, daffie, andypost, neclimdul, xjm, Gábor Hojtsy, cmlara: Start running PHPStan on Drupal core (level 0)
2022-01-18 09:34:31 +00:00
|
|
|
# Skip test fixtures.
|
2022-04-08 10:10:20 +00:00
|
|
|
- ../*/node_modules/*
|
Issue #3178534 by mondrake, klausi, alexpott, longwave, mallezie, Taran2L, mglaman, Spokje, kim.pepper, daffie, andypost, neclimdul, xjm, Gábor Hojtsy, cmlara: Start running PHPStan on Drupal core (level 0)
2022-01-18 09:34:31 +00:00
|
|
|
- */tests/fixtures/*.php
|
2022-01-31 14:45:01 +00:00
|
|
|
- */tests/fixtures/*.php.gz
|
Issue #3112283 by ravi.shankar, mpdonadio, andregp, daffie, jhedstrom, alexpott, andypost, pifagor, vladbo, JeroenT, voleger, cliddell: Replace REQUEST_TIME in non-OO and non-module code
2022-05-16 16:27:01 +00:00
|
|
|
# Skip Drupal 6 & 7 code.
|
|
|
|
- core/scripts/generate-d6-content.sh
|
|
|
|
- core/scripts/generate-d7-content.sh
|
2022-01-31 23:28:30 +00:00
|
|
|
# Skip data files.
|
|
|
|
- lib/Drupal/Component/Transliteration/data/*.php
|
Issue #3178534 by mondrake, klausi, alexpott, longwave, mallezie, Taran2L, mglaman, Spokje, kim.pepper, daffie, andypost, neclimdul, xjm, Gábor Hojtsy, cmlara: Start running PHPStan on Drupal core (level 0)
2022-01-18 09:34:31 +00:00
|
|
|
# Below extends on purpose a non existing class for testing.
|
|
|
|
- modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/ExtendingNonInstalledClass.php
|
|
|
|
|
|
|
|
ignoreErrors:
|
|
|
|
# new static() is a best practice in Drupal, so we cannot fix that.
|
|
|
|
- "#^Unsafe usage of new static#"
|
|
|
|
|
|
|
|
# Ignore common errors for now.
|
|
|
|
- "#Drupal calls should be avoided in classes, use dependency injection instead#"
|
|
|
|
- "#^Plugin definitions cannot be altered.#"
|
|
|
|
- "#^Missing cache backend declaration for performance.#"
|
|
|
|
- "#cache tag might be unclear and does not contain the cache key in it.#"
|
|
|
|
- "#^Class .* extends @internal class#"
|
2022-05-13 12:50:28 +00:00
|
|
|
|
|
|
|
# This check was ignored on purpose until the issues with it, which started in version 1.1.15, are solved.
|
|
|
|
# @see https://www.drupal.org/node/3280328
|
|
|
|
- "#^Missing explicit access check on entity query.#"
|