Skip to content

Make PresenterBundle directly returnable as a JSON API resource - #342

Merged
rrr63 merged 1 commit into
doppar:4.xfrom
techmahedy:presenter-fix
Sep 28, 2026
Merged

rrr63 merged 1 commit into
doppar:4.xfrom
techmahedy:presenter-fix

Conversation

@techmahedy

@techmahedy techmahedy commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Pull Request Checklist

Q A
Branch? 4.x
Bug fix? Enhancement
New feature? Yes
Deprecations? no
Issues -
License MIT

Description

Summary

  • Automatically wrap paginated bundles with data and meta.
  • Add recursive normalization for nested presenters, models, collections, and JSON values.
  • Support array-backed presenters and validate presenter classes.
  • Standardize pagination metadata with previous_page_url.
  • Add toIterable() for explicit lazy iteration and document true streaming with response()->streamJson().
  • Update Presenter API documentation with professional direct-return and streaming examples.

Verification

  • Presenter tests: 53 passed, 152 assertions.
  • Full PHPUnit suite: 3,604 passed, 6,847 assertions.
  • Skipped: 672 environment-dependent tests.
  • PHPStan: no errors.

Checklist

  • Tests have been added or updated
  • Documentation has been updated if necessary
  • Code follows the project coding standards
  • All tests pass locally

@techmahedy techmahedy added the enhancement New feature or request label Sep 27, 2026
@techmahedy techmahedy self-assigned this Sep 27, 2026

@rrr63 rrr63 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @techmahedy

@rrr63
rrr63 merged commit c86f31b into doppar:4.x Sep 28, 2026
16 checks passed
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.

3 participants