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

Typecast refactoring #225

Merged
merged 14 commits into from
Jul 15, 2023
Merged

Typecast refactoring #225

merged 14 commits into from
Jul 15, 2023

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Jul 4, 2023

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

@what-the-diff
Copy link

what-the-diff bot commented Jul 4, 2023

PR Summary

  • Additions to .gitignore file

    Certain files like phpunit.xml and .phpunit.result.cache related to unit testing in PHP have been added to the .gitignore file. This means, those files will be ignored and not included in the repository. This usually helps to keep the codebase cleaner and more consistent.

  • Refactoring and Enhancements in Schema.php

    1. Refactoring of createColumnSchema method

      The createColumnSchema function has been improved to use a new object called ColumnSchema when creating column schemas. This contributes to cleaner code and is a more structured way of managing these values than assigning them manually.

    2. Addition of normalizeDefaultValue method

      A new function normalizeDefaultValue has been added that reformats the default column value according to its type. It ensures that the default values put into the database columns are in a format compatible with its specified data type.

    3. Refactoring of extractColumnType and extractColumnSize methods

      The methods extractColumnType and extractColumnSize have been updated to accept a ColumnSchemaInterface object instead of individual parameters. This can lead to better management of column data and can reduce the potential errors that come with dealing with multiple parameters.

    4. Modification of extractColumnSize method

      The extractColumnSize method has been adjusted to use the getColumnSchema methods to fetch size, precision, and scale values. This can bring greater accuracy when working with these values and overall result in more reliable schema management.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

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

Comparison is base (b38e1df) 98.16% compared to head (a898c01) 98.29%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #225      +/-   ##
============================================
+ Coverage     98.16%   98.29%   +0.12%     
+ Complexity      195      183      -12     
============================================
  Files            16       16              
  Lines           601      586      -15     
============================================
- Hits            590      576      -14     
+ Misses           11       10       -1     
Impacted Files Coverage Δ
src/Schema.php 100.00% <100.00%> (+0.38%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Tigrov Tigrov marked this pull request as ready for review July 6, 2023 07:25
@terabytesoftw terabytesoftw added the status:code review The pull request needs review. label Jul 6, 2023
@darkdef
Copy link
Contributor

darkdef commented Jul 9, 2023

Please add line to changelog

@darkdef
Copy link
Contributor

darkdef commented Jul 13, 2023

@Tigrov please resolve conflicts

@Tigrov
Copy link
Member Author

Tigrov commented Jul 14, 2023

@Tigrov Tigrov requested a review from darkdef July 14, 2023 06:41
@darkdef darkdef merged commit fdd6eb0 into yiisoft:master Jul 15, 2023
16 of 17 checks passed
@darkdef
Copy link
Contributor

darkdef commented Jul 15, 2023

Thanks

@Tigrov Tigrov deleted the typecast_refactoring branch July 17, 2023 07:30
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