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

ColumnSchema classes for performance of typecasting #315

Merged
merged 23 commits into from
May 30, 2024

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Sep 1, 2023

To get 100% patch coverage it needs to run tests on i386 architecture or with PHP 32bit

Add to PHP actions config:

matrix:
    arch: ["amd64", "i386"]

But I think it is not necessary, to avoid many running tests.

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues yiisoft/db#737

@what-the-diff
Copy link

what-the-diff bot commented Sep 1, 2023

PR Summary

  • New Files for Different Column Definitions
    Several new files were added, each defining a different type of column in your database, like an array column, big integer column, binary column, bit column, boolean column, and so on. To be specific, each file contains a specific class that describes how each column type should behave, including methods to manipulate and retrieve data.

  • ColumnSchema.php Modifications
    Changes were made to direct specific column types to their corresponding newly created classes, as well as adding a deprecation notice.

  • Schema update for New Column Classes
    Our Schema.php file now supports these new column classes, ensuring that when a column is discovered it uses these new classes to define the column's behavior. For increased safety, some methods related to columns are now private or protected, preventing misuse.

  • Testing of New Classes
    Updates were made to our ColumnSchemaTest.php file to include tests for these new classes, ensuring they work as expected. The test cases for the array, big integer, binary, bit, boolean, and integer column classes have been added.

  • Additional Changes
    Some extra changes were made to handle the new column definitions correctly, including modifying the test structure and cleaning up some data.

  • Removal of Key in Test Provider
    The dimension key was removed from a default value array in a method within a test Provider file to match the new setup.

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Attention: Patch coverage is 96.79144% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 99.26%. Comparing base (f2e0dd9) to head (d9c8f53).

Files Patch % Lines
src/Column/ArrayColumnSchema.php 97.14% 2 Missing ⚠️
src/Column/StructuredColumnSchema.php 92.85% 2 Missing ⚠️
src/Schema.php 96.82% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##              master     #315      +/-   ##
=============================================
- Coverage     100.00%   99.26%   -0.74%     
- Complexity       257      282      +25     
=============================================
  Files             18       23       +5     
  Lines            745      821      +76     
=============================================
+ Hits             745      815      +70     
- Misses             0        6       +6     

☔ 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 September 1, 2023 15:39
@Tigrov Tigrov added the status:under development Someone is working on a pull request. label Jan 31, 2024
@Tigrov Tigrov added status:code review The pull request needs review. and removed status:under development Someone is working on a pull request. labels May 5, 2024
@Tigrov Tigrov merged commit 85c27c5 into yiisoft:master May 30, 2024
55 of 65 checks passed
@Tigrov Tigrov deleted the column_type_classes2 branch May 30, 2024 08:55
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