psalm.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <?xml version="1.0"?>
  2. <psalm
  3. totallyTyped="false"
  4. errorLevel="3"
  5. resolveFromConfigFile="true"
  6. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7. xmlns="https://getpsalm.org/schema/config"
  8. xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
  9. >
  10. <projectFiles>
  11. <directory name="lib/Doctrine/DBAL" />
  12. <directory name="tests/Doctrine/Tests" />
  13. <ignoreFiles>
  14. <directory name="vendor" />
  15. </ignoreFiles>
  16. </projectFiles>
  17. <stubs>
  18. <file name="vendor/jetbrains/phpstorm-stubs/PDO/PDO.php" />
  19. <file name="vendor/jetbrains/phpstorm-stubs/ibm_db2/ibm_db2.php" />
  20. <file name="vendor/jetbrains/phpstorm-stubs/mysqli/mysqli.php" />
  21. <file name="vendor/jetbrains/phpstorm-stubs/oci8/oci8.php" />
  22. <file name="vendor/jetbrains/phpstorm-stubs/pgsql/pgsql.php" />
  23. <file name="vendor/jetbrains/phpstorm-stubs/sqlsrv/sqlsrv.php" />
  24. </stubs>
  25. <issueHandlers>
  26. <ConflictingReferenceConstraint>
  27. <errorLevel type="suppress">
  28. <!--
  29. This one is just too convoluted for Psalm to figure out, by
  30. its author's own admission
  31. -->
  32. <file name="lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php"/>
  33. </errorLevel>
  34. </ConflictingReferenceConstraint>
  35. <DuplicateClass>
  36. <errorLevel type="suppress">
  37. <!-- These files contain a php 7 and a php 8 version of the same trait -->
  38. <file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
  39. <file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
  40. </errorLevel>
  41. </DuplicateClass>
  42. <FalsableReturnStatement>
  43. <errorLevel type="suppress">
  44. <!--
  45. Fixing these issues requires an API change
  46. -->
  47. <file name="lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php"/>
  48. <file name="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php"/>
  49. <file name="lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php"/>
  50. </errorLevel>
  51. </FalsableReturnStatement>
  52. <ForbiddenCode>
  53. <errorLevel type="suppress">
  54. <!-- See https://github.com/doctrine/dbal/pull/3934 -->
  55. <file name="lib/Doctrine/DBAL/Logging/EchoSQLLogger.php"/>
  56. <!-- The call to var_dump() here is by design -->
  57. <file name="lib/Doctrine/DBAL/Tools/Dumper.php"/>
  58. </errorLevel>
  59. </ForbiddenCode>
  60. <ImplicitToStringCast>
  61. <errorLevel type="suppress">
  62. <!-- See https://github.com/doctrine/dbal/pull/4082 -->
  63. <file name="lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php"/>
  64. </errorLevel>
  65. </ImplicitToStringCast>
  66. <ImplementedReturnTypeMismatch>
  67. <errorLevel type="suppress">
  68. <!-- See https://github.com/doctrine/dbal/pull/3906 -->
  69. <file name="lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php"/>
  70. <!-- See https://github.com/doctrine/dbal/pull/4030 -->
  71. <file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php"/>
  72. <file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php"/>
  73. <!-- See https://github.com/doctrine/dbal/pull/3080 -->
  74. <file name="lib/Doctrine/DBAL/Driver/PDOConnection.php"/>
  75. <file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
  76. <file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
  77. <!-- See https://github.com/doctrine/dbal/issues/4156 -->
  78. <file name="lib/Doctrine/DBAL/Portability/Connection.php"/>
  79. <!-- Fixing this issue requires an API change -->
  80. <file name="lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php"/>
  81. </errorLevel>
  82. </ImplementedReturnTypeMismatch>
  83. <InvalidPropertyAssignmentValue>
  84. <errorLevel type="suppress">
  85. <!-- Fixing this issue requires an API change -->
  86. <file name="lib/Doctrine/DBAL/Driver/PDOException.php"/>
  87. </errorLevel>
  88. </InvalidPropertyAssignmentValue>
  89. <MethodSignatureMismatch>
  90. <errorLevel type="suppress">
  91. <!--
  92. This one is clearly deliberate; it's a hack to adapt \PDO to
  93. Doctrine\DBAL\Driver\Connection
  94. -->
  95. <file name="lib/Doctrine/DBAL/Driver/PDOConnection.php"/>
  96. <file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
  97. <file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
  98. </errorLevel>
  99. </MethodSignatureMismatch>
  100. <NullableReturnStatement>
  101. <errorLevel type="suppress">
  102. <!--
  103. Fixing this issue requires an API change
  104. -->
  105. <file name="lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php"/>
  106. </errorLevel>
  107. </NullableReturnStatement>
  108. <ParamNameMismatch>
  109. <errorLevel type="suppress">
  110. <!--
  111. These traits contain implementations for different PHP versions in order to handle a signature
  112. change. At least one of the implementations won't match the signature expected by Psalm.
  113. -->
  114. <file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
  115. <file name="lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php"/>
  116. </errorLevel>
  117. </ParamNameMismatch>
  118. <PossiblyInvalidOperand>
  119. <errorLevel type="suppress">
  120. <!--
  121. This code relies on certain elements of a mixed-type array to be of a certain type.
  122. -->
  123. <file name="lib/Doctrine/DBAL/SQLParserUtils.php"/>
  124. </errorLevel>
  125. </PossiblyInvalidOperand>
  126. <PossiblyNullArgument>
  127. <errorLevel type="suppress">
  128. <!-- See https://github.com/doctrine/dbal/pull/3488 -->
  129. <file name="lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php"/>
  130. </errorLevel>
  131. </PossiblyNullArgument>
  132. <RedundantCondition>
  133. <errorLevel type="suppress">
  134. <!--
  135. This suppression should be removed in 3.0.x
  136. See https://github.com/doctrine/dbal/pull/3860
  137. -->
  138. <file name="lib/Doctrine/DBAL/Version.php"/>
  139. </errorLevel>
  140. </RedundantCondition>
  141. <ReservedWord>
  142. <errorLevel type="suppress">
  143. <!-- This file uses the mixed type in a PHP 8 forward compatibility layer. -->
  144. <file name="lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php"/>
  145. </errorLevel>
  146. </ReservedWord>
  147. <TooFewArguments>
  148. <errorLevel type="suppress">
  149. <!--
  150. Requires a release of
  151. https://github.com/JetBrains/phpstorm-stubs/pull/727
  152. -->
  153. <file name="lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php"/>
  154. </errorLevel>
  155. </TooFewArguments>
  156. <TooManyArguments>
  157. <errorLevel type="suppress">
  158. <!-- See https://github.com/doctrine/dbal/pull/3080 -->
  159. <file name="lib/Doctrine/DBAL/Connection.php"/>
  160. <file name="tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgSql/DriverTest.php"/>
  161. <!-- See https://github.com/doctrine/dbal/pull/3562 -->
  162. <file name="lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php"/>
  163. <file name="lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php"/>
  164. </errorLevel>
  165. </TooManyArguments>
  166. <TypeDoesNotContainType>
  167. <errorLevel type="suppress">
  168. <!-- See https://github.com/vimeo/psalm/issues/4274 -->
  169. <file name="lib/Doctrine/DBAL/Schema/Index.php"/>
  170. </errorLevel>
  171. </TypeDoesNotContainType>
  172. <UndefinedConstant>
  173. <errorLevel type="suppress">
  174. <directory name="lib/Doctrine/DBAL/Driver/SQLAnywhere"/>
  175. <!--
  176. Requires a release of
  177. https://github.com/JetBrains/phpstorm-stubs/pull/732
  178. -->
  179. <file name="tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php" />
  180. </errorLevel>
  181. </UndefinedConstant>
  182. <UndefinedFunction>
  183. <errorLevel type="suppress">
  184. <directory name="lib/Doctrine/DBAL/Driver/SQLAnywhere"/>
  185. </errorLevel>
  186. </UndefinedFunction>
  187. <UndefinedClass>
  188. <errorLevel type="suppress">
  189. <!-- Contains references to optional dependencies -->
  190. <file name="lib/Doctrine/DBAL/Tools/Dumper.php"/>
  191. </errorLevel>
  192. </UndefinedClass>
  193. <InvalidReturnType>
  194. <errorLevel type="suppress">
  195. <!-- lastInsertId has a return type that does not match the one defined in the interface-->
  196. <file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php"/>
  197. </errorLevel>
  198. </InvalidReturnType>
  199. <InvalidScalarArgument>
  200. <errorLevel type="suppress">
  201. <!-- See https://github.com/doctrine/dbal/pull/3498 -->
  202. <file name="tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php"/>
  203. <file name="tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php"/>
  204. <file name="tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php"/>
  205. <file name="tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php"/>
  206. <file name="tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php"/>
  207. <file name="tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php"/>
  208. <!-- See https://github.com/doctrine/dbal/pull/3574 -->
  209. <file name="tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php"/>
  210. <!-- See https://github.com/doctrine/dbal/pull/4007 -->
  211. <file name="lib/Doctrine/DBAL/Driver/PDOStatement.php"/>
  212. <!-- See https://github.com/doctrine/dbal/pull/3906 -->
  213. <file name="tests/Doctrine/Tests/DBAL/Sharding/PoolingShardManagerTest.php"/>
  214. <file name="tests/Doctrine/Tests/DBAL/Sharding/SQLAzure/FunctionalTest.php"/>
  215. <file name="tests/Doctrine/Tests/DBAL/Sharding/SQLAzure/SQLAzureShardManagerTest.php"/>
  216. <!-- See https://github.com/doctrine/dbal/pull/3241 -->
  217. <file name="lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php"/>
  218. <!-- See https://github.com/doctrine/dbal/issues/4318 -->
  219. <file name="lib/Doctrine/DBAL/Types/ConversionException.php"/>
  220. </errorLevel>
  221. </InvalidScalarArgument>
  222. <InvalidReturnStatement>
  223. <errorLevel type="suppress">
  224. <!-- lastInsertId has a return type that does not match the one defined in the interface-->
  225. <file name="lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php"/>
  226. </errorLevel>
  227. </InvalidReturnStatement>
  228. </issueHandlers>
  229. </psalm>