Setup static analysis with Psalm

parent 2293b452
name: "Continuous Integration"
on:
pull_request:
jobs:
static-analysis-psalm:
name: Static Analysis with Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Psalm
uses: docker://vimeo/psalm-github-actions
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="3.11.2@d470903722cfcbc1cd04744c5491d3e6d13ec3d9">
<file src="lib/Doctrine/DBAL/Driver/Connection.php">
<InvalidParamDefault occurrences="1">
<code>int</code>
</InvalidParamDefault>
</file>
<file src="lib/Doctrine/DBAL/Driver/DriverException.php">
<MissingImmutableAnnotation occurrences="1">
<code>public function getMessage();</code>
</MissingImmutableAnnotation>
</file>
<file src="lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php">
<UndefinedConstant occurrences="1">
<code>PDO::SQLSRV_ENCODING_BINARY</code>
</UndefinedConstant>
</file>
<file src="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php">
<UndefinedFunction occurrences="14">
<code>sasql_pconnect($dsn)</code>
<code>sasql_connect($dsn)</code>
<code>sasql_set_option($this-&gt;connection, 'verbose_errors', false)</code>
<code>sasql_set_option($this-&gt;connection, 'auto_commit', 'on')</code>
<code>sasql_set_option($this-&gt;connection, 'auto_commit', 'off')</code>
<code>sasql_commit($this-&gt;connection)</code>
<code>sasql_errorcode($this-&gt;connection)</code>
<code>sasql_error($this-&gt;connection)</code>
<code>sasql_real_query($this-&gt;connection, $statement)</code>
<code>sasql_affected_rows($this-&gt;connection)</code>
<code>sasql_insert_id($this-&gt;connection)</code>
<code>sasql_escape_string($this-&gt;connection, $input)</code>
<code>sasql_rollback($this-&gt;connection)</code>
<code>sasql_set_option($this-&gt;connection, 'auto_commit', 'on')</code>
</UndefinedFunction>
</file>
<file src="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php">
<UndefinedFunction occurrences="8">
<code>sasql_sqlstate($conn)</code>
<code>sasql_sqlstate()</code>
<code>sasql_stmt_errno($stmt)</code>
<code>sasql_stmt_error($stmt)</code>
<code>sasql_errorcode($conn)</code>
<code>sasql_error($conn)</code>
<code>sasql_errorcode()</code>
<code>sasql_error()</code>
</UndefinedFunction>
</file>
<file src="lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php">
<UndefinedConstant occurrences="1">
<code>SASQL_BOTH</code>
</UndefinedConstant>
<UndefinedFunction occurrences="14">
<code>sasql_prepare($conn, $sql)</code>
<code>sasql_stmt_bind_param_ex($this-&gt;stmt, $column - 1, $variable, $type, $variable === null)</code>
<code>sasql_stmt_reset($this-&gt;stmt)</code>
<code>sasql_stmt_field_count($this-&gt;stmt)</code>
<code>sasql_stmt_errno($this-&gt;stmt)</code>
<code>sasql_stmt_error($this-&gt;stmt)</code>
<code>sasql_stmt_execute($this-&gt;stmt)</code>
<code>sasql_stmt_result_metadata($this-&gt;stmt)</code>
<code>sasql_fetch_assoc($this-&gt;result)</code>
<code>sasql_fetch_array($this-&gt;result, SASQL_BOTH)</code>
<code>sasql_fetch_object($this-&gt;result)</code>
<code>sasql_fetch_row($this-&gt;result)</code>
<code>sasql_fetch_object($this-&gt;result)</code>
<code>sasql_stmt_affected_rows($this-&gt;stmt)</code>
</UndefinedFunction>
</file>
<file src="lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php">
<TooFewArguments occurrences="1">
<code>sqlsrv_get_field($this-&gt;stmt, 0)</code>
</TooFewArguments>
</file>
<file src="lib/Doctrine/DBAL/Platforms/AbstractPlatform.php">
<InvalidParamDefault occurrences="1">
<code>int</code>
</InvalidParamDefault>
</file>
<file src="lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php">
<InvalidParamDefault occurrences="1">
<code>string</code>
</InvalidParamDefault>
</file>
<file src="lib/Doctrine/DBAL/Tools/Dumper.php">
<UndefinedClass occurrences="1">
<code>Collection</code>
</UndefinedClass>
</file>
<file src="tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php">
<UndefinedConstant occurrences="5">
<code>PDO::PGSQL_ATTR_DISABLE_PREPARES</code>
<code>PDO::PGSQL_ATTR_DISABLE_PREPARES</code>
<code>PDO::PGSQL_ATTR_DISABLE_PREPARES</code>
<code>PDO::PGSQL_ATTR_DISABLE_PREPARES</code>
<code>PDO::PGSQL_ATTR_DISABLE_PREPARES</code>
</UndefinedConstant>
</file>
<file src="tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php">
<UndefinedDocblockClass occurrences="93">
<code>MySqlPlatform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
</UndefinedDocblockClass>
</file>
<file src="tests/Doctrine/Tests/DBAL/Platforms/MariaDb1027PlatformTest.php">
<UndefinedDocblockClass occurrences="4">
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
</UndefinedDocblockClass>
</file>
<file src="tests/Doctrine/Tests/DBAL/Platforms/MySQL57PlatformTest.php">
<UndefinedDocblockClass occurrences="4">
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
</UndefinedDocblockClass>
</file>
<file src="tests/Doctrine/Tests/DBAL/Platforms/MySqlPlatformTest.php">
<UndefinedDocblockClass occurrences="1">
<code>$this-&gt;platform</code>
</UndefinedDocblockClass>
</file>
</files>
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
"jetbrains/phpstorm-stubs": "^2019.1", "jetbrains/phpstorm-stubs": "^2019.1",
"phpstan/phpstan": "^0.12", "phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.4.1", "phpunit/phpunit": "^8.4.1",
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0" "symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
"vimeo/psalm": "^3.11"
}, },
"suggest": { "suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files." "symfony/console": "For helpful console commands such as SQL execution and import of files."
......
This diff is collapsed.
<?xml version="1.0"?>
<psalm
totallyTyped="false"
errorLevel="8"
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"
errorBaseline="baseline.xml"
>
<projectFiles>
<directory name="lib/Doctrine/DBAL" />
<directory name="tests/Doctrine/Tests" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<stubs>
<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>
</psalm>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment