File: phpstan-dbal2.neon

package info (click to toggle)
doctrine 2.14.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,612 kB
  • sloc: php: 113,660; xml: 4,630; makefile: 28; sh: 14
file content (66 lines) | stat: -rw-r--r-- 3,438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
includes:
    - phpstan-baseline.neon
    - phpstan-params.neon

parameters:
    reportUnmatchedIgnoredErrors: false

    ignoreErrors:
        # PHPStan doesn't understand our method_exists() safeguards.
        - '/Call to an undefined method Doctrine\\DBAL\\Connection::createSchemaManager\(\)\./'
        # Class name will change in DBAL 3.
        - '/^Class Doctrine\\DBAL\\Platforms\\PostgreSQLPlatform not found\.$/'

        # Forward compatibility for DBAL 3.5
        - '/^Call to an undefined method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getAlterSchemaSQL\(\).$/'

        # Forward compatibility for DBAL 3.4
        - '/^Call to an undefined method Doctrine\\DBAL\\Cache\\QueryCacheProfile::[gs]etResultCache\(\)\.$/'
        -
        	message: '/^Call to an undefined static method Doctrine\\DBAL\\Configuration::[gs]etResultCache\(\)\.$/'
        	path: lib/Doctrine/ORM/Configuration.php
        -
        	message: '/^Parameter #3 \$resultCache of class Doctrine\\DBAL\\Cache\\QueryCacheProfile constructor/'
        	path: lib/Doctrine/ORM/AbstractQuery.php
        -
            message: '/^Parameter #2 \$\w+ of method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getDateAdd\w+Expression\(\) expects int, string given\.$/'
            path: lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php
        -
            message: '/^Parameter #2 \$\w+ of method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getDateSub\w+Expression\(\) expects int, string given\.$/'
            path: lib/Doctrine/ORM/Query/AST/Functions/DateSubFunction.php

        # False positive
        -
            message: '/^Call to an undefined method Doctrine\\Common\\Cache\\Cache::deleteAll\(\)\.$/'
            count: 1
            path: lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php
        # See https://github.com/doctrine/dbal/pull/5129
        -
            message: '/^Parameter #3 \$startPos of method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getLocateExpression\(\) expects int\|false, string given\.$/'
            count: 1
            path: lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php

        # Won't get fixed in DBAL 2
        -
            message: "#^Parameter \\#2 \\$start of method Doctrine\\\\DBAL\\\\Platforms\\\\AbstractPlatform\\:\\:getSubstringExpression\\(\\) expects int, string given\\.$#"
            count: 1
            path: lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php

        -
            message: "#^Parameter \\#3 \\$length of method Doctrine\\\\DBAL\\\\Platforms\\\\AbstractPlatform\\:\\:getSubstringExpression\\(\\) expects int\\|null, string\\|null given\\.$#"
            count: 1
            path: lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php

        # Symfony cache supports passing a key prefix to the clear method.
        - '/^Method Psr\\Cache\\CacheItemPoolInterface\:\:clear\(\) invoked with 1 parameter, 0 required\.$/'

        # Persistence 2 support
        -
            message: '/clear.*invoked with 1 parameter/'
            path: lib/Doctrine/ORM/EntityRepository.php
        -
            message: '#^Class Doctrine\\Persistence\\ObjectManagerAware not found\.$#'
            path: lib/Doctrine/ORM/UnitOfWork.php
        -
            message: '#^Call to method injectObjectManager\(\) on an unknown class Doctrine\\Persistence\\ObjectManagerAware\.$#'
            path: lib/Doctrine/ORM/UnitOfWork.php