Browse Source

Merge pull request #17002 from cakephp/5.x-psalm

Fix warnings/deprecations in psalm config.
othercorey 3 years ago
parent
commit
d2dc4b7a4d
2 changed files with 7 additions and 5 deletions
  1. 0 5
      psalm-baseline.xml
  2. 7 0
      psalm.xml

+ 0 - 5
psalm-baseline.xml

@@ -18,11 +18,6 @@
       <code>int|false</code>
     </InvalidReturnType>
   </file>
-  <file src="src/Database/Statement/SqlserverStatement.php">
-    <UndefinedConstant occurrences="1">
-      <code>PDO::SQLSRV_ENCODING_BINARY</code>
-    </UndefinedConstant>
-  </file>
   <file src="src/Datasource/Paging/PaginatedResultSet.php">
     <MethodSignatureMustProvideReturnType occurrences="1">
       <code>://cakephp.org)</code>

+ 7 - 0
psalm.xml

@@ -3,6 +3,8 @@
     errorLevel="4"
     usePhpDocMethodsWithoutMagicCall="true"
     findUnusedPsalmSuppress="true"
+    findUnusedBaselineEntry="true"
+    findUnusedCode="false"
     resolveFromConfigFile="true"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="https://getpsalm.org/schema/config"
@@ -17,6 +19,11 @@
         </ignoreFiles>
     </projectFiles>
 
+    <enableExtensions>
+        <extension name="apcu"/>
+        <extension name="redis"/>
+    </enableExtensions>
+
     <issueHandlers>
         <UndefinedClass>
             <errorLevel type="suppress">