Skip to content

Conversation

droath
Copy link
Contributor

@droath droath commented Aug 14, 2025

What:

  • Bug Fix
  • New Feature

Description:

I ran into an issue that relates to the bug described at https://github.com/openai‑php/client/issues/581. This PR fixes that issue, and all PHPUnit tests have passed with these changes.

References:

fixes: #581

…ng responses, updating `Fakeable::fake()` and its attribute builder accordingly.
@droath droath changed the title #581: Add OverrideStrategy enum and enable merge/replace #581: Add OverrideStrategy enum for the fakeable trait to support merge/replace Aug 14, 2025
Copy link
Collaborator

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea! Can you peek CI failures and I'll do a deeper investigation? Knowing when I changed the entire codebase to replace - I had like 14 failures. So if we could add one test testing test code - that would be perfect too

@droath
Copy link
Contributor Author

droath commented Aug 15, 2025

Okay—I was able to get the unit tests and linting all passing locally. I've added a test case that will ensure it works as expected when using either the replace or merge strategy.

Copy link
Collaborator

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! thanks.

@iBotPeaches iBotPeaches added this to the v0.16.0 milestone Aug 15, 2025
@iBotPeaches iBotPeaches merged commit 32e8a0b into openai-php:main Aug 15, 2025
12 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.

[Bug]: Fakeable trait incorrectly merges array properties causing contaminated test responses
2 participants