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

Update psalm types #267

Merged
merged 5 commits into from
Aug 9, 2023
Merged

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Aug 2, 2023

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

@what-the-diff
Copy link

what-the-diff bot commented Aug 2, 2023

PR Summary

  • Annotations Improved for Array Types
    The team added and updated type annotations—a way of clarifying the kind of data we're dealing with—for various arrays in the 'Schema.php' file.

  • Normalization of Key Case for Arrays
    Some methods have been updated to ensure that the 'key case' of arrays—basically, how their identifiers are formatted—is consistent. This helps keep our code neat and readable.

  • Updated Nullable Property
    In certain methods, we've modified a property to be 'nullable', which means it can accept the absence of a value. This offers more flexibility to our code.

  • Renaming and Annotation Updates for Variables
    Various variables in multiple methods were renamed to better reflect their purpose and improve the understanding, also their type annotations were updated. For instance, $foreignKeysList is now $foreignKeys which is a simpler and more intuitive name.

  • Unused Variables Removed
    Unused variables can lead to confusion and are best removed if they are not serving their purpose. The team eliminated some such variables in the 'getPragmaIndexInfo()' method which makes our code more efficient and straightforward.

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (b172ec9) 98.21% compared to head (30f38a7) 98.21%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #267   +/-   ##
=========================================
  Coverage     98.21%   98.21%           
  Complexity      325      325           
=========================================
  Files            17       17           
  Lines          1006     1006           
=========================================
  Hits            988      988           
  Misses           18       18           
Files Changed Coverage Δ
src/Schema.php 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tigrov Tigrov marked this pull request as ready for review August 2, 2023 04:44
@vjik
Copy link
Member

vjik commented Aug 2, 2023

@Tigrov A new psalm error has appeared:

Error: src/Schema.php:388:71: PossiblyNullArgument: Argument 3 of Yiisoft\Db\Schema\TableSchemaInterface::compositeForeignKey cannot be null, possibly null value provided

Can you fix it?

src/Schema.php Outdated Show resolved Hide resolved
src/Schema.php Outdated Show resolved Hide resolved
@vjik vjik added the status:code review The pull request needs review. label Aug 2, 2023
@vjik vjik requested a review from a team August 2, 2023 08:38
@terabytesoftw terabytesoftw merged commit aa85945 into yiisoft:master Aug 9, 2023
16 of 17 checks passed
@Tigrov Tigrov deleted the update_psalm_types branch August 18, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants