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

Refactor ColumnSchema.php #302

Merged
merged 22 commits into from
Jul 29, 2023
Merged

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Jul 25, 2023

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

@what-the-diff
Copy link

what-the-diff bot commented Jul 25, 2023

PR Summary

  • Updating dbTypecast method in ColumnSchema class
    The information provided on the different potential return values for this method has been simplified to indicate that various types of data can be returned.

  • Changes to dbTypecast method's default case
    The method no longer calls the typecast method in its default scenario, and will return the original value.

  • Adjusting phpTypecast method's handling of arrays
    When the value encountered by this method is an array, it will now return null rather than the original array as it did previously.

  • Change in visibility of phpTypecastValue method
    This method has changed from a protected method, meaning it could be accessed by classes that inherit from the class it is defined in, to a private method, restricting its access to only within the class itself.

  • Changing visibility of getArrayParser method
    Just like phpTypecastValue, this method has also been made private from its previous state of being protected. Its access now is limited to the class where it's defined.

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.16% 🎉

Comparison is base (e5de2fc) 99.83% compared to head (6862299) 100.00%.
Report is 4 commits behind head on master.

❗ Current head 6862299 differs from pull request most recent head f2dddb8. Consider uploading reports for the commit f2dddb8 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##             master      #302      +/-   ##
=============================================
+ Coverage     99.83%   100.00%   +0.16%     
+ Complexity      201       200       -1     
=============================================
  Files            13        13              
  Lines           599       596       -3     
=============================================
- Hits            598       596       -2     
+ Misses            1         0       -1     
Files Changed Coverage Δ
src/Builder/ArrayExpressionBuilder.php 100.00% <100.00%> (ø)
src/Builder/JsonExpressionBuilder.php 100.00% <100.00%> (ø)
src/ColumnSchema.php 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ 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 July 25, 2023 09:52
Copy link
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

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

Need changelog

Tigrov and others added 15 commits July 28, 2023 11:36
* Refactor ArrayExpressionBuilder.php

* Update

* Update `InvalidArgumentException` message

* Remove extra check, PDO will throw an exception

* Change type of params from `ArrayExpression` to `ExpressionInterface`

* Update

* Update

* Correct `getTypehint` to `getTypeHint`

* Change ExpressionInterface to ArrayExpression

* Change @param ArrayExpression $expression and add changelog

* Remove @psalm-param ArrayExpression $expression

* Update CHANGELOG.md

---------

Co-authored-by: Sergei Predvoditelev <[email protected]>
Co-authored-by: Sergei Predvoditelev <[email protected]>
Co-authored-by: Sergei Predvoditelev <[email protected]>
…actor_column_schema

# Conflicts:
#	src/ColumnSchema.php
Co-authored-by: Sergei Predvoditelev <[email protected]>
@vjik vjik added the status:code review The pull request needs review. label Jul 28, 2023
@vjik vjik requested a review from a team July 28, 2023 14:05
@vjik
Copy link
Member

vjik commented Jul 28, 2023

For view correct changes in this PR use this link: master...Tigrov:refactor_column_schema

@vjik
Copy link
Member

vjik commented Jul 29, 2023

Seems, static analysis fail in CI because used non-stable version of yiisoft/di (I'm created issue)

@vjik vjik merged commit adcb2ee into yiisoft:master Jul 29, 2023
@vjik
Copy link
Member

vjik commented Jul 29, 2023

👍

@Tigrov Tigrov deleted the refactor_column_schema branch July 30, 2023 02:42
Tigrov added a commit to Tigrov/db-pgsql that referenced this pull request Jul 30, 2023
Tigrov added a commit to Tigrov/db-pgsql that referenced this pull request Jul 30, 2023
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.

3 participants