Skip to content

Refactor ColumnSchema.php#302

Merged
vjik merged 22 commits into
yiisoft:masterfrom
Tigrov:refactor_column_schema
Jul 29, 2023
Merged

Refactor ColumnSchema.php#302
vjik merged 22 commits into
yiisoft:masterfrom
Tigrov:refactor_column_schema

Conversation

@Tigrov

@Tigrov Tigrov commented Jul 25, 2023

Copy link
Copy Markdown
Member
Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

@what-the-diff

what-the-diff Bot commented Jul 25, 2023

Copy link
Copy Markdown

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

codecov Bot commented Jul 25, 2023

Copy link
Copy Markdown

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

@vjik vjik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need changelog

Comment thread src/ColumnSchema.php Outdated
Comment thread src/ColumnSchema.php
Comment thread CHANGELOG.md Outdated
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 <sergey.predvoditelev@gmail.com>
Co-authored-by: Sergei Predvoditelev <sergey.predvoditelev@gmail.com>
Co-authored-by: Sergei Predvoditelev <sergey.predvoditelev@gmail.com>
…actor_column_schema

# Conflicts:
#	src/ColumnSchema.php
Co-authored-by: Sergei Predvoditelev <sergey.predvoditelev@gmail.com>
@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

vjik commented Jul 28, 2023

Copy link
Copy Markdown
Member

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

@vjik

vjik commented Jul 29, 2023

Copy link
Copy Markdown
Member

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

vjik commented Jul 29, 2023

Copy link
Copy Markdown
Member

👍

@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