Scramble 0.13.x is here with full type inference and closure routes support!
Learn more

Releases

Keep up with regular Scramble releases.
Latest versions:
Scramble: v0.13.2
Scramble PRO: v0.8.1
October 2025
Oct 30, 2025
v0.13.2

What’s Changed

  • Added support of variables used in validation rules by @chaikivskyi in #1005
  • Fixed isInstanceOf could’ve returned null for template type.
  • Fixed infinite recursion for cases when @mixin of the class alias is used on the same class 😵‍💫

New Contributors

  • @chaikivskyi made their first contribution in #1005
Oct 26, 2025
v0.8.1 PRO

What’s Changed

  • Added #[Hidden] attribute support
  • Fixed explicit IncludedRelationship include was adding *Count and *Exists allowed includes by @romalytvynenko in #81
  • Fixed undocumented allowed* calls on query builders created outside of the controller by @romalytvynenko in #82
Oct 26, 2025
v0.13.1

What’s Changed

  • Expose more internal type inference related APIs by @romalytvynenko in #1006
Oct 24, 2025
v0.8.0 PRO

What’s Changed

  • Compatibility with Scramble 0.13.x
Oct 24, 2025
v0.13.0

While this release has no breaking changes itself, the resulting OpenAPI document may be more accurate for your specific application, and hence may be considered as the one containing breaking changes. Due to this, I’ve decided to mark this release as 0.13.x. It means that you’ll need to explicitly update the version in composer.json if you rely on ^0.12.0 or earlier versions.

Full type inference

Starting from Laravel 11.x (and especially from 12.x), Laravel comes with great and accurate PHPDoc annotations. With Scramble supporting these types, you’ll enjoy focusing more on the app codebase rather than writing type annotations.

use App\Models\Appointment;

Route::get('/appointments', function (Request $request) {
    $items = Appointment::query()
        ->where('status', $request->string('status'))
        ->get();

    return $items;
});

In this case, Scramble can infer the type of $items: it is a collection of appointments, specifically: Illuminate\Database\Eloquent\Collection<int, App\Models\Appointment>!

This gives nice documentation just by analyzing the source, without any additional annotations.

Closure-based routes support

Previously, Scramble only supported controller-based routes. Now, the routes defined using closures also get their share of love and are documented automatically.

Closure-based routes support all the attributes (for manual parameters, headers, responses, etc.) that are supported by controller-based methods.

What’s Changed

  • Add closure routes support by @romalytvynenko in #971
  • Infer null coalescing operator by @jrdnrc in #980
  • Added analysis of types coming from PHPDoc annotations in vendor by @romalytvynenko in #988
  • Support more integer types by @Neol3108 in #996
  • Add Request@user method support for better post-installation experience by @romalytvynenko in #1001

New Contributors

  • @Neol3108 made their first contribution in #996
Oct 20, 2025
v0.12.36

What’s Changed

  • Added config for flattening query object parameters
  • Replace api path only if it appears at the beginning
  • Improve date_format rule documentation
  • Added enum names extension property support
  • Add support for wildcard array keys in validation rules
September 2025
Sep 24, 2025
v0.7.18 PRO

What’s Changed

  • Add custom paginationInformation method support
Sep 24, 2025
v0.12.35

What’s Changed

  • Remove MissingValue in combination with Carbon/ CarbonImmutable when transforming by @chrisvanlier2005 in #960
  • Add paginationInformation resource’s method support by @romalytvynenko in #962
  • Add support for transforming @var list<T> by @chrisvanlier2005 in #961
  • Pin @stoplight/elements to 8.4.2 to avoid tags duplication by @romalytvynenko in #964
  • Add unset support and provide $paginated type to paginationInformation by @romalytvynenko in #968
Sep 9, 2025
v0.12.34

What’s Changed

  • Patch for Stoplight Elements UI dark mode 🫠 by @romalytvynenko in #953
Sep 9, 2025
v0.12.33

What’s Changed

  • Added Rule::when support by @romalytvynenko in #951
Sep 8, 2025
v0.7.17 PRO

What’s Changed

  • Updated templates inference for JSON API collections
Sep 8, 2025
v0.12.32

What’s Changed

  • Add support operationId support via Endpoint attribute by @jrdnrc in #941
  • Fix throw statements showing as unknown “string” type in match expressions by @finalgamer in #944
  • Improve type template inference by @romalytvynenko in #948
  • Fix Rule::requiredIf treated as required by @apasquini95 in #939

New Contributors

  • @jrdnrc made their first contribution in #941
  • @finalgamer made their first contribution in #944
  • @apasquini95 made their first contribution in #939
August 2025
Aug 24, 2025
v0.7.16 PRO

What’s Changed

  • Fixed paginator links in JSON API resource collection being not marked as optional when a resource didn’t have relationships
Aug 24, 2025
v0.7.15 PRO

What’s Changed

  • Fixed for JSON API identifiers for resource collections relationships
  • Compatibility fixes with Scramble 0.12.31 by @romalytvynenko in #72
Aug 24, 2025
v0.12.31

What’s Changed

  • Improve API resources and resource collections inference and documentation by @romalytvynenko in #937
  • Add ability to configure inference (internal) by @romalytvynenko in #940
Aug 14, 2025
v0.7.14 PRO

What’s Changed

  • Fixed paginated data collections documentation when the type is inferred
  • Correct JSON API response content type (application/vnd.api+json) by @romalytvynenko in #70
Aug 14, 2025
v0.12.30

What’s Changed

  • Add support for transforming inferred paginator types by @romalytvynenko in #931
  • Add support for transforming response type with headers to schema and improve collection responses type to schema transformation by @romalytvynenko in #932
  • Add support for system color theme by @macbookandrew in #923

New Contributors

  • @macbookandrew made their first contribution in #923
Aug 12, 2025
v0.7.13 PRO

Paginated data collections inference

Previously, you had to manually specify the type of data collection returned from a controller method to generate documentation for it:

use Spatie\LaravelData\PaginatedDataCollection;

public function index(Request $request)
{
    return CompanyData::collect(Company::paginate(), PaginatedDataCollection::class);
}

Now, thanks to paginated data collections inference, you can skip that second argument entirely:

public function index(Request $request)
{
    return CompanyData::collect(Company::paginate());
}
Aug 3, 2025
v0.7.12 PRO

What’s Changed

  • Use self out type instead of self templates definition extensions
July 2025
Jul 25, 2025
v0.7.11 PRO

What’s Changed

  • Fixed redefining types on query builder filters
Scramble PRO
Comprehensive API documentation generation for Spatie’s Laravel Data, Laravel Query Builder, and other packages.