diff --git a/lib/Doctrine/DBAL/Cache/CacheException.php b/lib/Doctrine/DBAL/Cache/CacheException.php index 636c948a616..6bb5d1b5f6b 100644 --- a/lib/Doctrine/DBAL/Cache/CacheException.php +++ b/lib/Doctrine/DBAL/Cache/CacheException.php @@ -4,6 +4,9 @@ use Doctrine\DBAL\DBALException; +/** + * @psalm-immutable + */ class CacheException extends DBALException { /** diff --git a/lib/Doctrine/DBAL/ConnectionException.php b/lib/Doctrine/DBAL/ConnectionException.php index d3d11bc6743..47c6ed9a0d4 100644 --- a/lib/Doctrine/DBAL/ConnectionException.php +++ b/lib/Doctrine/DBAL/ConnectionException.php @@ -2,6 +2,9 @@ namespace Doctrine\DBAL; +/** + * @psalm-immutable + */ class ConnectionException extends DBALException { /** diff --git a/lib/Doctrine/DBAL/DBALException.php b/lib/Doctrine/DBAL/DBALException.php index fe706daffcf..b2852e55182 100644 --- a/lib/Doctrine/DBAL/DBALException.php +++ b/lib/Doctrine/DBAL/DBALException.php @@ -22,6 +22,9 @@ use function spl_object_hash; use function sprintf; +/** + * @psalm-immutable + */ class DBALException extends Exception { /** diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php index b01c4552a23..662d8533a8e 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php @@ -4,6 +4,9 @@ use Exception; +/** + * @psalm-immutable + */ class DB2Exception extends Exception { } diff --git a/lib/Doctrine/DBAL/Exception/ConnectionException.php b/lib/Doctrine/DBAL/Exception/ConnectionException.php index e96a29191e4..6b7c901a345 100644 --- a/lib/Doctrine/DBAL/Exception/ConnectionException.php +++ b/lib/Doctrine/DBAL/Exception/ConnectionException.php @@ -4,6 +4,8 @@ /** * Base class for all connection related errors detected in the driver. + * + * @psalm-immutable */ class ConnectionException extends DriverException { diff --git a/lib/Doctrine/DBAL/Exception/ConstraintViolationException.php b/lib/Doctrine/DBAL/Exception/ConstraintViolationException.php index 3959f39af95..435e8b19f16 100644 --- a/lib/Doctrine/DBAL/Exception/ConstraintViolationException.php +++ b/lib/Doctrine/DBAL/Exception/ConstraintViolationException.php @@ -4,6 +4,8 @@ /** * Base class for all constraint violation related errors detected in the driver. + * + * @psalm-immutable */ class ConstraintViolationException extends ServerException { diff --git a/lib/Doctrine/DBAL/Exception/DatabaseObjectExistsException.php b/lib/Doctrine/DBAL/Exception/DatabaseObjectExistsException.php index 7e0ba0299e9..fb19f5baed5 100644 --- a/lib/Doctrine/DBAL/Exception/DatabaseObjectExistsException.php +++ b/lib/Doctrine/DBAL/Exception/DatabaseObjectExistsException.php @@ -8,6 +8,8 @@ * 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 { diff --git a/lib/Doctrine/DBAL/Exception/DatabaseObjectNotFoundException.php b/lib/Doctrine/DBAL/Exception/DatabaseObjectNotFoundException.php index 3342bce8d58..2d3d78d9930 100644 --- a/lib/Doctrine/DBAL/Exception/DatabaseObjectNotFoundException.php +++ b/lib/Doctrine/DBAL/Exception/DatabaseObjectNotFoundException.php @@ -8,6 +8,8 @@ * 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 { diff --git a/lib/Doctrine/DBAL/Exception/DeadlockException.php b/lib/Doctrine/DBAL/Exception/DeadlockException.php index fd0550a56b0..f36be908a4a 100644 --- a/lib/Doctrine/DBAL/Exception/DeadlockException.php +++ b/lib/Doctrine/DBAL/Exception/DeadlockException.php @@ -4,6 +4,8 @@ /** * Exception for a deadlock error of a transaction detected in the driver. + * + * @psalm-immutable */ class DeadlockException extends ServerException implements RetryableException { diff --git a/lib/Doctrine/DBAL/Exception/DriverException.php b/lib/Doctrine/DBAL/Exception/DriverException.php index d3753329882..2a3338733db 100644 --- a/lib/Doctrine/DBAL/Exception/DriverException.php +++ b/lib/Doctrine/DBAL/Exception/DriverException.php @@ -7,6 +7,8 @@ /** * Base class for all errors detected in the driver. + * + * @psalm-immutable */ class DriverException extends DBALException { diff --git a/lib/Doctrine/DBAL/Exception/ForeignKeyConstraintViolationException.php b/lib/Doctrine/DBAL/Exception/ForeignKeyConstraintViolationException.php index 48d736f9e28..f1a612b2184 100644 --- a/lib/Doctrine/DBAL/Exception/ForeignKeyConstraintViolationException.php +++ b/lib/Doctrine/DBAL/Exception/ForeignKeyConstraintViolationException.php @@ -4,6 +4,8 @@ /** * Exception for a foreign key constraint violation detected in the driver. + * + * @psalm-immutable */ class ForeignKeyConstraintViolationException extends ConstraintViolationException { diff --git a/lib/Doctrine/DBAL/Exception/InvalidArgumentException.php b/lib/Doctrine/DBAL/Exception/InvalidArgumentException.php index 5d431e6031d..5d20332af09 100644 --- a/lib/Doctrine/DBAL/Exception/InvalidArgumentException.php +++ b/lib/Doctrine/DBAL/Exception/InvalidArgumentException.php @@ -6,6 +6,8 @@ /** * Exception to be thrown when invalid arguments are passed to any DBAL API + * + * @psalm-immutable */ class InvalidArgumentException extends DBALException { diff --git a/lib/Doctrine/DBAL/Exception/InvalidFieldNameException.php b/lib/Doctrine/DBAL/Exception/InvalidFieldNameException.php index d960feaf869..234941bf64a 100644 --- a/lib/Doctrine/DBAL/Exception/InvalidFieldNameException.php +++ b/lib/Doctrine/DBAL/Exception/InvalidFieldNameException.php @@ -4,6 +4,8 @@ /** * Exception for an invalid specified field name in a statement detected in the driver. + * + * @psalm-immutable */ class InvalidFieldNameException extends ServerException { diff --git a/lib/Doctrine/DBAL/Exception/LockWaitTimeoutException.php b/lib/Doctrine/DBAL/Exception/LockWaitTimeoutException.php index bfc3a498a3c..62aa10fca87 100644 --- a/lib/Doctrine/DBAL/Exception/LockWaitTimeoutException.php +++ b/lib/Doctrine/DBAL/Exception/LockWaitTimeoutException.php @@ -4,6 +4,8 @@ /** * Exception for a lock wait timeout error of a transaction detected in the driver. + * + * @psalm-immutable */ class LockWaitTimeoutException extends ServerException implements RetryableException { diff --git a/lib/Doctrine/DBAL/Exception/NonUniqueFieldNameException.php b/lib/Doctrine/DBAL/Exception/NonUniqueFieldNameException.php index fd56f89691f..9ff66273395 100644 --- a/lib/Doctrine/DBAL/Exception/NonUniqueFieldNameException.php +++ b/lib/Doctrine/DBAL/Exception/NonUniqueFieldNameException.php @@ -4,6 +4,8 @@ /** * Exception for a non-unique/ambiguous specified field name in a statement detected in the driver. + * + * @psalm-immutable */ class NonUniqueFieldNameException extends ServerException { diff --git a/lib/Doctrine/DBAL/Exception/NotNullConstraintViolationException.php b/lib/Doctrine/DBAL/Exception/NotNullConstraintViolationException.php index e327bc94d4d..113b737bb22 100644 --- a/lib/Doctrine/DBAL/Exception/NotNullConstraintViolationException.php +++ b/lib/Doctrine/DBAL/Exception/NotNullConstraintViolationException.php @@ -4,6 +4,8 @@ /** * Exception for a NOT NULL constraint violation detected in the driver. + * + * @psalm-immutable */ class NotNullConstraintViolationException extends ConstraintViolationException { diff --git a/lib/Doctrine/DBAL/Exception/ReadOnlyException.php b/lib/Doctrine/DBAL/Exception/ReadOnlyException.php index a846f2501c8..621363af9b8 100644 --- a/lib/Doctrine/DBAL/Exception/ReadOnlyException.php +++ b/lib/Doctrine/DBAL/Exception/ReadOnlyException.php @@ -4,6 +4,8 @@ /** * Exception for a write operation attempt on a read-only database element detected in the driver. + * + * @psalm-immutable */ class ReadOnlyException extends ServerException { diff --git a/lib/Doctrine/DBAL/Exception/ServerException.php b/lib/Doctrine/DBAL/Exception/ServerException.php index c88c3863b62..194bc9cdd34 100644 --- a/lib/Doctrine/DBAL/Exception/ServerException.php +++ b/lib/Doctrine/DBAL/Exception/ServerException.php @@ -4,6 +4,8 @@ /** * Base class for all server related errors detected in the driver. + * + * @psalm-immutable */ class ServerException extends DriverException { diff --git a/lib/Doctrine/DBAL/Exception/SyntaxErrorException.php b/lib/Doctrine/DBAL/Exception/SyntaxErrorException.php index 0b413b71971..2603ac27435 100644 --- a/lib/Doctrine/DBAL/Exception/SyntaxErrorException.php +++ b/lib/Doctrine/DBAL/Exception/SyntaxErrorException.php @@ -4,6 +4,8 @@ /** * Exception for a syntax error in a statement detected in the driver. + * + * @psalm-immutable */ class SyntaxErrorException extends ServerException { diff --git a/lib/Doctrine/DBAL/Exception/TableExistsException.php b/lib/Doctrine/DBAL/Exception/TableExistsException.php index ff0df89afac..b6575a25d00 100644 --- a/lib/Doctrine/DBAL/Exception/TableExistsException.php +++ b/lib/Doctrine/DBAL/Exception/TableExistsException.php @@ -4,6 +4,8 @@ /** * Exception for an already existing table referenced in a statement detected in the driver. + * + * @psalm-immutable */ class TableExistsException extends DatabaseObjectExistsException { diff --git a/lib/Doctrine/DBAL/Exception/TableNotFoundException.php b/lib/Doctrine/DBAL/Exception/TableNotFoundException.php index aeaa0057d49..445a38b5ab1 100644 --- a/lib/Doctrine/DBAL/Exception/TableNotFoundException.php +++ b/lib/Doctrine/DBAL/Exception/TableNotFoundException.php @@ -4,6 +4,8 @@ /** * Exception for an unknown table referenced in a statement detected in the driver. + * + * @psalm-immutable */ class TableNotFoundException extends DatabaseObjectNotFoundException { diff --git a/lib/Doctrine/DBAL/Exception/UniqueConstraintViolationException.php b/lib/Doctrine/DBAL/Exception/UniqueConstraintViolationException.php index c762ad3c78a..f38045a3d0b 100644 --- a/lib/Doctrine/DBAL/Exception/UniqueConstraintViolationException.php +++ b/lib/Doctrine/DBAL/Exception/UniqueConstraintViolationException.php @@ -4,6 +4,8 @@ /** * Exception for a unique constraint violation detected in the driver. + * + * @psalm-immutable */ class UniqueConstraintViolationException extends ConstraintViolationException { diff --git a/lib/Doctrine/DBAL/Query/QueryException.php b/lib/Doctrine/DBAL/Query/QueryException.php index 3fcb3b480ec..604bcb7565c 100644 --- a/lib/Doctrine/DBAL/Query/QueryException.php +++ b/lib/Doctrine/DBAL/Query/QueryException.php @@ -5,6 +5,9 @@ use Doctrine\DBAL\DBALException; use function implode; +/** + * @psalm-immutable + */ class QueryException extends DBALException { /** diff --git a/lib/Doctrine/DBAL/SQLParserUtilsException.php b/lib/Doctrine/DBAL/SQLParserUtilsException.php index a500ed52dd3..0857fce8c36 100644 --- a/lib/Doctrine/DBAL/SQLParserUtilsException.php +++ b/lib/Doctrine/DBAL/SQLParserUtilsException.php @@ -6,6 +6,8 @@ /** * Doctrine\DBAL\ConnectionException + * + * @psalm-immutable */ class SQLParserUtilsException extends DBALException { diff --git a/lib/Doctrine/DBAL/Schema/SchemaException.php b/lib/Doctrine/DBAL/Schema/SchemaException.php index 213d218475b..68d778f53fd 100644 --- a/lib/Doctrine/DBAL/Schema/SchemaException.php +++ b/lib/Doctrine/DBAL/Schema/SchemaException.php @@ -6,6 +6,9 @@ use function implode; use function sprintf; +/** + * @psalm-immutable + */ class SchemaException extends DBALException { public const TABLE_DOESNT_EXIST = 10; diff --git a/lib/Doctrine/DBAL/Sharding/ShardingException.php b/lib/Doctrine/DBAL/Sharding/ShardingException.php index b46bda2ff0d..4d9f41a30e3 100644 --- a/lib/Doctrine/DBAL/Sharding/ShardingException.php +++ b/lib/Doctrine/DBAL/Sharding/ShardingException.php @@ -6,6 +6,8 @@ /** * Sharding related Exceptions + * + * @psalm-immutable */ class ShardingException extends DBALException { diff --git a/lib/Doctrine/DBAL/Types/ConversionException.php b/lib/Doctrine/DBAL/Types/ConversionException.php index 82c6df912b7..ba8c2a9192e 100644 --- a/lib/Doctrine/DBAL/Types/ConversionException.php +++ b/lib/Doctrine/DBAL/Types/ConversionException.php @@ -15,6 +15,8 @@ /** * Conversion Exception is thrown when the database to PHP conversion fails. + * + * @psalm-immutable */ class ConversionException extends DBALException {