Skip to content

Merge master into next - #33

Merged
dereuromark merged 5 commits into
nextfrom
merge/master-into-next
Oct 11, 2026
Merged

dereuromark merged 5 commits into
nextfrom
merge/master-into-next

Conversation

@dereuromark

Copy link
Copy Markdown
Contributor

Merges master (1.4.1 plus #32) into next, so 2.0 has the documentation corrections and the docs build check in CI.

Taken over

  • Documentation corrections: the complete first script in Getting started, the installation page as the single install recipe, the corrected alternatives table, the CakePHP setup link.
  • The Documentation CI job, read-only workflow permissions and disabled checkout credentials.
  • Docblock wording in Decimal.php for equals(), isZero(), isNegative(), isPositive(), pow() and mod().
  • The 1.4.1 note in the upgrade guide, and a 1.4.2 note for the comparison fix.

Not taken over

The comparison fix from #32. It covers a value that holds more decimals than its scale, such as Decimal::create('1.9', 0). 2.0 refuses to create that value with a RoundingNecessaryException, so compareTo() stays as it is and the test for it is dropped.

Adapted for 2.0

Where master describes 1.x behavior, the text follows what next does:

  • create() returns a Decimal of the called class as is, where master says it clones.
  • round() always yields the requested scale. The note on legacy ROUND_FLOOR and ROUND_CEIL behavior is left out.
  • In the alternatives table, rem($value) maps to mod($value), which is exact without a scale argument, and Decimal::avg() maps to average($values, $scale, $roundMode).
  • The warning about a scale of 0, strict mode and the "Coming in 2.0" table stay out. The 2.0 upgrade section covers them.
  • The sentence on tryCreate() returning null for negative scales is left out: on next a negative scale throws.

Correct decimal documentation and add verified site checks
Brings the documentation corrections, the docs build check in CI and the
1.4.1 and 1.4.2 notes to next.

The comparison fix from master is not taken over. It covers a value that
holds more decimals than its scale, which 2.0 refuses to create, so its
test is dropped and compareTo() stays as it is. Docblock and docs wording
is adapted where master describes 1.x behavior: create() returns the same
instance, round() always yields the requested scale, mod() is exact
without a scale argument.
@dereuromark dereuromark added the documentation Improvements or additions to documentation 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.81%. Comparing base (4f4244d) to head (bb701a0).

Additional details and impacted files
@@            Coverage Diff            @@
##               next      #33   +/-   ##
=========================================
  Coverage     95.81%   95.81%           
  Complexity      201      201           
=========================================
  Files             1        1           
  Lines           454      454           
=========================================
  Hits            435      435           
  Misses           19       19           

☔ 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 c634e6b into next Oct 11, 2026
8 checks passed
@dereuromark
dereuromark deleted the merge/master-into-next branch October 11, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant