Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce consistent constructor in dynamically instantiated classes #5166

Merged
merged 1 commit into from Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Doctrine/DBAL/Connection.php
Expand Up @@ -41,6 +41,7 @@
* lazy connecting and more.
*
* @psalm-import-type Params from DriverManager
* @psalm-consistent-constructor
*/
class Connection implements DriverConnection
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php
Expand Up @@ -8,6 +8,8 @@

/**
* Abstract interface for a SQL reserved keyword dictionary.
*
* @psalm-consistent-constructor
Copy link
Member Author

@morozov morozov Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed in 4.0.x thanks to #4583.

*/
abstract class KeywordList
{
Expand Down
9 changes: 0 additions & 9 deletions psalm.xml.dist
Expand Up @@ -389,15 +389,6 @@
<file name="lib/Doctrine/DBAL/Driver/PDOStatement.php"/>
</errorLevel>
</UnimplementedInterfaceMethod>
<UnsafeInstantiation>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/issues/4510 -->
<file name="lib/Doctrine/DBAL/Platforms/AbstractPlatform.php"/>
<file name="lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php"/>
<!-- See https://github.com/doctrine/dbal/issues/4511 -->
<file name="lib/Doctrine/DBAL/DriverManager.php"/>
</errorLevel>
</UnsafeInstantiation>
<InvalidArgument>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/pull/3803 -->
Expand Down