Skip to content

Prepare the next branch for 2.0 - #29

Merged
dereuromark merged 4 commits into
nextfrom
chore/next-cleanup
Oct 11, 2026
Merged

dereuromark merged 4 commits into
nextfrom
chore/next-cleanup

Conversation

@dereuromark

Copy link
Copy Markdown
Contributor

Brings next in line with master and gets the branch ready for the 2.0 release.

  • Merges master, which carries the 1.4.1 fix for float operands in mod() and pow(). Floats are rejected on this branch, so the tests from that fix now assert the rejection, including the call from a file without strict_types. Source and docs keep the 2.0 versions.
  • Adds the dev-next branch alias 2.x-dev, so dependents can require ^2.0 as a dev version without an inline alias.
  • Runs CI on pushes to next. Until now only pull requests against it were checked.
  • Drops ext-json from require. The extension has been part of PHP itself since 8.0.
  • README: names the 1.4 releases as the home of the 1.x API and links the upgrade guide.
  • Keeps renovate.json out of the dist archive.

Not included: the docs site still deploys from master only, so it shows the 1.x docs until next is merged.

Both methods typed their operand as self|string|int. For a caller that
does not declare strict types, PHP converts a float to an integer
before the method runs, so mod(2.5) calculated mod 2 and pow(0.5)
calculated the power of 0. The only sign was a PHP deprecation notice.
Callers with strict types got a TypeError instead.

The types now list float, like every other operation. mod() handles it
as the value it is, and pow() reports a fractional exponent with the
same error a string such as '0.5' already produced.

tests/data/float_operands.php has no strict_types on purpose, to
exercise the call the way an affected caller makes it.
Stop mod() and pow() from truncating float operands
Float operands are rejected on this branch, so the float tests from master
now assert that instead of the 1.x results.
Alias the branch as 2.x-dev so dependents can require it, run CI on pushes
to it, and drop ext-json, which is always part of PHP 8. The README names
the 1.4 releases for the 1.x API, and renovate.json stays out of the dist.
@dereuromark dereuromark added the enhancement New feature or request label Oct 11, 2026
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.59%. Comparing base (f4a3e59) to head (a8ab63a).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##               next      #29   +/-   ##
=========================================
  Coverage     95.59%   95.59%           
  Complexity      201      201           
=========================================
  Files             1        1           
  Lines           454      454           
=========================================
  Hits            434      434           
  Misses           20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dereuromark
dereuromark merged commit d7e20c1 into next Oct 11, 2026
7 checks passed
@dereuromark
dereuromark deleted the chore/next-cleanup branch October 11, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant