Reference

Configuration

Every key of config/revisions.php.

Publish the file with php artisan vendor:publish --tag=revisions-config. Ark4ne\ApiRevisions\Laravel\RevisionsConfig is the validated configuration, a singleton: an invalid value throws a ConfigurationException.

Revisions

enum
class-string|null
Your revision enum: a backed enum implementing Revisions\Revision. Default null: the library works on one implicit revision, head (Revisions\Unrevisioned), with no history, no revision header and nothing locked.
default
string|class-string
The revision when no resolver answers: latest (the head), oldest, a backed value of the enum, or a resolver class. Outside a request (jobs, console), a fixed revision is the current one; a resolver class gives the head. Without enum, only latest or oldest. Default 'latest'.

Resolution

resolvers
array<class-string, array>
The chain of resolvers, class => options (named constructor arguments), or the class alone. The first one returning a revision wins. Default: HeaderResolver::class => ['name' => 'Api-Revision']. See Resolving the revision.
response_header
string
The response header naming the revision a response was rendered in. Default 'Api-Revision'.

Values

missing_default
'error'|'null'
What a required()->since(R) field declared without default: gives clients older than R: 'error' (nothing, reported by revision:check as required-since-without-default) or 'null'. Default 'error'.
strict_values
bool|null
Value errors (a value its type refuses, a failed conversion, a null on a non-nullable field) are thrown as ValueException (true), or cast and reported once per class and field (false). Default null: follows app.debug.
date_format
string
The format of Schema::date() without format(). Default 'Y-m-d'.
date_time_format
string
The format of Schema::dateTime() without format(). Default 'Y-m-d\TH:i:sP'.

Tooling

discovery.paths
string[]
The directories scanned for classes implementing Revisioned, by revision:check, revision:cache and the other commands. Default [app_path()].
discovery.classes
class-string[]
Classes outside those paths (packages, modules). Default [].
cache_path
string
The compiled shapes written by revision:cache. Default base_path('bootstrap/cache/revisions.php').
lock_path
string
The directory of the lock files, one per revision: commit it. Default base_path('revisions.lock').