Skip to content

Fix README immutable API examples#77

Merged
dereuromark merged 1 commit intomasterfrom
fix/readme-immutable-api
Feb 8, 2026
Merged

Fix README immutable API examples#77
dereuromark merged 1 commit intomasterfrom
fix/readme-immutable-api

Conversation

@dereuromark
Copy link
Contributor

The README examples used Dto::create('Article')->immutable() which incorrectly calls the static factory method immutable(string $name) as a no-argument instance method.

The correct APIs are:

  • Dto::immutable('Article') — static factory (used in all other docs)
  • Dto::create('Article')->asImmutable() — instance method

This fixes the 3 occurrences in the Immutable DTOs section to use Dto::immutable('Name'), consistent with ConfigBuilder.md and all other documentation.

The README used Dto::create('Name')->immutable() which calls the static
factory method as an instance method with wrong signature. The correct
APIs are Dto::immutable('Name') or Dto::create('Name')->asImmutable(),
consistent with the ConfigBuilder docs.
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.56%. Comparing base (4496cdb) to head (13c3f29).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #77   +/-   ##
=========================================
  Coverage     82.56%   82.56%           
  Complexity     1333     1333           
=========================================
  Files            40       40           
  Lines          3252     3252           
=========================================
  Hits           2685     2685           
  Misses          567      567           

☔ View full report in Codecov by Sentry.
📢 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 afc49c4 into master Feb 8, 2026
12 checks passed
@dereuromark dereuromark deleted the fix/readme-immutable-api branch February 8, 2026 10:54
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.

1 participant