You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: MissingConstructor - lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php:13:13 - Doctrine\DBAL\Driver\SQLSrv\LastInsertId has an uninitialized property Doctrine\DBAL\Driver\SQLSrv\LastInsertId::$id, but no constructor (see https://psalm.dev/073)
private $id;
Fixing this issue requires understanding how the value of $id is used by the consumers but it isn't. SQLSrv\Connection::lastInsertId() doesn't use it:
$stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?');
$stmt->execute([$name]);
} else {
$stmt = $this->query('SELECT @@IDENTITY');
}
if ($stmt instanceof Result) {
return$stmt->fetchOne();
}
return$stmt->fetchColumn();
}
The class and all its usages are internal and can be safely removed in 3.1.0. Removing it in 2.12.x is undesired since not all class usages have been marked as such since 2.0.0.
The text was updated successfully, but these errors were encountered:
Psalm level 2:
Fixing this issue requires understanding how the value of
$id
is used by the consumers but it isn't.SQLSrv\Connection::lastInsertId()
doesn't use it:dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php
Lines 143 to 157 in 493dc96
The class and all its usages are internal and can be safely removed in
3.1.0
. Removing it in2.12.x
is undesired since not all class usages have been marked as such since2.0.0
.The text was updated successfully, but these errors were encountered: