propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 396 forks source link

Support internal evaluation in conditional evaluation functions #1860

Closed oojacoboo closed 2 years ago

oojacoboo commented 2 years ago

After some of the recent typing improvements, the condition evaluation functions (_if, _elseif) got updated as well, and IMO, should not be typed, allowing for evaluation to happen within the conditional functions.

This PR provides BC and a desired behavior, exactly like the native if statement evaluation.

codecov-commenter commented 2 years ago

Codecov Report

Merging #1860 (1389a99) into master (0cfea4e) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master    #1860   +/-   ##
=========================================
  Coverage     87.58%   87.58%           
  Complexity     7791     7791           
=========================================
  Files           227      227           
  Lines         21105    21109    +4     
=========================================
+ Hits          18485    18489    +4     
  Misses         2620     2620           
Flag Coverage Δ
5-max 87.58% <100.00%> (+<0.01%) :arrow_up:
7.4 87.58% <100.00%> (+<0.01%) :arrow_up:
agnostic 66.91% <100.00%> (+<0.01%) :arrow_up:
mysql 68.84% <0.00%> (-0.02%) :arrow_down:
pgsql 68.86% <0.00%> (-0.02%) :arrow_down:
sqlite 66.68% <0.00%> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Propel/Runtime/ActiveQuery/Criteria.php 87.93% <100.00%> (+0.04%) :arrow_up:
src/Propel/Runtime/Util/PropelConditionalProxy.php 96.96% <100.00%> (+0.19%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0cfea4e...1389a99. Read the comment docs.