includes:
    - vendor/phpstan/phpstan-phpunit/extension.neon
    - vendor/phpstan/phpstan-phpunit/rules.neon
    - vendor/phpstan/phpstan-strict-rules/rules.neon
    - phpstan-baseline.neon

parameters:
    level: 7
    phpVersion: 80100

    paths:
        - src
        - tests
        - tests_php74

    excludePaths:
        - tests/Persistence/Mapping/_files/Doctrine.Tests.Persistence.Mapping.PHPTestEntity.php

    ignoreErrors:
        - '#Variable property access on \$this\(Doctrine\\Persistence\\Reflection\\TypedNoDefaultReflectionProperty\)\.#'
        -
            message: '#Parameter \#1 \$class of method Doctrine\\Persistence\\Mapping\\RuntimeReflectionService\:\:getParentClasses\(\) expects class\-string, string given\.#'
            path: 'tests/Persistence/Mapping/RuntimeReflectionServiceTest.php'

        # https://github.com/phpstan/phpstan/issues/5009
        -
            message: '#Call to function assert\(\) with true will always evaluate to true\.#'
            path: 'src/Persistence/Reflection/TypedNoDefaultReflectionPropertyBase.php'

        -
            message: '#Instanceof between Closure and Closure will always evaluate to true\.#'
            path: 'src/Persistence/Reflection/TypedNoDefaultReflectionPropertyBase.php'

        -
            message: '#Class Foo not found#'
            path: 'tests/Persistence/Mapping/ClassMetadataFactoryTest.php'
