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 #724

Merged
merged 11 commits into from
Jul 13, 2023
Merged

Typecast refactoring #724

merged 11 commits into from
Jul 13, 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

  • Changes to .gitignore
    We've added instructions to our system to ignore tracking changes in certain project files (/phpunit.xml, /.phpunit.result.cache, /tests/Support/runtime/). This means these files won't be disrupted by automated processes, reducing the chance of unintentional modifications.

  • Updates to CHANGELOG.md

    • We've updated our project change log to reflect recent modifications:
      • Change Remove legacy sintaxis. #722: We're phasing out usage of an older, more complex way to handle data conversion in favour of using Param.
      • Change Typecast refactoring #724: We've overhauled our data conversion system to make it more efficient and reliable, a process referred to as 'Typecast refactoring'.
  • Additions to src/Schema/AbstractColumnSchema.php

    • We've added a new function (typecast) that changes data types based on certain conditions. Here's what it does:
      • Returns null if the incoming data is negligible for non-text types.
      • For certain types, it simply returns the value as is.
      • When dealing with text-type data, it changes various data types to their respective string equivalents. For instance, numerals true or false get converted to their '1' or '0' counterparts.
      • For integer and double types, it returns their numeral equivalents.
      • For boolean type, it considers various values as true except for one ("\0").
      • In all other cases, it leaves the data as is.

These changes collectively make dealing with various data types in our project easier and more manageable.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (25c1e46) 99.77% compared to head (a79a6b7) 99.76%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #724      +/-   ##
============================================
- Coverage     99.77%   99.76%   -0.01%     
+ Complexity     1281     1272       -9     
============================================
  Files            63       63              
  Lines          3045     3042       -3     
============================================
- Hits           3038     3035       -3     
  Misses            7        7              
Impacted Files Coverage Δ
src/Schema/AbstractColumnSchema.php 100.00% <100.00%> (ø)

☔ 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:23
@terabytesoftw terabytesoftw added the status:code review The pull request needs review. label Jul 6, 2023
@darkdef darkdef merged commit 13ddab5 into yiisoft:master Jul 13, 2023
85 of 86 checks passed
@darkdef
Copy link
Contributor

darkdef commented Jul 13, 2023

Thanks

@Tigrov Tigrov deleted the typecast_refactoring branch July 14, 2023 05:40
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