-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Upgrade Psalm to its latest version #4222
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
Conversation
6b44573
to
61cb2af
Compare
61cb2af
to
220d524
Compare
What should be done about that error? We can either widen the type in interface, but the description says it is supposed to be a |
Let's suppress for now. This API was attempted to be fixed for a couple of years now and it's really questionable per se. |
220d524
to
7bbc71f
Compare
@@ -10,12 +10,12 @@ class Connection extends PDOConnection | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function quote($value, $type = ParameterType::STRING) |
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 use $value
everywhere. The fact that only input needs to be quoted is $1M misconception.
@@ -52,13 +52,13 @@ public static function assertValidIdentifier($identifier) | |||
/** | |||
* {@inheritDoc} | |||
*/ | |||
public function getSubstringExpression($value, $position, $length = null) | |||
public function getSubstringExpression($value, $from, $length = null) |
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.
It cannot be fixed without a BC break
@@ -384,11 +384,11 @@ public function getListSequencesSQL($database) | |||
/** | |||
* {@inheritDoc} | |||
*/ | |||
protected function _getCreateTableSQL($table, array $columns, array $options = []) | |||
protected function _getCreateTableSQL($tableName, array $columns, array $options = []) |
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.
This is against the approach taken in #4172:
Argument names have been simplified where possible (e.g.
dropTable($tableName)
→dropTable($name)
).
Unless we're dealing both with a table and a name in the same context, there's no much point in being too specific IMO.
@@ -1105,9 +1105,9 @@ public function getDateTimeTzFormatString() | |||
/** | |||
* {@inheritDoc} | |||
*/ | |||
public function getEmptyIdentityInsertSQL($quotedTableName, $quotedIdentifierColumnName) |
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.
The "quoted" attribute should stay as is. It's a rabbit hole but it has its meaning. I can provide more details if necessary.
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.
I trust you :)
7bbc71f
to
ae046fe
Compare
* @param mixed[][] $columns | ||
* @param mixed[] $options | ||
* | ||
* @return string[] | ||
*/ | ||
protected function _getCreateTableSQL($tableName, array $columns, array $options = []) | ||
protected function _getCreateTableSQL($name, array $columns, array $options = []) |
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.
Ah this must a reason why the tests fail… $name
is already taken
ae046fe
to
b062513
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.
Should the Psalm version constraint be updated as well? Otherwise, looks good.
Sure, let's prevent accidental downgrades 👍 |
b062513
to
b5e1599
Compare
No description provided.