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

Handle PostgreSQL binary resources #229

Merged
merged 5 commits into from
May 26, 2024
Merged

Handle PostgreSQL binary resources #229

merged 5 commits into from
May 26, 2024

Conversation

jankal
Copy link
Contributor

@jankal jankal commented Nov 12, 2023

Description

PostgreSQL (PDO) returns binary values as resources. Converting those to UUIDs is possible with this change.

Motivation and context

Fixes #225 where the uuid_binary type was unusable with PostgreSQL.

How has this been tested?

Added 1 new unit test, cross-checked with MySQL 8 and MariaDB 10.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

@jankal jankal marked this pull request as ready for review November 12, 2023 23:54
@jankal jankal requested a review from ramsey as a code owner November 12, 2023 23:54
@thePanz
Copy link

thePanz commented Jan 16, 2024

Thanks for the PR @jankal , this solves the issue!

Any updates on this PR @ramsey ?

@ramsey
Copy link
Owner

ramsey commented Jan 17, 2024

Thanks for the reminder, @thePanz. I'll try to take a look very soon.

@tasselchof tasselchof mentioned this pull request Apr 18, 2024
7 tasks
Copy link

codecov bot commented May 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.38%. Comparing base (61ce825) to head (956bcf3).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #229      +/-   ##
============================================
+ Coverage     90.25%   90.38%   +0.12%     
- Complexity       75       76       +1     
============================================
  Files             7        7              
  Lines           154      156       +2     
============================================
+ Hits            139      141       +2     
  Misses           15       15              
Files Coverage Δ
src/UuidBinaryType.php 87.87% <100.00%> (+0.78%) ⬆️

@ramsey
Copy link
Owner

ramsey commented May 26, 2024

Sorry for the delay. Thank you for contributing! 🎉

@ramsey ramsey merged commit 5eae94d into ramsey:main May 26, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PostgreSQL UUID type returns a binary stream; DB to PHP conversion is always null
3 participants