Download the PHP package pjadanowski/scramble-extras without Composer

On this page you can find all versions of the php package pjadanowski/scramble-extras. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scramble-extras

scramble-extras

tests

A free, open Laravel package that adds full Spatie ecosystem support to dedoc/scramble — covering everything scramble-pro does for the integrations most projects actually need.

Features

Requirements

Install

The service provider auto-registers all extensions via Laravel's package discovery — no config touching needed. Install dedoc/scramble itself if you haven't already, and you're done: your Data classes start showing up in the generated docs.

To document allowedFilters/Sorts/Includes/Fields you also need spatie/laravel-query-builder (the query-builder extension self-registers only when that package is present):

Configuration

There's nothing to configure to get started. If you want to tune the cache, publish the config:

Or just set the env vars — e.g. disable the cache while iterating on Data classes locally:

How it plugs in

The package boots in two ways:

  1. Calls Scramble::registerExtensions(...) in its service provider, contributing TypeToSchema, OperationExtension, and InferExtension classes that Scramble picks up automatically.
  2. Calls Scramble::configure()->withParametersExtractors(...) to prepend a Data-aware parameter extractor for request bodies typed with Data subclasses.

You don't have to add anything to config/scramble.php.

Cache

The package transparently caches built schemas in storage/framework/cache/scramble-extras/schemas.php. Cache invalidates per-class on filemtime() change, so editing a Data class auto-rebuilds just that class on the next export. The cache file also carries a signature derived from the installed Scramble version, so it self-invalidates after a dedoc/scramble upgrade — no manual clear required.

Writes are deferred: a full export builds every schema in memory and persists the cache once on shutdown, rather than rewriting the file per class.

To wipe manually:

Request bodies vs responses

A Data class is often used as both a response and a request body, and the two projections differ — #[Computed] is output-only, #[Hidden] is input-only, and Optional / #[MapInputName] change required-ness and field names. To keep both faithful, request body schemas are inlined (rendered directly on the operation) instead of $ref-ing the shared output component. Response schemas remain reusable $ref components.

What's NOT covered (yet)

Long-tail features still on the roadmap:

Testing

The suite covers the attribute → OpenAPI translation, the query-builder AST extraction, the schema cache, the return-type inference, and a full end-to-end Scramble generation pass (request bodies, response $refs, paginated envelopes, and query parameters) booted with orchestra/testbench.

License

MIT


All versions of scramble-extras with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
dedoc/scramble Version ^0.13.0
illuminate/console Version ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
nikic/php-parser Version ^4.0 || ^5.0
spatie/laravel-data Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pjadanowski/scramble-extras contains the following files

Loading the files please wait ...