Skip to content

fix(Differ): use strict identity for old/new comparison to avoid nume…#96

Merged
jfcherng merged 1 commit into
v7from
fix/compare
Jun 22, 2026
Merged

fix(Differ): use strict identity for old/new comparison to avoid nume…#96
jfcherng merged 1 commit into
v7from
fix/compare

Conversation

@jfcherng

Copy link
Copy Markdown
Owner

…ric string coercion

PHP's spaceship operator treats numeric strings like '0' and '00000' as equal, causing empty diffs. Replace with === and refactor to bool $oldNewAreSame property.

Deprecate getOldNewComparison() in favor of getOldNewAreSame().

Fixes #94

…ric string coercion

PHP's spaceship operator treats numeric strings like '0' and '00000'
as equal, causing empty diffs. Replace with === and refactor to
bool $oldNewAreSame property.

Deprecate getOldNewComparison() in favor of getOldNewAreSame().

Fixes #94

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
@jfcherng jfcherng merged commit bc8c1bb into v7 Jun 22, 2026
8 of 9 checks passed
@jfcherng jfcherng deleted the fix/compare branch June 22, 2026 12:56
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.

Zero comparison will result in an empty diff

1 participant