Skip to content

Fix false positive on jsonMatches#179

Merged
nikophil merged 3 commits intozenstruck:1.xfrom
flohw:issues/127
Aug 26, 2025
Merged

Fix false positive on jsonMatches#179
nikophil merged 3 commits intozenstruck:1.xfrom
flohw:issues/127

Conversation

@flohw
Copy link
Contributor

@flohw flohw commented Aug 26, 2025

relates to #127

As far as I understood it, it's due to Assert::is which is the same as assertSame of phpunit.

I switched to Assert::equals which is the same as assertEquals of phpunit.

The error will now be throw only if two array:list are compared.

As it's not an issue for a json object to have a different index order, this fix is fine to me. Let me know if there is another option you have in mind.

The message comes from zenstruck/assert library but I don't think we can improve that...

@nikophil
Copy link
Member

I'm all good for that fix 👍

but why did you change the workflow?

@flohw
Copy link
Contributor Author

flohw commented Aug 26, 2025

Tried to fix the issues mentioned in #178 with nearest commit from 1/12/2022 (latest change on the line).

As it's not working, I will revert that. :-)

@nikophil
Copy link
Member

I'm merging this PR, but I'd really like that we fix the CI before any further release

@nikophil nikophil merged commit 5105bdb into zenstruck:1.x Aug 26, 2025
4 of 20 checks passed
@flohw flohw deleted the issues/127 branch August 26, 2025 12:29
@oxodao
Copy link

oxodao commented Feb 2, 2026

Feels similar to #164 so it might fix it too but tbf I do not remember much about my issue so maybe not 😅 I'll need to take a look at it again

kbond added a commit that referenced this pull request Feb 12, 2026
* 1.x:
  bot: fix cs [skip ci]
  changelog: update [skip ci]
  chore: support Symfony 8 (#184)
  fix: Remove deprecated `ReflectionProperty::setAccessible()` (#187)
  bot: fix cs [skip ci]
  bot: fix cs [skip ci]
  fix: resolve false positive on jsonMatches (#179)
  bot: fix cs [skip ci]
  doc: fix PHP syntax in `README.md` on use functions (#170)
  bot: sync with template [skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants