-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bump cs libs #3983
Bump cs libs #3983
Conversation
2d70fc8
to
08487f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's double-check all the newly introduced assert()
. Many of them look redundant.
tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php
Outdated
Show resolved
Hide resolved
foreach ($this->constraints as $fkConstraint) { | ||
assert($fkConstraint instanceof ForeignKeyConstraint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily for now, but would it be possible to document the property as SplObjectStorage<ForeignKeyConstraint>
and avoid runtime assertions? I may have tried earlier but not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documenting it as SplObjectStorage<ForeignKeyConstraint, Table>
makes Psalm happy, but Phpstan gives the following error: PHPDoc tag @var for property Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::$constraints contains unresolvable type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, it might be something like SplObjectStorage&Iterable<ForeignKeyConstraint>
.
Looks good, @greg0ire 👍 Please group/squash the commits. |
Upstream libs and tools have improvements that make them unnecessary.
Done! Down from 16 to 10 commits |
I'm ignoring Scrutinizer on this one! Thanks @morozov for your review! |
Summary
Using the latest coding style should make #3977 a lot easier