propelorm / Propel2

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

Bugfix: convert UUID_BINARY in pk on update #1981

Open mringler opened 1 year ago

mringler commented 1 year ago

Fixes issue in comment.

I have also changed the UuidConverter, so that it handles null values. The initial idea was to be strict with the type, but it is not robust and lead to ugly code, where the null check has to be performed manually every time.

Includes test fix from #1980, otherwise tests would fail.

codecov-commenter commented 1 year ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (4f36eea) 89.27% compared to head (6b29c6d) 89.27%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1981 +/- ## ========================================= Coverage 89.27% 89.27% - Complexity 8049 8052 +3 ========================================= Files 232 232 Lines 24519 24527 +8 ========================================= + Hits 21889 21897 +8 Misses 2630 2630 ``` | [Flag](https://app.codecov.io/gh/propelorm/Propel2/pull/1981/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | Coverage Δ | | |---|---|---| | [5-max](https://app.codecov.io/gh/propelorm/Propel2/pull/1981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | `89.27% <93.75%> (+<0.01%)` | :arrow_up: | | [7.4](https://app.codecov.io/gh/propelorm/Propel2/pull/1981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | `89.27% <93.75%> (+<0.01%)` | :arrow_up: | | [agnostic](https://app.codecov.io/gh/propelorm/Propel2/pull/1981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | `67.47% <68.75%> (+<0.01%)` | :arrow_up: | | [mysql](https://app.codecov.io/gh/propelorm/Propel2/pull/1981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | `69.81% <87.50%> (+<0.01%)` | :arrow_up: | | [pgsql](https://app.codecov.io/gh/propelorm/Propel2/pull/1981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | `69.92% <87.50%> (+0.08%)` | :arrow_up: | | [sqlite](https://app.codecov.io/gh/propelorm/Propel2/pull/1981/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | `67.88% <87.50%> (+0.08%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/propelorm/Propel2/pull/1981?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | Coverage Δ | | |---|---|---| | [src/Propel/Runtime/Util/UuidConverter.php](https://app.codecov.io/gh/propelorm/Propel2/pull/1981?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9SdW50aW1lL1V0aWwvVXVpZENvbnZlcnRlci5waHA=) | `80.64% <100.00%> (+2.86%)` | :arrow_up: | | [src/Propel/Generator/Builder/Om/ObjectBuilder.php](https://app.codecov.io/gh/propelorm/Propel2/pull/1981?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvQnVpbGRlci9PbS9PYmplY3RCdWlsZGVyLnBocA==) | `93.86% <90.00%> (+<0.01%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.