-
Notifications
You must be signed in to change notification settings - Fork 121
Bump PHPStan to level 8 and fix all errors #1027
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
Closed
+605
−98
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
74a30e9
Add additional check for empty array
3d97a9b
Merge pull request #1028 from cakephp/fix/adapter-empty-not-null-conf…
dereuromark 69dde0e
add using when changing column type to json (#1031)
swiffer 944c4e2
Fix CI failures on MySQL/MariaDB (#1034)
dereuromark d6720e1
Fix TEXT column variants not round-tripping correctly (#1032)
dereuromark 9d74ef7
Add fixed option for binary column type (#1014)
dereuromark ca1b74e
Fix misleading next steps message in upgrade command (#1037)
dereuromark 8d27e00
Fix upgrade command not matching plugins with slashes (#1039)
dereuromark 612764c
Add TYPE_BIT constant to AdapterInterface (#1013)
dereuromark 69446ab
Bump PHPStan level +1
027c7c8
Make props non-nullable
65dcf7e
Add null guards for getConstraint() in BakeMigrationDiffCommand
e143793
Fix nullable return types in Column and ForeignKey
dc5ea90
Fix null safety in Db adapters and domain classes
61d82f1
Fix remaining PHPStan level 8 null safety issues
2ceab0b
Replace assert with RuntimeException in AbstractAdapter::getConnection()
fe754cd
Use truthiness checks for optional nullable getters
84e4c4f
Throw on null for required Column::getName() and FK::getReferencedTab…
14b239a
Narrow ForeignKey::getColumns() return type and remove null guards
fd66adf
Narrow Column::getName() return type and remove dead null checks
7bb0e02
Add null guards for column diff loop in BakeMigrationDiffCommand
4582350
Cast nullable getName() to string for drop FK/index instructions
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ includes: | |
| - phpstan-baseline.neon | ||
|
|
||
| parameters: | ||
| level: 7 | ||
| level: 8 | ||
| paths: | ||
| - src/ | ||
| bootstrapFiles: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -41,7 +41,7 @@ public function __construct(TableMetadata $table, string $columnName, Column $co | |||||
| $this->column = $column; | ||||||
|
|
||||||
| // if the name was omitted use the existing column name | ||||||
| if ($column->getName() === null || strlen((string)$column->getName()) === 0) { | ||||||
| if (strlen($column->getName()) === 0) { | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| $column->setName($columnName); | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.