includes: - dev-tools/vendor/phpstan/phpstan/conf/bleedingEdge.neon # Baseline, should only shrink! To regenerate it, just execute `composer phpstan:baseline`. - dev-tools/phpstan/baseline.php parameters: level: 7 paths: - src - tests excludePaths: - tests/Fixtures polluteScopeWithLoopInitialAssignments: true # Do not enforce assignments outside of the loops reportUnmatchedIgnoredErrors: true # Do not allow outdated errors in the baseline reportPossiblyNonexistentGeneralArrayOffset: true # enabled, but huge exceptions count; example fix: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8089 reportPossiblyNonexistentConstantArrayOffset: true treatPhpDocTypesAsCertain: false ignoreErrors: - '/^Class [a-zA-Z\\]+ extends @final class PhpCsFixer\\(ConfigurationException\\InvalidConfigurationException|ConfigurationException\\InvalidFixerConfigurationException|Tokenizer\\Tokens|Console\\Command\\FixCommand)\.$/' - '/^\$this\(PhpCsFixer\\Tokenizer\\Tokens\) does not accept PhpCsFixer\\Tokenizer\\Token\|null\.$/' # We often need to iterate multiple times within single method and we re-use variable name - message: '/^For loop initial assignment overwrites variable \$(i|index|endIndex)+\.$/' paths: - src/Fixer/Comment/CommentToPhpdocFixer.php - src/Fixer/ControlStructure/YodaStyleFixer.php - src/Fixer/Import/GlobalNamespaceImportFixer.php - src/Fixer/Import/OrderedImportsFixer.php - src/Fixer/LanguageConstruct/SingleSpaceAroundConstructFixer.php - src/Fixer/Operator/NoUselessConcatOperatorFixer.php - src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php - src/Fixer/ReturnNotation/ReturnAssignmentFixer.php - src/Fixer/Whitespace/StatementIndentationFixer.php - tests/DocBlock/TypeExpressionTest.php - message: '/^Foreach overwrites \$index with its key variable.$/' paths: - src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php - src/Fixer/Import/GlobalNamespaceImportFixer.php - src/Fixer/LanguageConstruct/GetClassToClassKeywordFixer.php # Types related to tokens collections are purposefully narrowed, because we expect only tokens there - '/^Parameter #1 \$array \(array\) of method PhpCsFixer\\(Tokenizer|Doctrine\\Annotation)+\\Tokens::fromArray\(\) should be contravariant with parameter \$array \(array\) of method SplFixedArray::fromArray\(\)$/' - '/^Parameter .* of method PhpCsFixer\\Tokenizer\\Tokens::offsetSet\(\) should be contravariant with parameter .* of method .*::offsetSet\(\)$/' - '/^Parameter .* of method PhpCsFixer\\Tests\\Test\\TokensWithObservedTransformers::offsetSet\(\) should be contravariant with parameter .* of method .*::offsetSet\(\)$/' # We retrieve these FQNs in various ways, we process them along the way, let's assume it's always class-string - '/^Parameter #2 \$fullName of class PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\NamespaceUseAnalysis constructor expects class-string, string given\.$/' # PHPUnit data providers return type were not maintained originally, this exception should shrink over time (eg with help of custom, re-usable type) - message: '#^Method PhpCsFixer\\Tests\\.+::provide.+Cases\(\) return type has no value type specified in iterable type iterable\.$#' path: tests count: 266 tipsOfTheDay: false tmpDir: dev-tools/phpstan/cache