Replace Fractal with Laravel Data #265

Open
opened 2026-02-05 17:21:48 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @alexevladgabriel on GitHub (Mar 2, 2025).

Originally assigned to: @notAreYouScared, @alexevladgabriel, @Copilot on GitHub.

This change ensure that Scramble docs can read the Request & Response (input/outputs), making easier for new developers to onboard over the current API implementations.

Replacing Fractal with Laravel Data comes with the following benefits:

  • Improvements over current maintability for long term
  • OpenAPI & Typescript Schema's (3rd party integrations)

This change will be backward compatible with Pterodactyl (1.X) for a mid-term period, to let developers adapt to the new ecosystem changes.


Current plan for development:

  1. Make our own Data class that extends the original. Add a setFractal(bool $value = true) and bool $isFractal property to it.
  2. Override the generation of the array return to put it into the same shape as a Fractal collection and resources if $isFractal is true.
  3. Replace all old array $params and returns with Data classes for the old api.
  4. Optionally create a new V2 api that has none of the Fractal shenanigans.
Originally created by @alexevladgabriel on GitHub (Mar 2, 2025). Originally assigned to: @notAreYouScared, @alexevladgabriel, @Copilot on GitHub. This change ensure that Scramble docs can read the Request & Response (input/outputs), making easier for new developers to onboard over the current API implementations. Replacing Fractal with Laravel Data comes with the following benefits: - Improvements over current maintability for long term - OpenAPI & Typescript Schema's (3rd party integrations) This change will be backward compatible with Pterodactyl (1.X) for a mid-term period, to let developers adapt to the new ecosystem changes. ___ ### Current plan for development: 1. Make our own Data class that extends the original. Add a `setFractal(bool $value = true)` and `bool $isFractal` property to it. 2. Override the generation of the array return to put it into the same shape as a Fractal collection and resources if $isFractal is true. 3. Replace all old array $params and returns with Data classes for the old api. 4. Optionally create a new V2 api that has none of the Fractal shenanigans.
OVERLORD added the 🟡 medium label 2026-02-05 17:21:48 +03:00
Author
Owner

@lancepioch commented on GitHub (Mar 7, 2025):

Adding the package in #1065

@lancepioch commented on GitHub (Mar 7, 2025): Adding the package in #1065
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#265