psalm.xml 3.79 KB
Newer Older
1 2 3
<?xml version="1.0"?>
<psalm
    totallyTyped="false"
Sergei Morozov's avatar
Sergei Morozov committed
4
    errorLevel="5"
5 6 7 8 9 10 11 12 13 14 15 16 17
    resolveFromConfigFile="true"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
    <projectFiles>
        <directory name="lib/Doctrine/DBAL" />
        <directory name="tests/Doctrine/Tests" />
        <ignoreFiles>
            <directory name="vendor" />
        </ignoreFiles>
    </projectFiles>
    <stubs>
18
        <file name="vendor/jetbrains/phpstorm-stubs/PDO/PDO.php" />
19 20 21 22 23 24
        <file name="vendor/jetbrains/phpstorm-stubs/ibm_db2/ibm_db2.php" />
        <file name="vendor/jetbrains/phpstorm-stubs/mysqli/mysqli.php" />
        <file name="vendor/jetbrains/phpstorm-stubs/oci8/oci8.php" />
        <file name="vendor/jetbrains/phpstorm-stubs/pgsql/pgsql.php" />
        <file name="vendor/jetbrains/phpstorm-stubs/sqlsrv/sqlsrv.php" />
    </stubs>
25
    <issueHandlers>
26 27 28 29 30 31 32 33 34
        <ConflictingReferenceConstraint>
            <errorLevel type="suppress">
                <!--
                    This one is just too convoluted for Psalm to figure out, by
                    its author's own admission
                -->
                <file name="lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php"/>
            </errorLevel>
        </ConflictingReferenceConstraint>
35 36 37 38 39
        <FalsableReturnStatement>
            <errorLevel type="suppress">
                <!--
                    Fixing these issues requires an API change
                -->
40
                <file name="lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php"/>
41 42 43 44
                <file name="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php"/>
                <file name="lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php"/>
            </errorLevel>
        </FalsableReturnStatement>
45 46 47 48 49 50 51 52 53
        <MethodSignatureMismatch>
            <errorLevel type="suppress">
                <!--
                    This one is clearly deliberate; it's a hack to adapt \PDO to
                    Doctrine\DBAL\Driver\Connection
                -->
                <file name="lib/Doctrine/DBAL/Driver/PDOConnection.php"/>
            </errorLevel>
        </MethodSignatureMismatch>
54 55 56 57 58 59 60 61
        <NullableReturnStatement>
            <errorLevel type="suppress">
                <!--
                    Fixing this issue requires an API change
                -->
                <file name="lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php"/>
            </errorLevel>
        </NullableReturnStatement>
62 63 64 65 66 67 68 69 70
        <TooFewArguments>
            <errorLevel type="suppress">
                <!--
                    Requires a release of
                    https://github.com/JetBrains/phpstorm-stubs/pull/727
                -->
                <file name="lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php"/>
            </errorLevel>
        </TooFewArguments>
71 72 73
        <UndefinedConstant>
            <errorLevel type="suppress">
                <directory name="lib/Doctrine/DBAL/Driver/SQLAnywhere"/>
74 75 76 77 78
                <!--
                    Requires a release of
                    https://github.com/JetBrains/phpstorm-stubs/pull/732
                -->
                <file name="tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php" />
79 80 81 82 83 84 85
            </errorLevel>
        </UndefinedConstant>
        <UndefinedFunction>
            <errorLevel type="suppress">
                <directory name="lib/Doctrine/DBAL/Driver/SQLAnywhere"/>
            </errorLevel>
        </UndefinedFunction>
86 87 88 89 90 91
        <UndefinedClass>
            <errorLevel type="suppress">
                <!-- Contains references to optional dependencies -->
                <file name="lib/Doctrine/DBAL/Tools/Dumper.php"/>
            </errorLevel>
        </UndefinedClass>
92
    </issueHandlers>
93
</psalm>