mirror of
https://github.com/doctrine/dbal.git
synced 2026-03-23 22:32:15 +01:00
Drop Psalm in favor of PHPStan
As per the decision we made during the hackathon. psalm-immutable annotations have been dropped, as they were only introduced to sastisfy Psalm
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -8,8 +8,6 @@
|
||||
/phpcs.xml.dist export-ignore
|
||||
/phpstan.neon.dist export-ignore
|
||||
/phpunit.xml.dist export-ignore
|
||||
/psalm.xml.dist export-ignore
|
||||
/psalm-strict.xml export-ignore
|
||||
/run-all.sh export-ignore
|
||||
/SECURITY.md export-ignore
|
||||
/static-analysis export-ignore
|
||||
|
||||
61
.github/workflows/static-analysis.yml
vendored
61
.github/workflows/static-analysis.yml
vendored
@@ -8,8 +8,6 @@ on:
|
||||
- .github/workflows/static-analysis.yml
|
||||
- composer.*
|
||||
- phpstan.neon.dist
|
||||
- psalm.xml.dist
|
||||
- psalm-strict.xml
|
||||
- src/**
|
||||
- static-analysis/**
|
||||
- tests/**
|
||||
@@ -20,66 +18,11 @@ on:
|
||||
- .github/workflows/static-analysis.yml
|
||||
- composer.*
|
||||
- phpstan.neon.dist
|
||||
- psalm.xml.dist
|
||||
- psalm-strict.xml
|
||||
- src/**
|
||||
- static-analysis/**
|
||||
- tests/**
|
||||
|
||||
jobs:
|
||||
static-analysis-phpstan:
|
||||
name: "Static Analysis with PHPStan"
|
||||
runs-on: "ubuntu-22.04"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version:
|
||||
- "8.4"
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: "actions/checkout@v4"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@v2"
|
||||
with:
|
||||
coverage: "none"
|
||||
php-version: "${{ matrix.php-version }}"
|
||||
tools: "cs2pr"
|
||||
|
||||
- name: "Install dependencies with Composer"
|
||||
uses: "ramsey/composer-install@v3"
|
||||
with:
|
||||
composer-options: "--ignore-platform-req=php+"
|
||||
|
||||
- name: "Run a static analysis with phpstan/phpstan"
|
||||
run: "vendor/bin/phpstan --error-format=checkstyle | cs2pr"
|
||||
|
||||
static-analysis-psalm:
|
||||
name: "Static Analysis with Psalm"
|
||||
runs-on: "ubuntu-22.04"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version:
|
||||
- "8.3"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
coverage: none
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: cs2pr
|
||||
|
||||
- name: Install dependencies with Composer
|
||||
uses: ramsey/composer-install@v3
|
||||
|
||||
- name: Run static analysis with Vimeo Psalm
|
||||
run: vendor/bin/psalm --shepherd
|
||||
|
||||
- name: Run type inference tests with Vimeo Psalm
|
||||
run: vendor/bin/psalm --config=psalm-strict.xml --shepherd
|
||||
name: "Static Analysis"
|
||||
uses: "doctrine/.github/.github/workflows/phpstan.yml@7.1.0"
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,4 +10,3 @@ vendor/
|
||||
/phpunit.xml
|
||||
/.phpcs-cache
|
||||
/phpstan.neon
|
||||
/psalm.xml
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
| [![GitHub Actions][GA 5.0 image]][GA 5.0] | [![GitHub Actions][GA 4.3 image]][GA 4.3] | [![GitHub Actions][GA 4.2 image]][GA 4.2] | [![GitHub Actions][GA 3.10 image]][GA 3.10] | [![GitHub Actions][GA 3.9 image]][GA 3.9] |
|
||||
| [![AppVeyor][AppVeyor 5.0 image]][AppVeyor 5.0] | [![AppVeyor][AppVeyor 4.3 image]][AppVeyor 4.3] | [![AppVeyor][AppVeyor 4.2 image]][AppVeyor 4.2] | [![AppVeyor][AppVeyor 3.10 image]][AppVeyor 3.10] | [![AppVeyor][AppVeyor 3.9 image]][AppVeyor 3.9] |
|
||||
| [![Code Coverage][Coverage 5.0 image]][CodeCov 5.0] | [![Code Coverage][Coverage 4.3 image]][CodeCov 4.3] | [![Code Coverage][Coverage 4.2 image]][CodeCov 4.2] | [![Code Coverage][Coverage 3.10 image]][CodeCov 3.10] | [![Code Coverage][Coverage 3.9 image]][CodeCov 3.9] |
|
||||
| N/A | N/A | [![Type Coverage][TypeCov image]][TypeCov] | N/A | N/A |
|
||||
|
||||
Powerful ***D***ata***B***ase ***A***bstraction ***L***ayer with many features for database schema introspection and schema management.
|
||||
|
||||
@@ -38,8 +37,6 @@ Powerful ***D***ata***B***ase ***A***bstraction ***L***ayer with many features f
|
||||
[AppVeyor 4.2 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/4.2.x?svg=true
|
||||
[GA 4.2]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.2.x
|
||||
[GA 4.2 image]: https://github.com/doctrine/dbal/actions/workflows/continuous-integration.yml/badge.svg?branch=4.2.x
|
||||
[TypeCov]: https://shepherd.dev/github/doctrine/dbal
|
||||
[TypeCov image]: https://shepherd.dev/github/doctrine/dbal/coverage.svg
|
||||
|
||||
[Coverage 3.10 image]: https://codecov.io/gh/doctrine/dbal/branch/3.10.x/graph/badge.svg
|
||||
[3.10]: https://github.com/doctrine/dbal/tree/3.10.x
|
||||
|
||||
@@ -46,12 +46,10 @@
|
||||
"phpstan/phpstan": "2.1.1",
|
||||
"phpstan/phpstan-strict-rules": "^2",
|
||||
"phpunit/phpunit": "9.6.22",
|
||||
"psalm/plugin-phpunit": "0.18.4",
|
||||
"slevomat/coding-standard": "8.13.1",
|
||||
"squizlabs/php_codesniffer": "3.10.2",
|
||||
"symfony/cache": "^5.4|^6.0|^7.0",
|
||||
"symfony/console": "^4.4|^5.4|^6.0|^7.0",
|
||||
"vimeo/psalm": "4.30.0"
|
||||
"symfony/console": "^4.4|^5.4|^6.0|^7.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/console": "For helpful console commands such as SQL execution and import of files."
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="1"
|
||||
phpVersion="8.1"
|
||||
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="static-analysis" />
|
||||
<ignoreFiles>
|
||||
<directory name="src" />
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
</psalm>
|
||||
877
psalm.xml.dist
877
psalm.xml.dist
@@ -1,877 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="2"
|
||||
phpVersion="8.2"
|
||||
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="src" />
|
||||
<directory name="static-analysis" />
|
||||
<directory name="tests" />
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
<stubs>
|
||||
<file name="vendor/jetbrains/phpstorm-stubs/PDO/PDO.php" />
|
||||
<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/sqlsrv/sqlsrv.php" />
|
||||
</stubs>
|
||||
<issueHandlers>
|
||||
<ArgumentTypeCoercion>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
See https://github.com/composer/package-versions-deprecated/pull/12
|
||||
-->
|
||||
<file name="src/Tools/Console/ConsoleRunner.php"/>
|
||||
</errorLevel>
|
||||
</ArgumentTypeCoercion>
|
||||
<ConflictingReferenceConstraint>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This one is just too convoluted for Psalm to figure out, by
|
||||
its author's own admission
|
||||
-->
|
||||
<file name="src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php"/>
|
||||
</errorLevel>
|
||||
</ConflictingReferenceConstraint>
|
||||
<DeprecatedClass>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed in 4.0.0.
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Id\TableGenerator"/>
|
||||
<referencedClass name="Doctrine\DBAL\Id\TableGeneratorSchemaVisitor"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Driver\ServerInfoAwareConnection"/>
|
||||
<referencedClass name="Doctrine\DBAL\VersionAwarePlatformDriver"/>
|
||||
<referencedClass name="Doctrine\DBAL\FetchMode"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\DB2111Platform"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\MariaDb102Keywords"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\MariaDb1027Platform"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\MariaDb1043Platform"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\MySQL57Platform"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL100Platform"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL94Platform"/>
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\SQLServer2012Platform"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Constraint"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4967
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Logging\DebugStack"/>
|
||||
<referencedClass name="Doctrine\DBAL\Logging\SQLLogger"/>
|
||||
<referencedClass name="Doctrine\DBAL\Logging\LoggerChain"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector"/>
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\ReservedKeywordsValidator"/>
|
||||
<referencedClass name="Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Visitor\AbstractVisitor"/>
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Visitor\Visitor"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Types\ArrayType"/>
|
||||
<referencedClass name="Doctrine\DBAL\Types\ObjectType"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaAlterTableEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaCreateTableEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaDropTableEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\TransactionEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\TransactionBeginEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\TransactionCommitEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\TransactionRollBackEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\ConnectionEventArgs"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\Listeners\OracleSessionInit"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\Listeners\SQLSessionInit"/>
|
||||
<referencedClass name="Doctrine\DBAL\Event\Listeners\SQLiteSessionInit"/>
|
||||
<referencedClass name="Doctrine\DBAL\Events"/>
|
||||
</errorLevel>
|
||||
</DeprecatedClass>
|
||||
<DeprecatedConstant>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<file name="src/Types/ArrayType.php"/>
|
||||
<file name="src/Types/ObjectType.php"/>
|
||||
<file name="src/Types/Type.php"/>
|
||||
<file name="tests/Schema/AbstractComparatorTestCase.php"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<file name="src/Query/QueryBuilder.php"/>
|
||||
<file name="tests/Query/QueryBuilderTest.php"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<directory name="src/Schema/Exception"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<file name="src/Connection.php"/>
|
||||
<file name="src/Connections/PrimaryReadReplicaConnection.php"/>
|
||||
<file name="src/Event/Listeners/OracleSessionInit.php"/>
|
||||
<file name="src/Event/Listeners/SQLSessionInit.php"/>
|
||||
<file name="src/Event/Listeners/SQLiteSessionInit.php"/>
|
||||
<file name="src/Platforms/AbstractPlatform.php"/>
|
||||
<file name="src/Schema/AbstractSchemaManager.php"/>
|
||||
<file name="tests/ConnectionTest.php"/>
|
||||
<file name="tests/Events/OracleSessionInitTest.php"/>
|
||||
<file name="tests/Events/SQLSessionInitTest.php"/>
|
||||
<file name="tests/Functional/Schema/SchemaManagerFunctionalTestCase.php"/>
|
||||
<file name="tests/Platforms/AbstractPlatformTestCase.php"/>
|
||||
</errorLevel>
|
||||
</DeprecatedConstant>
|
||||
<DeprecatedInterface>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Driver\ServerInfoAwareConnection"/>
|
||||
<referencedClass name="Doctrine\DBAL\VersionAwarePlatformDriver"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Constraint"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4967
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Logging\SQLLogger"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Visitor\Visitor"/>
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Visitor\NamespaceVisitor"/>
|
||||
</errorLevel>
|
||||
</DeprecatedInterface>
|
||||
<DeprecatedMethod>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed after 2022
|
||||
See https://github.com/doctrine/dbal/pull/4317
|
||||
-->
|
||||
<file name="tests/Functional/LegacyAPITest.php"/>
|
||||
<!--
|
||||
This suppression should be removed in 4.0.0.
|
||||
-->
|
||||
<file name="src/Platforms/AbstractPlatform.php"/>
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/3865
|
||||
-->
|
||||
<file name="src/Query/Expression/CompositeExpression.php"/>
|
||||
<file name="tests/Query/Expression/CompositeExpressionTest.php"/>
|
||||
<file name="tests/Query/Expression/ExpressionBuilderTest.php"/>
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/4518
|
||||
-->
|
||||
<file name="src/Query/QueryBuilder.php"/>
|
||||
<file name="src/Tools/Console/Command/ReservedWordsCommand.php"/>
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
-->
|
||||
<file name="src/Schema/AbstractSchemaManager.php" />
|
||||
<file name="src/Schema/PostgreSQLSchemaManager.php" />
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/4518
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Connection::getSchemaManager"/>
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/issues/4503
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\AbstractSchemaManager::listNamespaceNames"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\PostgreSQLSchemaManager::getSchemaNames"/>
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/4722
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Comparator::compare" />
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/4578
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::execute" />
|
||||
<referencedMethod name="Doctrine\DBAL\Statement::execute"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryDefaultLength"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryMaxLength"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getIsNullExpression"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getUniqueFieldDeclarationSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::getCharMaxLength"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::getBinaryMaxLength"/>
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/5058
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::isCommentedDoctrineType"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::initializeCommentedDoctrineTypes"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::markedDoctrineTypeCommented"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::supportsAlterTable"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::supportsViews"/>
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/4742
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::getLocalTable"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::getLocalTableName"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::setLocalTable"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Schema::getMigrateToSql"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::assertValidIdentifier"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4822
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\SchemaConfig::hasExplicitForeignKeyIndexes"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4814
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\AbstractAsset::getFullQualifiedName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4821
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\AbstractSchemaManager::getSchemaSearchPaths"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getCreateConstraintSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\ForeignKeyConstraint::getColumns"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4897
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\AbstractSchemaManager::tryMethod"/>
|
||||
|
||||
<!-- TODO: remove in 4.0.0 -->
|
||||
<referencedMethod name="Doctrine\DBAL\Driver\PDO\Connection::getWrappedConnection"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4966
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Connection::getWrappedConnection"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::getListTableColumnsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::getListTableForeignKeysSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::getListTableIndexesSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getListTableColumnsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getListTableForeignKeysSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getListTableIndexesSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::getListTableColumnsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::getListTableCommentsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::getListTableForeignKeysSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::getListTableIndexesSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::getListTableColumnsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::getListTableForeignKeysSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::getListTableIndexesSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::getListTableColumnsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::getListTableForeignKeysSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::getListTableIndexesSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::getListTableMetadataSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableColumnsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableForeignKeysSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableIndexesSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableMetadataSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::disableSchemaEmulation"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::getListTableColumnsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::getListTableForeignKeysSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::getListTableIndexesSQL"/>
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/1519
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::prefersIdentityColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::prefersIdentityColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::prefersIdentityColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SQLServerPlatform::prefersIdentityColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::prefersIdentityColumns"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/5136
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Types\Type::canRequireSQLConversion"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/4967
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Configuration::getSQLLogger"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Configuration::setSQLLogger"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/5204
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getColumnComment"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
See https://github.com/doctrine/dbal/pull/5049
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Types\Type::getName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::getListTableConstraintsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::getListTableConstraintsSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::getListTableConstraintsSQL"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getVarcharTypeDeclarationSQL"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::getIdentifierQuoteCharacter"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getIdentifierQuoteCharacter"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getStringLiteralQuoteCharacter"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::supportsForeignKeyConstraints"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\Keywords\KeywordList::getName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Schema::visit"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Sequence::visit"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Table::visit"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Driver::getSchemaManager"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Column::getCustomSchemaOption"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Column::getCustomSchemaOptions"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Column::hasCustomSchemaOption"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Column::setCustomSchemaOption"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Types\Type::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\DateImmutableType::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\DateIntervalType::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\DateTimeTzImmutableType::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\DateTimeImmutableType::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\GuidType::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\JsonType::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\TimeImmutableType::requiresSQLCommentHint"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Types\VarDateTimeImmutableType::requiresSQLCommentHint"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::hasNativeGuidType"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::hasNativeJsonType"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::hasNativeJsonType"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::getTinyIntTypeDeclarationSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\SqlitePlatform::getMediumIntTypeDeclarationSQL"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getDefaultSchemaName"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getIdentitySequenceName"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::supportsCreateDropDatabase"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::usesSequenceEmulatedIdentityColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::supportsCreateDropDatabase"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\OraclePlatform::usesSequenceEmulatedIdentityColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::getIdentitySequenceName"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\PostgreSQLPlatform::usesSequenceEmulatedIdentityColumns"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getIndexFieldDeclarationListSQL"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getCustomTypeDeclarationSQL"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::getState"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::getType"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Driver\Statement::bindParam"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Driver\IBMDB2\Statement::bindParam"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware::bindParam"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Driver\OCI8\Statement::bindParam"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Driver\PDO\Statement::bindParam"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Driver\PDO\SQLSrv\Statement::bindParam"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Statement::bindParam"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\AbstractSchemaManager::listTableDetails"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\SqliteSchemaManager::listTableDetails"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\ColumnDiff::getOldColumnName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\ColumnDiff::hasChanged"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Comparator::diffColumn"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\TableDiff::getNewName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\TableDiff::getName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Table::changeColumn"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Table::getForeignKeyColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Table::getPrimaryKeyColumns"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Table::hasPrimaryKey"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\SchemaDiff::toSql"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Schema\Comparator::diffTable"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::getConnection"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Connection::getEventManager"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::setEventManager"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::getQueryPart"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::getQueryParts"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::resetQueryPart"/>
|
||||
<referencedMethod name="Doctrine\DBAL\Query\QueryBuilder::resetQueryParts"/>
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/6202
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::getColumnTypeSQLSnippets" />
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractMySQLPlatform::getDatabaseNameSQL" />
|
||||
|
||||
<!-- TODO for PHPUnit 10 -->
|
||||
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::withConsecutive"/>
|
||||
|
||||
<!-- TODO: remove in 4.0.0 -->
|
||||
<referencedMethod name="Doctrine\DBAL\Platforms\DB2Platform::getForUpdateSQL"/>
|
||||
</errorLevel>
|
||||
</DeprecatedMethod>
|
||||
<DeprecatedProperty>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/4518
|
||||
-->
|
||||
<file name="src/Connection.php"/>
|
||||
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/4620
|
||||
-->
|
||||
<file name="src/Configuration.php"/>
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/4822
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\SchemaConfig::$hasExplicitForeignKeyIndexes"/>
|
||||
<!--
|
||||
See https://github.com/doctrine/dbal/pull/5058
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Platforms\AbstractPlatform::$doctrineTypeComments"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\Column::$_customSchemaOptions"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\SchemaDiff::$fromSchema"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\ColumnDiff::$oldColumnName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\ColumnDiff::$changedProperties"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\TableDiff::$newName"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\TableDiff::$name"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Schema\SchemaDiff::$orphanedForeignKeys"/>
|
||||
<!--
|
||||
TODO: remove in 4.0.0
|
||||
-->
|
||||
<referencedProperty name="Doctrine\DBAL\Connection::$_eventManager"/>
|
||||
<referencedProperty name="Doctrine\DBAL\Platforms\AbstractPlatform::$_eventManager"/>
|
||||
</errorLevel>
|
||||
</DeprecatedProperty>
|
||||
<DocblockTypeContradiction>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
These issues can be mostly divided in the following categories:
|
||||
1. Union types not supported at the language level (require dropping PHP 7 support)
|
||||
2. Associative arrays with typed elements used instead of classes (require breaking API changes)
|
||||
-->
|
||||
<file name="src/Cache/QueryCacheProfile.php"/>
|
||||
<file name="src/Connection.php"/>
|
||||
<file name="src/Driver/IBMDB2/Statement.php"/>
|
||||
<directory name="src/Driver/PgSQL"/>
|
||||
<file name="src/DriverManager.php"/>
|
||||
<file name="src/Platforms/AbstractMySQLPlatform.php"/>
|
||||
<file name="src/Platforms/AbstractPlatform.php"/>
|
||||
<file name="src/Platforms/SQLServerPlatform.php"/>
|
||||
<file name="src/Platforms/SqlitePlatform.php"/>
|
||||
<file name="src/Schema/Column.php"/>
|
||||
<!--
|
||||
This issue is fixed in 4.0
|
||||
-->
|
||||
<file name="src/Schema/Index.php"/>
|
||||
<!-- See https://github.com/vimeo/psalm/issues/5472 -->
|
||||
<file name="src/Portability/Converter.php"/>
|
||||
<!-- See https://github.com/psalm/psalm-plugin-phpunit/issues/107 -->
|
||||
<file name="tests/Functional/Schema/SchemaManagerFunctionalTestCase.php"/>
|
||||
</errorLevel>
|
||||
</DocblockTypeContradiction>
|
||||
<DuplicateClass>
|
||||
<errorLevel type="suppress">
|
||||
<file name="src/Tools/Console/Command/CommandCompatibility.php"/>
|
||||
</errorLevel>
|
||||
</DuplicateClass>
|
||||
<FalsableReturnStatement>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
Fixing these issues requires an API change
|
||||
-->
|
||||
<file name="src/Driver/PDO/SQLSrv/Connection.php"/>
|
||||
<file name="src/Driver/SQLSrv/Connection.php"/>
|
||||
</errorLevel>
|
||||
</FalsableReturnStatement>
|
||||
<ImplementedReturnTypeMismatch>
|
||||
<errorLevel type="suppress">
|
||||
<!-- Fixing this issue requires an API change -->
|
||||
<file name="src/Driver/OCI8/Connection.php"/>
|
||||
</errorLevel>
|
||||
</ImplementedReturnTypeMismatch>
|
||||
<InvalidArgument>
|
||||
<errorLevel type="suppress">
|
||||
<!-- We're testing with invalid input here. -->
|
||||
<file name="tests/Functional/LegacyAPITest.php"/>
|
||||
<file name="tests/Platforms/AbstractPlatformTestCase.php"/>
|
||||
</errorLevel>
|
||||
</InvalidArgument>
|
||||
<InvalidDocblock>
|
||||
<errorLevel type="suppress">
|
||||
<!-- See https://github.com/vimeo/psalm/issues/5472 -->
|
||||
<file name="src/Portability/Converter.php"/>
|
||||
</errorLevel>
|
||||
</InvalidDocblock>
|
||||
<InvalidNullableReturnType>
|
||||
<errorLevel type="suppress">
|
||||
<!-- See https://github.com/doctrine/dbal/issues/4503 -->
|
||||
<file name="src/Schema/PostgreSQLSchemaManager.php"/>
|
||||
</errorLevel>
|
||||
</InvalidNullableReturnType>
|
||||
<InvalidPropertyAssignmentValue>
|
||||
<errorLevel type="suppress">
|
||||
<!-- Fixing this issue requires an API change -->
|
||||
<file name="src/Driver/PDO/Exception.php"/>
|
||||
</errorLevel>
|
||||
</InvalidPropertyAssignmentValue>
|
||||
<MissingConstructor>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/3712
|
||||
-->
|
||||
<file name="src/Schema/SchemaConfig.php"/>
|
||||
</errorLevel>
|
||||
</MissingConstructor>
|
||||
<NullableReturnStatement>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
Fixing this issue requires an API change
|
||||
-->
|
||||
<file name="src/Driver/AbstractSQLiteDriver.php"/>
|
||||
<!-- See https://github.com/doctrine/dbal/issues/4503 -->
|
||||
<file name="src/Schema/PostgreSQLSchemaManager.php"/>
|
||||
</errorLevel>
|
||||
</NullableReturnStatement>
|
||||
<ParadoxicalCondition>
|
||||
<errorLevel type="suppress">
|
||||
<!-- False positive in deprecation layer. Can be removed in 4.0.x -->
|
||||
<file name="src/Query/QueryBuilder.php" />
|
||||
</errorLevel>
|
||||
</ParadoxicalCondition>
|
||||
<PossiblyInvalidArgument>
|
||||
<errorLevel type="suppress">
|
||||
<!-- PgSql objects are represented as resources in PHP 7.4 -->
|
||||
<referencedFunction name="pg_affected_rows"/>
|
||||
<referencedFunction name="pg_close"/>
|
||||
<referencedFunction name="pg_escape_bytea"/>
|
||||
<referencedFunction name="pg_escape_identifier"/>
|
||||
<referencedFunction name="pg_escape_literal"/>
|
||||
<referencedFunction name="pg_fetch_all"/>
|
||||
<referencedFunction name="pg_fetch_all_columns"/>
|
||||
<referencedFunction name="pg_fetch_assoc"/>
|
||||
<referencedFunction name="pg_fetch_row"/>
|
||||
<referencedFunction name="pg_field_name"/>
|
||||
<referencedFunction name="pg_field_type"/>
|
||||
<referencedFunction name="pg_free_result"/>
|
||||
<referencedFunction name="pg_get_result"/>
|
||||
<referencedFunction name="pg_last_error"/>
|
||||
<referencedFunction name="pg_num_fields"/>
|
||||
<referencedFunction name="pg_query"/>
|
||||
<referencedFunction name="pg_result_error_field"/>
|
||||
<referencedFunction name="pg_send_execute"/>
|
||||
<referencedFunction name="pg_send_prepare"/>
|
||||
<referencedFunction name="pg_send_query"/>
|
||||
<referencedFunction name="pg_version"/>
|
||||
</errorLevel>
|
||||
</PossiblyInvalidArgument>
|
||||
<PossiblyInvalidArrayOffset>
|
||||
<errorLevel type="suppress">
|
||||
<!-- $array[key($array)] is safe. -->
|
||||
<file name="src/Query/QueryBuilder.php"/>
|
||||
</errorLevel>
|
||||
</PossiblyInvalidArrayOffset>
|
||||
<PossiblyNullArgument>
|
||||
<errorLevel type="suppress">
|
||||
<!-- See https://github.com/doctrine/dbal/pull/3488 -->
|
||||
<file name="src/Schema/AbstractSchemaManager.php"/>
|
||||
</errorLevel>
|
||||
</PossiblyNullArgument>
|
||||
<PossiblyUndefinedArrayOffset>
|
||||
<errorLevel type="suppress">
|
||||
<!-- See https://github.com/psalm/psalm-plugin-phpunit/pull/82 -->
|
||||
<file name="tests/Functional/PrimaryReadReplicaConnectionTest.php"/>
|
||||
<file name="tests/Functional/Schema/PostgreSQLSchemaManagerTest.php"/>
|
||||
</errorLevel>
|
||||
</PossiblyUndefinedArrayOffset>
|
||||
<PossiblyNullIterator>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/3712
|
||||
-->
|
||||
<file name="src/Driver/Mysqli/Statement.php"/>
|
||||
</errorLevel>
|
||||
</PossiblyNullIterator>
|
||||
<PossiblyFalseReference>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
oci_new_descriptor() returns OCI-Lob|false on PHP 7 and OCILob|null on PHP 8
|
||||
-->
|
||||
<file name="src/Driver/OCI8/Statement.php"/>
|
||||
</errorLevel>
|
||||
</PossiblyFalseReference>
|
||||
<PropertyNotSetInConstructor>
|
||||
<errorLevel type="suppress">
|
||||
<!-- See https://github.com/psalm/psalm-plugin-phpunit/issues/107 -->
|
||||
<!-- See https://github.com/sebastianbergmann/phpunit/pull/4610 -->
|
||||
<directory name="tests"/>
|
||||
<!-- See https://github.com/doctrine/dbal/issues/4506 -->
|
||||
<file name="src/Schema/ForeignKeyConstraint.php"/>
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/3712
|
||||
-->
|
||||
<file name="src/Schema/Column.php"/>
|
||||
<file name="src/Schema/Identifier.php"/>
|
||||
<file name="src/Schema/Index.php"/>
|
||||
<file name="src/Schema/Schema.php"/>
|
||||
<file name="src/Schema/Sequence.php"/>
|
||||
<file name="src/Schema/Table.php"/>
|
||||
<file name="src/Schema/UniqueConstraint.php"/>
|
||||
<file name="src/Schema/View.php"/>
|
||||
</errorLevel>
|
||||
</PropertyNotSetInConstructor>
|
||||
<!-- This is necessary pre 4.0 -->
|
||||
<RedundantCastGivenDocblockType>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
where we have scalar argument types enforced
|
||||
-->
|
||||
<directory name="src"/>
|
||||
</errorLevel>
|
||||
</RedundantCastGivenDocblockType>
|
||||
<RedundantConditionGivenDocblockType>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
Fixing these issues requires support of union types at the language level
|
||||
or breaking API changes.
|
||||
-->
|
||||
<file name="src/Platforms/AbstractMySQLPlatform.php"/>
|
||||
<file name="tests/Functional/Driver/AbstractDriverTestCase.php"/>
|
||||
|
||||
<!-- We're checking for invalid input. -->
|
||||
<directory name="src/Driver/PgSQL"/>
|
||||
<file name="src/Result.php"/>
|
||||
</errorLevel>
|
||||
</RedundantConditionGivenDocblockType>
|
||||
<RedundantPropertyInitializationCheck>
|
||||
<errorLevel type="suppress">
|
||||
<!-- Running isset() checks on properties that should be initialized by setUp() is fine. -->
|
||||
<directory name="tests"/>
|
||||
|
||||
<!-- Ignore isset() checks in destructors. -->
|
||||
<file name="src/Driver/PgSQL/Connection.php"/>
|
||||
<file name="src/Driver/PgSQL/Statement.php"/>
|
||||
</errorLevel>
|
||||
</RedundantPropertyInitializationCheck>
|
||||
<ReferenceConstraintViolation>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/pull/3836
|
||||
-->
|
||||
<file name="src/Query/QueryBuilder.php"/>
|
||||
</errorLevel>
|
||||
</ReferenceConstraintViolation>
|
||||
<TooManyArguments>
|
||||
<errorLevel type="suppress">
|
||||
<!--
|
||||
This suppression should be removed in 4.0.x
|
||||
See https://github.com/doctrine/dbal/issues/3263
|
||||
-->
|
||||
<file name="src/Platforms/AbstractPlatform.php"/>
|
||||
<!-- See https://github.com/doctrine/dbal/pull/3562 -->
|
||||
<file name="src/Schema/AbstractSchemaManager.php"/>
|
||||
<file name="src/Schema/SqliteSchemaManager.php"/>
|
||||
<!-- See https://github.com/doctrine/dbal/pull/3498 -->
|
||||
<file name="tests/Platforms/AbstractMySQLPlatformTestCase.php"/>
|
||||
</errorLevel>
|
||||
</TooManyArguments>
|
||||
<TypeDoesNotContainType>
|
||||
<errorLevel type="suppress">
|
||||
<!-- On PHP 7.4, pg_fetch_all() might return false for empty result sets. -->
|
||||
<file name="src/Driver/PgSQL/Result.php"/>
|
||||
</errorLevel>
|
||||
</TypeDoesNotContainType>
|
||||
<UndefinedDocblockClass>
|
||||
<errorLevel type="suppress">
|
||||
<!-- See https://github.com/vimeo/psalm/issues/5472 -->
|
||||
<referencedClass name="Doctrine\DBAL\Portability\T"/>
|
||||
<!--
|
||||
The OCI-Lob class was renamed to OCILob in PHP 8 while Psalm infers PHP 7 from composer.json
|
||||
and may not properly interpret the LanguageLevelTypeAware annotation from the stubs.
|
||||
-->
|
||||
<referencedClass name="OCILob"/>
|
||||
</errorLevel>
|
||||
</UndefinedDocblockClass>
|
||||
<InvalidReturnStatement>
|
||||
<errorLevel type="suppress">
|
||||
<!-- lastInsertId has a return type that does not match the one defined in the interface-->
|
||||
<file name="src/Driver/Mysqli/Connection.php"/>
|
||||
<!--
|
||||
This issue should be fixed in 4.0
|
||||
-->
|
||||
<file name="src/Connection.php"/>
|
||||
<file name="src/Statement.php"/>
|
||||
<file name="src/Query/QueryBuilder.php"/>
|
||||
</errorLevel>
|
||||
</InvalidReturnStatement>
|
||||
<InvalidReturnType>
|
||||
<errorLevel type="suppress">
|
||||
<!-- lastInsertId has a return type that does not match the one defined in the interface-->
|
||||
<file name="src/Driver/Mysqli/Connection.php"/>
|
||||
<!--
|
||||
This issue should be fixed in 4.0
|
||||
-->
|
||||
<file name="src/Connection.php"/>
|
||||
<file name="src/Statement.php"/>
|
||||
<file name="src/Query/QueryBuilder.php"/>
|
||||
</errorLevel>
|
||||
</InvalidReturnType>
|
||||
<InvalidScalarArgument>
|
||||
<errorLevel type="suppress">
|
||||
<!-- See https://github.com/doctrine/dbal/pull/3498 -->
|
||||
<file name="tests/Functional/DataAccessTest.php"/>
|
||||
<file name="tests/Platforms/AbstractPlatformTestCase.php"/>
|
||||
<file name="tests/Platforms/DB2PlatformTest.php"/>
|
||||
<file name="tests/Platforms/OraclePlatformTest.php"/>
|
||||
<file name="tests/Platforms/SqlitePlatformTest.php"/>
|
||||
|
||||
<!-- See https://github.com/doctrine/dbal/pull/3574 -->
|
||||
<file name="tests/Query/Expression/ExpressionBuilderTest.php"/>
|
||||
|
||||
<!-- See https://bugs.php.net/bug.php?id=77591 -->
|
||||
<referencedFunction name="db2_autocommit"/>
|
||||
</errorLevel>
|
||||
</InvalidScalarArgument>
|
||||
</issueHandlers>
|
||||
</psalm>
|
||||
@@ -27,9 +27,9 @@ final class ArrayParameterType
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-param self::* $type
|
||||
* @phpstan-param self::* $type
|
||||
*
|
||||
* @psalm-return ParameterType::INTEGER|ParameterType::STRING|ParameterType::ASCII|ParameterType::BINARY
|
||||
* @phpstan-return ParameterType::INTEGER|ParameterType::STRING|ParameterType::ASCII|ParameterType::BINARY
|
||||
*/
|
||||
public static function toElementParameterType(int $type): int
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ use LogicException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class MissingNamedParameter extends LogicException implements Exception
|
||||
{
|
||||
public static function new(string $name): self
|
||||
|
||||
@@ -7,11 +7,7 @@ use LogicException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
class MissingPositionalParameter extends LogicException implements Exception
|
||||
{
|
||||
public static function new(int $index): self
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Cache;
|
||||
|
||||
use Doctrine\DBAL\Exception;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class CacheException extends Exception
|
||||
{
|
||||
/** @return CacheException */
|
||||
|
||||
@@ -53,8 +53,8 @@ use function sprintf;
|
||||
* A database abstraction-level connection that implements features like events, transaction isolation levels,
|
||||
* configuration, emulated transaction nesting, lazy connecting and more.
|
||||
*
|
||||
* @psalm-import-type Params from DriverManager
|
||||
* @psalm-consistent-constructor
|
||||
* @phpstan-import-type Params from DriverManager
|
||||
* @phpstan-consistent-constructor
|
||||
*/
|
||||
class Connection
|
||||
{
|
||||
@@ -136,7 +136,7 @@ class Connection
|
||||
* The parameters used during creation of the Connection instance.
|
||||
*
|
||||
* @var array<string,mixed>
|
||||
* @psalm-var Params
|
||||
* @phpstan-var Params
|
||||
*/
|
||||
private array $params;
|
||||
|
||||
@@ -180,7 +180,7 @@ class Connection
|
||||
* @param Driver $driver The driver to use.
|
||||
* @param Configuration|null $config The configuration, optional.
|
||||
* @param EventManager|null $eventManager The event manager, optional.
|
||||
* @psalm-param Params $params
|
||||
* @phpstan-param Params $params
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@@ -244,7 +244,7 @@ class Connection
|
||||
* @internal
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
* @psalm-return Params
|
||||
* @phpstan-return Params
|
||||
*/
|
||||
public function getParams()
|
||||
{
|
||||
@@ -365,7 +365,7 @@ class Connection
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-assert !null $this->_conn
|
||||
* @phpstan-assert !null $this->_conn
|
||||
*/
|
||||
public function connect()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Doctrine\DBAL;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class ConnectionException extends Exception
|
||||
{
|
||||
/** @return ConnectionException */
|
||||
|
||||
@@ -59,7 +59,7 @@ use function count;
|
||||
*
|
||||
* Instantiation through the DriverManager looks like:
|
||||
*
|
||||
* @psalm-import-type Params from DriverManager
|
||||
* @phpstan-import-type Params from DriverManager
|
||||
* @example
|
||||
*
|
||||
* $conn = DriverManager::getConnection(array(
|
||||
@@ -98,7 +98,7 @@ class PrimaryReadReplicaConnection extends Connection
|
||||
* @internal The connection can be only instantiated by the driver manager.
|
||||
*
|
||||
* @param array<string,mixed> $params
|
||||
* @psalm-param Params $params
|
||||
* @phpstan-param Params $params
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws InvalidArgumentException
|
||||
|
||||
@@ -13,7 +13,7 @@ use SensitiveParameter;
|
||||
* Driver interface.
|
||||
* Interface that all DBAL drivers must implement.
|
||||
*
|
||||
* @psalm-import-type Params from DriverManager
|
||||
* @phpstan-import-type Params from DriverManager
|
||||
*/
|
||||
interface Driver
|
||||
{
|
||||
@@ -21,7 +21,7 @@ interface Driver
|
||||
* Attempts to create a connection with the database.
|
||||
*
|
||||
* @param array<string, mixed> $params All connection parameters.
|
||||
* @psalm-param Params $params All connection parameters.
|
||||
* @phpstan-param Params $params All connection parameters.
|
||||
*
|
||||
* @return DriverConnection The database connection.
|
||||
*
|
||||
|
||||
@@ -32,9 +32,9 @@ final class ExceptionConverter implements ExceptionConverterInterface
|
||||
/** @link http://www.dba-oracle.com/t_error_code_list.htm */
|
||||
public function convert(Exception $exception, ?Query $query): DriverException
|
||||
{
|
||||
/** @psalm-var int|'HY000' $code */ // @phpstan-ignore varTag.type
|
||||
/** @phpstan-var int|'HY000' $code */ // @phpstan-ignore varTag.type
|
||||
$code = $exception->getCode();
|
||||
/** @psalm-suppress NoInterfaceProperties */ // @phpstan-ignore property.notFound, property.notFound
|
||||
// @phpstan-ignore property.notFound, property.notFound
|
||||
if ($code === 'HY000' && isset($exception->errorInfo[1], $exception->errorInfo[2])) {
|
||||
$errorInfo = $exception->errorInfo;
|
||||
$exception = new PDOException($errorInfo[2], $errorInfo[1]);
|
||||
|
||||
@@ -11,8 +11,6 @@ use Throwable;
|
||||
* Base implementation of the {@see Exception} interface.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
abstract class AbstractException extends BaseException implements Exception
|
||||
{
|
||||
|
||||
@@ -6,11 +6,7 @@ namespace Doctrine\DBAL\Driver\AbstractSQLServerDriver\Exception;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class PortWithoutHost extends AbstractException
|
||||
{
|
||||
public static function new(): self
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Doctrine\DBAL\Driver;
|
||||
|
||||
use Throwable;
|
||||
|
||||
/** @psalm-immutable */
|
||||
interface Exception extends Throwable
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -8,11 +8,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class UnknownParameterType extends AbstractException
|
||||
{
|
||||
/** @param mixed $type */
|
||||
|
||||
@@ -6,14 +6,10 @@ namespace Doctrine\DBAL\Driver\IBMDB2\Exception;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class CannotCopyStreamToStream extends AbstractException
|
||||
{
|
||||
/** @psalm-param array{message: string}|null $error */
|
||||
/** @phpstan-param array{message: string}|null $error */
|
||||
public static function new(?array $error): self
|
||||
{
|
||||
$message = 'Could not copy source stream to temporary file';
|
||||
|
||||
@@ -6,14 +6,10 @@ namespace Doctrine\DBAL\Driver\IBMDB2\Exception;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class CannotCreateTemporaryFile extends AbstractException
|
||||
{
|
||||
/** @psalm-param array{message: string}|null $error */
|
||||
/** @phpstan-param array{message: string}|null $error */
|
||||
public static function new(?array $error): self
|
||||
{
|
||||
$message = 'Could not create temporary file';
|
||||
|
||||
@@ -9,11 +9,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
use function db2_conn_error;
|
||||
use function db2_conn_errormsg;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class ConnectionError extends AbstractException
|
||||
{
|
||||
/** @param resource $connection */
|
||||
|
||||
@@ -9,11 +9,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
use function db2_conn_error;
|
||||
use function db2_conn_errormsg;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class ConnectionFailed extends AbstractException
|
||||
{
|
||||
public static function new(): self
|
||||
|
||||
@@ -8,11 +8,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function preg_match;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -6,14 +6,10 @@ namespace Doctrine\DBAL\Driver\IBMDB2\Exception;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class PrepareFailed extends AbstractException
|
||||
{
|
||||
/** @psalm-param array{message: string}|null $error */
|
||||
/** @phpstan-param array{message: string}|null $error */
|
||||
public static function new(?array $error): self
|
||||
{
|
||||
if ($error === null) {
|
||||
|
||||
@@ -9,11 +9,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
use function db2_stmt_error;
|
||||
use function db2_stmt_errormsg;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class StatementError extends AbstractException
|
||||
{
|
||||
/** @param resource|null $statement */
|
||||
|
||||
@@ -9,11 +9,7 @@ use mysqli;
|
||||
use mysqli_sql_exception;
|
||||
use ReflectionProperty;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class ConnectionError extends AbstractException
|
||||
{
|
||||
public static function new(mysqli $connection): self
|
||||
|
||||
@@ -11,11 +11,7 @@ use ReflectionProperty;
|
||||
|
||||
use function assert;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class ConnectionFailed extends AbstractException
|
||||
{
|
||||
public static function new(mysqli $connection): self
|
||||
|
||||
@@ -8,11 +8,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class FailedReadingStreamOffset extends AbstractException
|
||||
{
|
||||
public static function new(int $parameter): self
|
||||
|
||||
@@ -6,11 +6,7 @@ namespace Doctrine\DBAL\Driver\Mysqli\Exception;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class HostRequired extends AbstractException
|
||||
{
|
||||
public static function forPersistentConnection(): self
|
||||
|
||||
@@ -11,11 +11,7 @@ use ReflectionProperty;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class InvalidCharset extends AbstractException
|
||||
{
|
||||
public static function fromCharset(mysqli $connection, string $charset): self
|
||||
|
||||
@@ -8,11 +8,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class InvalidOption extends AbstractException
|
||||
{
|
||||
/** @param mixed $value */
|
||||
|
||||
@@ -8,11 +8,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class NonStreamResourceUsedAsLargeObject extends AbstractException
|
||||
{
|
||||
public static function new(int $parameter): self
|
||||
|
||||
@@ -9,11 +9,7 @@ use mysqli_sql_exception;
|
||||
use mysqli_stmt;
|
||||
use ReflectionProperty;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class StatementError extends AbstractException
|
||||
{
|
||||
public static function new(mysqli_stmt $statement): self
|
||||
|
||||
@@ -66,7 +66,7 @@ final class Statement implements StatementInterface
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
|
||||
{
|
||||
@@ -101,7 +101,7 @@ final class Statement implements StatementInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindValue($param, $value, $type = ParameterType::STRING): bool
|
||||
{
|
||||
|
||||
@@ -9,11 +9,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
use function assert;
|
||||
use function oci_error;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class ConnectionFailed extends AbstractException
|
||||
{
|
||||
public static function new(): self
|
||||
|
||||
@@ -9,11 +9,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
use function assert;
|
||||
use function oci_error;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class Error extends AbstractException
|
||||
{
|
||||
/** @param resource $resource */
|
||||
|
||||
@@ -6,11 +6,7 @@ namespace Doctrine\DBAL\Driver\OCI8\Exception;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class InvalidConfiguration extends AbstractException
|
||||
{
|
||||
public static function forPersistentAndExclusive(): self
|
||||
|
||||
@@ -8,11 +8,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class NonTerminatedStringLiteral extends AbstractException
|
||||
{
|
||||
public static function new(int $offset): self
|
||||
|
||||
@@ -6,11 +6,7 @@ namespace Doctrine\DBAL\Driver\OCI8\Exception;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class SequenceDoesNotExist extends AbstractException
|
||||
{
|
||||
public static function new(): self
|
||||
|
||||
@@ -8,11 +8,7 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class UnknownParameterIndex extends AbstractException
|
||||
{
|
||||
public static function new(int $index): self
|
||||
|
||||
@@ -82,7 +82,7 @@ final class Connection implements ServerInfoAwareConnection
|
||||
*
|
||||
* @throws UnknownParameterType
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function quote($value, $type = ParameterType::STRING)
|
||||
{
|
||||
|
||||
@@ -7,11 +7,7 @@ namespace Doctrine\DBAL\Driver\PDO;
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
use PDOException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class Exception extends AbstractException
|
||||
{
|
||||
public static function new(PDOException $exception): self
|
||||
|
||||
@@ -6,11 +6,7 @@ namespace Doctrine\DBAL\Driver\PDO;
|
||||
|
||||
use Doctrine\DBAL\Driver\Exception as DriverException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class PDOException extends \PDOException implements DriverException
|
||||
{
|
||||
private ?string $sqlState = null;
|
||||
|
||||
@@ -24,11 +24,11 @@ final class ParameterTypeMap
|
||||
/**
|
||||
* Converts DBAL parameter type to PDO parameter type
|
||||
*
|
||||
* @psalm-return PDO::PARAM_*
|
||||
* @phpstan-return PDO::PARAM_*
|
||||
*
|
||||
* @throws UnknownParameterType
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public static function convertParamType(int $type): int
|
||||
{
|
||||
|
||||
@@ -91,7 +91,7 @@ final class Result implements ResultInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @psalm-param PDO::FETCH_* $mode
|
||||
* @phpstan-param PDO::FETCH_* $mode
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
@@ -107,7 +107,7 @@ final class Result implements ResultInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @psalm-param PDO::FETCH_* $mode
|
||||
* @phpstan-param PDO::FETCH_* $mode
|
||||
*
|
||||
* @return list<mixed>
|
||||
*
|
||||
|
||||
@@ -36,7 +36,7 @@ final class Statement extends AbstractStatementMiddleware
|
||||
*
|
||||
* @throws UnknownParameterType
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindParam(
|
||||
$param,
|
||||
@@ -91,7 +91,7 @@ final class Statement extends AbstractStatementMiddleware
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindValue($param, $value, $type = ParameterType::STRING): bool
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ final class Statement implements StatementInterface
|
||||
*
|
||||
* @throws UnknownParameterType
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindValue($param, $value, $type = ParameterType::STRING)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ final class Statement implements StatementInterface
|
||||
*
|
||||
* @throws UnknownParameterType
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindParam(
|
||||
$param,
|
||||
|
||||
@@ -10,11 +10,7 @@ use function pg_result_error_field;
|
||||
use const PGSQL_DIAG_MESSAGE_PRIMARY;
|
||||
use const PGSQL_DIAG_SQLSTATE;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class Exception extends AbstractException
|
||||
{
|
||||
/** @param PgSqlResult|resource $result */
|
||||
|
||||
@@ -9,7 +9,6 @@ use UnexpectedValueException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class UnexpectedValue extends UnexpectedValueException implements Exception
|
||||
{
|
||||
public static function new(string $value, string $type): self
|
||||
|
||||
@@ -6,7 +6,6 @@ use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class UnknownParameter extends AbstractException
|
||||
{
|
||||
public static function new(string $param): self
|
||||
|
||||
@@ -40,7 +40,7 @@ final class Statement implements StatementInterface
|
||||
/** @var array<int, mixed> */
|
||||
private array $parameters = [];
|
||||
|
||||
/** @psalm-var array<int, int> */
|
||||
/** @phpstan-var array<int, int> */
|
||||
private array $parameterTypes = [];
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,11 +11,7 @@ use function sqlsrv_errors;
|
||||
|
||||
use const SQLSRV_ERR_ERRORS;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class Error extends AbstractException
|
||||
{
|
||||
public static function new(): self
|
||||
|
||||
@@ -4,11 +4,7 @@ namespace Doctrine\DBAL\Driver\SQLite3;
|
||||
|
||||
use Doctrine\DBAL\Driver\AbstractException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class Exception extends AbstractException
|
||||
{
|
||||
public static function new(\Exception $exception): self
|
||||
|
||||
@@ -45,7 +45,7 @@ final class Statement implements StatementInterface
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindValue($param, $value, $type = ParameterType::STRING): bool
|
||||
{
|
||||
@@ -66,7 +66,7 @@ final class Statement implements StatementInterface
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
|
||||
{
|
||||
@@ -121,9 +121,9 @@ final class Statement implements StatementInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @psalm-return value-of<self::PARAM_TYPE_MAP>
|
||||
* @phpstan-return value-of<self::PARAM_TYPE_MAP>
|
||||
*
|
||||
* @psalm-assert ParameterType::* $type
|
||||
* @phpstan-assert ParameterType::* $type
|
||||
*/
|
||||
private function convertParamType(int $type): int
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ use function is_a;
|
||||
/**
|
||||
* Factory for creating {@see Connection} instances.
|
||||
*
|
||||
* @psalm-type OverrideParams = array{
|
||||
* @phpstan-type OverrideParams = array{
|
||||
* application_name?: string,
|
||||
* charset?: string,
|
||||
* dbname?: string,
|
||||
@@ -41,7 +41,7 @@ use function is_a;
|
||||
* user?: string,
|
||||
* unix_socket?: string,
|
||||
* }
|
||||
* @psalm-type Params = array{
|
||||
* @phpstan-type Params = array{
|
||||
* application_name?: string,
|
||||
* charset?: string,
|
||||
* dbname?: string,
|
||||
@@ -98,7 +98,7 @@ final class DriverManager
|
||||
* @deprecated Use actual driver names instead.
|
||||
*
|
||||
* @var array<string, string>
|
||||
* @psalm-var array<string, key-of<self::DRIVER_MAP>>
|
||||
* @phpstan-var array<string, key-of<self::DRIVER_MAP>>
|
||||
*/
|
||||
private static array $driverSchemeAliases = [
|
||||
'db2' => 'ibm_db2',
|
||||
@@ -153,9 +153,9 @@ final class DriverManager
|
||||
*
|
||||
* @param Configuration|null $config The configuration to use.
|
||||
* @param EventManager|null $eventManager The event manager to use.
|
||||
* @psalm-param Params $params
|
||||
* @phpstan-param Params $params
|
||||
*
|
||||
* @psalm-return ($params is array{wrapperClass: class-string<T>} ? T : Connection)
|
||||
* @phpstan-return ($params is array{wrapperClass: class-string<T>} ? T : Connection)
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
@@ -201,7 +201,7 @@ final class DriverManager
|
||||
* Returns the list of supported drivers.
|
||||
*
|
||||
* @return string[]
|
||||
* @psalm-return list<key-of<self::DRIVER_MAP>>
|
||||
* @phpstan-return list<key-of<self::DRIVER_MAP>>
|
||||
*/
|
||||
public static function getAvailableDrivers(): array
|
||||
{
|
||||
@@ -211,8 +211,8 @@ final class DriverManager
|
||||
/**
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-assert key-of<self::DRIVER_MAP>|null $driver
|
||||
* @psalm-assert class-string<Driver>|null $driverClass
|
||||
* @phpstan-assert key-of<self::DRIVER_MAP>|null $driver
|
||||
* @phpstan-assert class-string<Driver>|null $driverClass
|
||||
*/
|
||||
private static function createDriver(?string $driver, ?string $driverClass): Driver
|
||||
{
|
||||
@@ -238,11 +238,11 @@ final class DriverManager
|
||||
* updated list of parameters.
|
||||
*
|
||||
* @param mixed[] $params The list of parameters.
|
||||
* @psalm-param Params $params
|
||||
* @phpstan-param Params $params
|
||||
*
|
||||
* @return mixed[] A modified list of parameters with info from a database
|
||||
* URL extracted into indidivual parameter parts.
|
||||
* @psalm-return Params
|
||||
* @phpstan-return Params
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,6 @@ use function is_object;
|
||||
use function spl_object_hash;
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class Exception extends \Exception
|
||||
{
|
||||
public static function notSupported(string $method): self
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Base class for all connection related errors detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class ConnectionException extends DriverException
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class ConnectionLost extends ConnectionException
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Base class for all constraint violation related errors detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class ConstraintViolationException extends ServerException
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class DatabaseDoesNotExist extends DatabaseObjectNotFoundException
|
||||
{
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
* A database object is considered any asset that can be created in a database
|
||||
* such as schemas, tables, views, sequences, triggers, constraints, indexes,
|
||||
* functions, stored procedures etc.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class DatabaseObjectExistsException extends ServerException
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
* A database object is considered any asset that can be created in a database
|
||||
* such as schemas, tables, views, sequences, triggers, constraints, indexes,
|
||||
* functions, stored procedures etc.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class DatabaseObjectNotFoundException extends ServerException
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\DBAL\Exception;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class DatabaseRequired extends Exception
|
||||
{
|
||||
public static function new(string $methodName): self
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a deadlock error of a transaction detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class DeadlockException extends ServerException implements RetryableException
|
||||
{
|
||||
|
||||
@@ -10,8 +10,6 @@ use function assert;
|
||||
|
||||
/**
|
||||
* Base class for all errors detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class DriverException extends Exception implements TheDriverException
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a foreign key constraint violation detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class ForeignKeyConstraintViolationException extends ConstraintViolationException
|
||||
{
|
||||
|
||||
@@ -6,8 +6,6 @@ use Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception to be thrown when invalid arguments are passed to any DBAL API
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class InvalidArgumentException extends Exception
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for an invalid specified field name in a statement detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class InvalidFieldNameException extends ServerException
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ use Doctrine\DBAL\Exception;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class InvalidLockMode extends Exception
|
||||
{
|
||||
public static function fromLockMode(int $lockMode): self
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a lock wait timeout error of a transaction detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class LockWaitTimeoutException extends ServerException implements RetryableException
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class MalformedDsnException extends InvalidArgumentException
|
||||
{
|
||||
public static function new(): self
|
||||
|
||||
@@ -6,11 +6,7 @@ use Doctrine\DBAL\Exception;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
/** @internal */
|
||||
final class NoKeyValue extends Exception
|
||||
{
|
||||
public static function fromColumnCount(int $columnCount): self
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a non-unique/ambiguous specified field name in a statement detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class NonUniqueFieldNameException extends ServerException
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a NOT NULL constraint violation detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class NotNullConstraintViolationException extends ConstraintViolationException
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a write operation attempt on a read-only database element detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class ReadOnlyException extends ServerException
|
||||
{
|
||||
|
||||
@@ -6,8 +6,6 @@ use Throwable;
|
||||
|
||||
/**
|
||||
* Marker interface for all exceptions where retrying the transaction makes sense.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
interface RetryableException extends Throwable
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class SchemaDoesNotExist extends DatabaseObjectNotFoundException
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Base class for all server related errors detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class ServerException extends DriverException
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a syntax error in a statement detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class SyntaxErrorException extends ServerException
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for an already existing table referenced in a statement detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class TableExistsException extends DatabaseObjectExistsException
|
||||
{
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for an unknown table referenced in a statement detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class TableNotFoundException extends DatabaseObjectNotFoundException
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class TransactionRolledBack extends DriverException
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Exception for a unique constraint violation detected in the driver.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
class UniqueConstraintViolationException extends ConstraintViolationException
|
||||
{
|
||||
|
||||
@@ -1794,7 +1794,7 @@ abstract class AbstractPlatform
|
||||
*
|
||||
* @param string $fromClause The FROM clause to append the hint for the given lock mode to
|
||||
* @param int $lockMode One of the Doctrine\DBAL\LockMode::* constants
|
||||
* @psalm-param LockMode::* $lockMode
|
||||
* @phpstan-param LockMode::* $lockMode
|
||||
*/
|
||||
public function appendLockHint(string $fromClause, int $lockMode): string
|
||||
{
|
||||
@@ -2053,7 +2053,7 @@ abstract class AbstractPlatform
|
||||
* on this platform.
|
||||
*
|
||||
* @param int $createFlags
|
||||
* @psalm-param int-mask-of<self::CREATE_*> $createFlags
|
||||
* @phpstan-param int-mask-of<self::CREATE_*> $createFlags
|
||||
*
|
||||
* @return list<string> The list of SQL statements.
|
||||
*
|
||||
@@ -4564,7 +4564,7 @@ abstract class AbstractPlatform
|
||||
* @deprecated Implement {@see createReservedKeywordsList()} instead.
|
||||
*
|
||||
* @return string
|
||||
* @psalm-return class-string<KeywordList>
|
||||
* @phpstan-return class-string<KeywordList>
|
||||
*
|
||||
* @throws Exception If not supported on this platform.
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ use function strtoupper;
|
||||
/**
|
||||
* Abstract interface for a SQL reserved keyword dictionary.
|
||||
*
|
||||
* @psalm-consistent-constructor
|
||||
* @phpstan-consistent-constructor
|
||||
*/
|
||||
abstract class KeywordList
|
||||
{
|
||||
|
||||
@@ -1025,7 +1025,7 @@ class SqlitePlatform extends AbstractPlatform
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param int|null $createFlags
|
||||
* @psalm-param int-mask-of<AbstractPlatform::CREATE_*>|null $createFlags
|
||||
* @phpstan-param int-mask-of<AbstractPlatform::CREATE_*>|null $createFlags
|
||||
*/
|
||||
public function getCreateTableSQL(Table $table, $createFlags = null)
|
||||
{
|
||||
|
||||
@@ -151,7 +151,7 @@ final class Converter
|
||||
* @param T $value
|
||||
*
|
||||
* @return T|string
|
||||
* @psalm-return (T is string ? string : T)
|
||||
* @phpstan-return (T is string ? string : T)
|
||||
*
|
||||
* @template T
|
||||
*/
|
||||
@@ -228,7 +228,7 @@ final class Converter
|
||||
return /**
|
||||
* @param T $value
|
||||
*
|
||||
* @psalm-return (T is false ? false : T)
|
||||
* @phpstan-return (T is false ? false : T)
|
||||
*
|
||||
* @template T
|
||||
*/
|
||||
|
||||
@@ -8,8 +8,6 @@ use Doctrine\DBAL\Types\Type;
|
||||
|
||||
/**
|
||||
* An SQL query together with its bound parameters.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Query
|
||||
{
|
||||
@@ -35,8 +33,6 @@ final class Query
|
||||
/**
|
||||
* @param array<mixed> $params
|
||||
* @param array<Type|int|string|null> $types
|
||||
*
|
||||
* @psalm-suppress ImpurePropertyAssignment
|
||||
*/
|
||||
public function __construct(string $sql, array $params, array $types)
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ class CompositeExpression implements Countable
|
||||
* Retrieves the amount of expressions on composite expression.
|
||||
*
|
||||
* @return int
|
||||
* @psalm-return int<0, max>
|
||||
* @phpstan-return int<0, max>
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function count()
|
||||
|
||||
@@ -113,14 +113,14 @@ class QueryBuilder
|
||||
/**
|
||||
* The type of query this is. Can be select, update or delete.
|
||||
*
|
||||
* @psalm-var self::SELECT|self::DELETE|self::UPDATE|self::INSERT
|
||||
* @phpstan-var self::SELECT|self::DELETE|self::UPDATE|self::INSERT
|
||||
*/
|
||||
private int $type = self::SELECT;
|
||||
|
||||
/**
|
||||
* The state of the query object. Can be dirty or clean.
|
||||
*
|
||||
* @psalm-var self::STATE_*
|
||||
* @phpstan-var self::STATE_*
|
||||
*/
|
||||
private int $state = self::STATE_CLEAN;
|
||||
|
||||
@@ -219,7 +219,7 @@ class QueryBuilder
|
||||
* @deprecated The builder state is an internal concern.
|
||||
*
|
||||
* @return int Either QueryBuilder::STATE_DIRTY or QueryBuilder::STATE_CLEAN.
|
||||
* @psalm-return self::STATE_*
|
||||
* @phpstan-return self::STATE_*
|
||||
*/
|
||||
public function getState()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ use Doctrine\DBAL\Exception;
|
||||
|
||||
use function implode;
|
||||
|
||||
/** @psalm-immutable */
|
||||
class QueryException extends Exception
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -264,7 +264,7 @@ class Result
|
||||
*
|
||||
* @deprecated Use {@see fetchNumeric()}, {@see fetchAssociative()} or {@see fetchOne()} instead.
|
||||
*
|
||||
* @psalm-param FetchMode::* $mode
|
||||
* @phpstan-param FetchMode::* $mode
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
@@ -303,7 +303,7 @@ class Result
|
||||
*
|
||||
* @deprecated Use {@see fetchAllNumeric()}, {@see fetchAllAssociative()} or {@see fetchFirstColumn()} instead.
|
||||
*
|
||||
* @psalm-param FetchMode::* $mode
|
||||
* @phpstan-param FetchMode::* $mode
|
||||
*
|
||||
* @return list<mixed>
|
||||
*
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class ColumnAlreadyExists extends SchemaException
|
||||
{
|
||||
public static function new(string $tableName, string $columnName): self
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class ColumnDoesNotExist extends SchemaException
|
||||
{
|
||||
public static function new(string $columnName, string $table): self
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class ForeignKeyDoesNotExist extends SchemaException
|
||||
{
|
||||
public static function new(string $foreignKeyName, string $table): self
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class IndexAlreadyExists extends SchemaException
|
||||
{
|
||||
public static function new(string $indexName, string $table): self
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class IndexDoesNotExist extends SchemaException
|
||||
{
|
||||
public static function new(string $indexName, string $table): self
|
||||
|
||||
@@ -8,7 +8,6 @@ use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/** @psalm-immutable */
|
||||
final class IndexNameInvalid extends SchemaException
|
||||
{
|
||||
public static function new(string $indexName): self
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user