Skip to content

Remove Fractal - #2523

Open
lancepioch wants to merge 1 commit into
api/laravel-data-migrationfrom
api/fractal-teardown
Open

Remove Fractal#2523
lancepioch wants to merge 1 commit into
api/laravel-data-migrationfrom
api/fractal-teardown

Conversation

@lancepioch

@lancepioch lancepioch commented Aug 18, 2026

Copy link
Copy Markdown
Member

Top of the API freeze stack, on #2521. With every endpoint rendering through the laravel-data layer, this deletes what nothing uses anymore: the 31 transformer classes, the custom Fractal wrapper and PanelSerializer, config/fractal.php, and the spatie/laravel-fractal dependency along with its league/fractal chain. The three Fractal-specific Scramble extensions are replaced by a single PanelResponseTypeInfer that follows the PanelResponse fluent chain and derives attribute schemas from the Data class properties, including MapOutputName renames, nullable and Optional keys, enum backing types, and the same envelope, pagination, and addMeta shapes as before. Test helpers that compared endpoint JSON against transformer output now build expected attributes through the Data classes, which is the same container path the envelope takes in production.

The test fixture suite passes with zero snapshot changes, the full Integration and Unit suites are green, and ApiDocumentationTest passes against the new inference. One known spec softening: array-shaped fields like limits document as generic arrays rather than keyed objects, since the reflection does not parse array-shape docblocks; the old extension occasionally did better there and that is the upgrade path if it matters.

@lancepioch
lancepioch marked this pull request as ready for review August 18, 2026 05:51
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 691a710d-a36a-4306-94a1-a34c74bcfa29

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lancepioch lancepioch changed the title Delete the Fractal layer now that laravel-data serves the API Replace Fractal with DTO's Aug 18, 2026
@lancepioch
lancepioch force-pushed the api/fractal-teardown branch from 8675649 to a895544 Compare August 18, 2026 12:47
@lancepioch
lancepioch force-pushed the api/fractal-teardown branch from a895544 to 749034b Compare August 18, 2026 12:50
@lancepioch
lancepioch force-pushed the api/fractal-teardown branch 2 times, most recently from f047b9b to f67b060 Compare August 18, 2026 13:21
@lancepioch
lancepioch force-pushed the api/fractal-teardown branch from f67b060 to f6440a1 Compare August 18, 2026 13:33
@lancepioch lancepioch changed the title Replace Fractal with DTO's Remove Fractal Aug 18, 2026
@lancepioch
lancepioch force-pushed the api/fractal-teardown branch from f6440a1 to 9349e21 Compare August 21, 2026 13:21
@lancepioch
lancepioch force-pushed the api/fractal-teardown branch 2 times, most recently from 0ecbc9e to 31643bb Compare August 21, 2026 17:01
Removes app/Transformers, the custom Fractal wrapper and PanelSerializer, the
config file, and the three Fractal specific Scramble extensions, and drops
spatie/laravel-fractal from composer. A new PanelResponseTypeInfer extension
documents PanelResponse endpoints instead, deriving attribute schemas from the
Data class properties including MapOutputName renames and Optional keys, and
reproducing the envelope, pagination, and addMeta shapes the old extension
modeled. Test helpers that compared responses against transformer output now
build their expected attributes through the Data classes, the same path the
envelope takes in production.

The contract freeze suite passes untouched, the full Integration and Unit
suites are green, and ApiDocumentationTest passes against the new inference.
@lancepioch
lancepioch force-pushed the api/fractal-teardown branch from 31643bb to 83acf73 Compare August 21, 2026 17:10
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