# Configuration

> Every key of config/rest.php, with its type, its default value and its effect.

## The configuration file

Publish `config/rest.php` to change a default:

```bash
php artisan vendor:publish --tag=rest-config
```

The file has nine blocks, in this order: `authorizations`, `gates`, `morph`, `search`, `transactions`, `limits`, `precognition`, `extensions` and `disabled_extensions`.

The package merges its defaults into your file at every level. A nested key that your file leaves out, such as `gates.names.authorized_to_restore` or `limits.sizes.filters`, keeps its default value. You can keep only the keys you change.

## Authorizations

```php
'authorizations' => [
    'strict' => env('REST_AUTHORIZATIONS_STRICT', false),

    'cache' => [
        'enabled' => env('REST_AUTHORIZATIONS_CACHE_ENABLED', true),
        'store' => env('REST_AUTHORIZATIONS_CACHE_STORE') ?: null,
    ],
],
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        authorizations.strict
      </code>
    </td>
    
    <td>
      boolean
    </td>
    
    <td>
      <code>
        false
      </code>
      
       (<code>
        REST_AUTHORIZATIONS_STRICT
      </code>
      
      )
    </td>
    
    <td>
      Throws <code>
        Lomkit\Rest\Exceptions\UnplannedCheckException
      </code>
      
       when a query makes a policy check that the request did not make before validation. Turn it on in your test suite.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        authorizations.cache.enabled
      </code>
    </td>
    
    <td>
      boolean
    </td>
    
    <td>
      <code>
        true
      </code>
      
       (<code>
        REST_AUTHORIZATIONS_CACHE_ENABLED
      </code>
      
      )
    </td>
    
    <td>
      Keeps between requests the decisions that a resource declares in <code>
        authorizationCache()
      </code>
      
      , and the results of the metrics that declare <code>
        cacheFor()
      </code>
      
      . With <code>
        false
      </code>
      
      , nothing is kept.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        authorizations.cache.store
      </code>
    </td>
    
    <td>
      <code>
        null
      </code>
      
       or string
    </td>
    
    <td>
      <code>
        null
      </code>
      
       (<code>
        REST_AUTHORIZATIONS_CACHE_STORE
      </code>
      
      )
    </td>
    
    <td>
      The cache store of the kept decisions and metric results. <code>
        null
      </code>
      
       uses the default store, and so does an empty value, <code>
        REST_AUTHORIZATIONS_CACHE_STORE=
      </code>
      
      . The name must match a store of <code>
        config/cache.php
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

A resource keeps no decision until it declares one in `authorizationCache()`, so the cache does nothing in an application that declares none. See [Decision cache](/authorization/decision-cache).

To turn strict mode on in your tests, add the variable to `phpunit.xml`:

```xml [phpunit.xml]
<env name="REST_AUTHORIZATIONS_STRICT" value="true"/>
```

<note>

There is no switch to turn the policies or the gates off. Override `isAuthorizingEnabled()` or `isGatingEnabled()` on a resource, or on your base resource for every resource, and return `false`. See [Policies](/authorization/policies).

</note>

## Gates

```php
'gates' => [
    'key' => 'gates',

    'names' => [
        'authorized_to_view' => 'authorized_to_view',
        'authorized_to_create' => 'authorized_to_create',
        'authorized_to_update' => 'authorized_to_update',
        'authorized_to_delete' => 'authorized_to_delete',
        'authorized_to_restore' => 'authorized_to_restore',
        'authorized_to_force_delete' => 'authorized_to_force_delete',
    ],
],
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        gates.key
      </code>
    </td>
    
    <td>
      non-empty string
    </td>
    
    <td>
      <code>
        gates
      </code>
    </td>
    
    <td>
      The key of each row that holds the answers to the <code>
        gates
      </code>
      
       of a search. The <code>
        create
      </code>
      
       answer goes under this key in the <code>
        meta
      </code>
      
       of the page. A resource cannot declare a field with this name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gates.names
      </code>
    </td>
    
    <td>
      map of strings
    </td>
    
    <td>
      the six names above
    </td>
    
    <td>
      Renames the answers. Each key is the default name of an answer, <code>
        authorized_to_
      </code>
      
       and the ability in snake case. The six built-in names are required.
    </td>
  </tr>
</tbody>
</table>

Add a key to `gates.names` to rename a gate that a resource declares in `gates()`, by its default name: `'authorized_to_download' => 'can_download'`. Each answer holds `allowed` and `message`. See [Gates](/authorization/gates).

## Morph

```php
'morph' => [
    'type_key' => '@type',
],
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        morph.type_key
      </code>
    </td>
    
    <td>
      non-empty string
    </td>
    
    <td>
      <code>
        @type
      </code>
    </td>
    
    <td>
      The key that holds the morph type of each row that a <code>
        MorphTo
      </code>
      
       include returns, before its other keys. A resource that a <code>
        MorphTo
      </code>
      
       relation can load cannot declare a field with this name.
    </td>
  </tr>
</tbody>
</table>

See [Relations](/resources/relations#morph-to).

## Search

```php
'search' => [
    'select_columns' => true,

    'more_key' => '@more',
],
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        search.select_columns
      </code>
    </td>
    
    <td>
      boolean
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      A search loads only the columns that its rows need: the returned fields, the keys of its includes, the columns of <code>
        alwaysSelect()
      </code>
      
       and of each field's <code>
        requires()
      </code>
      
      . With <code>
        false
      </code>
      
      , every query loads every column.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        search.more_key
      </code>
    </td>
    
    <td>
      non-empty string
    </td>
    
    <td>
      <code>
        @more
      </code>
    </td>
    
    <td>
      The key of each row that lists the to-many includes holding more rows than they returned. A resource cannot declare a field with this name.
    </td>
  </tr>
</tbody>
</table>

When a policy, an accessor or the `map()` of a custom response reads a column that the search did not load, the search throws `Lomkit\Rest\Exceptions\MissingColumnException`. Add the column to the resource's `alwaysSelect()` or to the field's `requires()`, or set `select_columns` to `false`. See [Fields](/resources/fields#columns-a-search-loads).

## Transactions

```php
'transactions' => [
    'attempts' => env('REST_TRANSACTION_ATTEMPTS', 1),
],
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        transactions.attempts
      </code>
    </td>
    
    <td>
      integer of 1 or more
    </td>
    
    <td>
      <code>
        1
      </code>
      
       (<code>
        REST_TRANSACTION_ATTEMPTS
      </code>
      
      )
    </td>
    
    <td>
      How many times a transaction of the package runs when the database reports a deadlock or a lock timeout. <code>
        1
      </code>
      
       runs it once.
    </td>
  </tr>
</tbody>
</table>

Each write runs in a transaction: a mutation, a `destroy`, a `restore`, a `forceDestroy`, and each chunk or whole run of an action. Each attempt runs the whole write again, with its checks, its hooks, its events and the `handle()` method of the action. A transaction inside a transaction of your application is not run again. See [Mutate](/writing/mutate).

## Limits

The `limits` block bounds the size of a request and of what it makes the package do. A request over a limit gets a `422` on the list or the value that goes over it. A limit of `0` refuses every entry, or the first level of a depth. See [Limits](/resources/limits) for the messages and the rules of each key.

```php
'limits' => [
    'sizes' => [
        'filters' => 100,
        'sorts' => 20,
        'selects' => 100,
        'scopes' => 10,
        'aggregates' => 20,
        'includes' => 20,
        'instructions' => 10,
        'fields' => 100,
        'values' => 100,
        'mutate' => 100,
        'relation_entries' => 100,
        'resources' => 1000,
        'jobs' => 100,
        'rows' => 10000,
        'groups' => 100,
        'measures' => 20,
        'totals_groups' => 3,
    ],

    'depths' => [
        'filters' => 1,
        'includes' => 3,
        'mutations' => 3,
    ],

    'totals' => [
        'filters' => 500,
        'entries' => 1000,
        'relations' => 20,
        'patterns' => 10,
    ],

    'lengths' => [
        'patterns' => 255,
        'values' => 1000,
    ],
],
```

Each value is an integer of 0 or more. `sizes.jobs`, `sizes.rows`, `sizes.groups`, `totals.relations`, `totals.patterns` and `lengths.values` must be at least 1.

### Sizes

The most entries of each list, at every level of a request, then three bounds on the work of one request: the jobs of a queued action, the rows of a response, and the groups of a metric.

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Covers
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        limits.sizes.filters
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      <code>
        search.filters
      </code>
      
      , each <code>
        nested
      </code>
      
       group, and the <code>
        filters
      </code>
      
       of includes and aggregates
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.sorts
      </code>
    </td>
    
    <td>
      <code>
        20
      </code>
    </td>
    
    <td>
      <code>
        sorts
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.selects
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      <code>
        selects
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.scopes
      </code>
    </td>
    
    <td>
      <code>
        10
      </code>
    </td>
    
    <td>
      <code>
        scopes
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.aggregates
      </code>
    </td>
    
    <td>
      <code>
        20
      </code>
    </td>
    
    <td>
      <code>
        aggregates
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.includes
      </code>
    </td>
    
    <td>
      <code>
        20
      </code>
    </td>
    
    <td>
      <code>
        includes
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.instructions
      </code>
    </td>
    
    <td>
      <code>
        10
      </code>
    </td>
    
    <td>
      <code>
        instructions
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.fields
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      The <code>
        fields
      </code>
      
       of an action and of each instruction
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.values
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      The values of an <code>
        in
      </code>
      
      , <code>
        not in
      </code>
      
      , <code>
        between
      </code>
      
       or <code>
        not between
      </code>
      
       filter, and the <code>
        key
      </code>
      
       list of an entry of a to-many relation in <code>
        mutate
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.mutate
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      The entries of <code>
        mutate
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.relation_entries
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      The entries of each to-many relation in <code>
        mutate
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.resources
      </code>
    </td>
    
    <td>
      <code>
        1000
      </code>
    </td>
    
    <td>
      The keys of <code>
        destroy
      </code>
      
      , <code>
        restore
      </code>
      
       and <code>
        forceDestroy
      </code>
      
      . An action uses its <code>
        $maxResources
      </code>
      
       property instead.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.jobs
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      The jobs that one run of a queued or batched action creates. When its rows need more jobs, each job takes the number of rows divided by this limit, rounded up, instead of <code>
        $chunkCount
      </code>
      
      . At least <code>
        1
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.rows
      </code>
    </td>
    
    <td>
      <code>
        10000
      </code>
    </td>
    
    <td>
      The rows that one search page or the <code>
        response
      </code>
      
       block of a mutation can render, included rows counted. It is counted from the limits that the request asks for, before any query. At least <code>
        1
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.groups
      </code>
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      The parts of a partition metric and the splits of a trend that sets no <code>
        limit()
      </code>
      
      , and the most values of a group of the search totals, its default <code>
        limit
      </code>
      
      . The other groups fold into <code>
        other
      </code>
      
      . At least <code>
        1
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.measures
      </code>
    </td>
    
    <td>
      <code>
        20
      </code>
    </td>
    
    <td>
      The measures in the <code>
        totals
      </code>
      
       of one search. See <a href="/search/totals">
        Totals
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.totals_groups
      </code>
    </td>
    
    <td>
      <code>
        3
      </code>
    </td>
    
    <td>
      The groups in the <code>
        totals
      </code>
      
       of one search. Each group returns at most <code>
        sizes.groups
      </code>
      
       values: the others fold into <code>
        other
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

### Depths

How many levels nest.

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Covers
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        limits.depths.filters
      </code>
    </td>
    
    <td>
      <code>
        1
      </code>
    </td>
    
    <td>
      <code>
        nested
      </code>
      
       filter groups. <code>
        1
      </code>
      
       allows one group of filters. A text search run by a search engine never nests filters.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.depths.includes
      </code>
    </td>
    
    <td>
      <code>
        3
      </code>
    </td>
    
    <td>
      Include levels, each relation of a dotted include counting as one level, and the relations of a dotted filter field or aggregate path
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.depths.mutations
      </code>
    </td>
    
    <td>
      <code>
        3
      </code>
    </td>
    
    <td>
      Relations nested in a <code>
        mutate
      </code>
      
       entry
    </td>
  </tr>
</tbody>
</table>

### Totals

Totals across the lists of one request.

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Covers
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        limits.totals.filters
      </code>
    </td>
    
    <td>
      <code>
        500
      </code>
    </td>
    
    <td>
      The filters of one search, at every level and in its includes and aggregates
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.totals.entries
      </code>
    </td>
    
    <td>
      <code>
        1000
      </code>
    </td>
    
    <td>
      The entries of every list of <code>
        sizes
      </code>
      
       and of every <code>
        gates
      </code>
      
       list in one request, except <code>
        resources
      </code>
      
      . In a mutation, a relation list and the key lists of its entries count once for each row of the parent entry, nested levels multiplying. It also bounds the attached rows that one <code>
        sync
      </code>
      
       detaches.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.totals.relations
      </code>
    </td>
    
    <td>
      <code>
        20
      </code>
    </td>
    
    <td>
      The relation filters of one search: each filter on a dotted field path and each relation group, at every level and in its includes and aggregates. Each one runs a subquery. At least <code>
        1
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.totals.patterns
      </code>
    </td>
    
    <td>
      <code>
        10
      </code>
    </td>
    
    <td>
      The <code>
        like
      </code>
      
      , <code>
        not like
      </code>
      
      , <code>
        ilike
      </code>
      
       and <code>
        not ilike
      </code>
      
       filters of one search, at every level and in its includes and aggregates. At least <code>
        1
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

### Lengths

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Covers
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        limits.lengths.patterns
      </code>
    </td>
    
    <td>
      <code>
        255
      </code>
    </td>
    
    <td>
      The characters of the value of a <code>
        like
      </code>
      
      , <code>
        not like
      </code>
      
      , <code>
        ilike
      </code>
      
       or <code>
        not ilike
      </code>
      
       filter, at every level
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.lengths.values
      </code>
    </td>
    
    <td>
      <code>
        1000
      </code>
    </td>
    
    <td>
      The characters of each string value of a filter, and of each string of a list, at every level. A pattern takes the smaller of the two lengths. At least <code>
        1
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

<warning>

A key under `limits` that the package does not know throws an exception that names it, so that a typo does not keep the default without notice: `The [rest.limits.sizes.filter] option does not exist.` An unknown key elsewhere is ignored.

</warning>

These limits are not the page sizes of a resource, which its `limits()` method returns. See [Limits](/resources/limits#page-sizes).

## Precognition

```php
'precognition' => [
    'enabled' => false,
],
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        precognition.enabled
      </code>
    </td>
    
    <td>
      boolean
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Adds Laravel's <code>
        HandlePrecognitiveRequests
      </code>
      
       middleware to every route of the package. A request with the <code>
        Precognition
      </code>
      
       header runs its middleware, the policy checks made before validation and its validation, then stops before the controller.
    </td>
  </tr>
</tbody>
</table>

The middleware is added when the routes are registered: clear the route cache after you change this option. See [Precognition](/digging-deeper/precognition).

## Extensions

```php
'extensions' => [
    App\Rest\QuotaExtension::class,
],

'disabled_extensions' => [
    Vendor\Acl\AccessControlExtension::class,
],
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        extensions
      </code>
    </td>
    
    <td>
      list of class names
    </td>
    
    <td>
      <code>
        []
      </code>
    </td>
    
    <td>
      The extension classes of the application. A class that a package also registers counts once. Read again for each request, queued action, <code>
        Rest::search()
      </code>
      
      , OpenAPI document and <code>
        rest:check
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        disabled_extensions
      </code>
    </td>
    
    <td>
      list of class names
    </td>
    
    <td>
      <code>
        []
      </code>
    </td>
    
    <td>
      The extension classes that are never built, wherever they come from. The exact class is compared: a subclass stays enabled.
    </td>
  </tr>
</tbody>
</table>

A value that is not a list throws `InvalidConfigException`: `The [rest.disabled_extensions] option must be a list of extension class names.` A config cached without these keys reads as no extension. See [Extensions](/extensions/overview).

## Typed values

Each request reads the values once, and checks their type. A value of the wrong type throws `Lomkit\Rest\Exceptions\InvalidConfigException`, an `InvalidArgumentException`, that names the key.

<table>
<thead>
  <tr>
    <th>
      Keys
    </th>
    
    <th>
      Accepted values
    </th>
    
    <th>
      Message on another value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        authorizations.strict
      </code>
      
      , <code>
        authorizations.cache.enabled
      </code>
      
      , <code>
        search.select_columns
      </code>
      
      , <code>
        precognition.enabled
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
      
      , <code>
        false
      </code>
      
      , or the strings <code>
        "1"
      </code>
      
      , <code>
        "0"
      </code>
      
      , <code>
        "true"
      </code>
      
       and <code>
        "false"
      </code>
    </td>
    
    <td>
      <code>
        The [rest.authorizations.strict] option must be a boolean.
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      each value of <code>
        limits
      </code>
    </td>
    
    <td>
      an integer of 0 or more, or a string of digits
    </td>
    
    <td>
      <code>
        The [rest.limits.sizes.filters] option must be an integer of 0 or more.
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits.sizes.jobs
      </code>
      
      , <code>
        limits.sizes.rows
      </code>
      
      , <code>
        limits.sizes.groups
      </code>
      
      , <code>
        limits.totals.relations
      </code>
      
      , <code>
        limits.totals.patterns
      </code>
      
      , <code>
        limits.lengths.values
      </code>
    </td>
    
    <td>
      an integer of 1 or more, or a string of digits
    </td>
    
    <td>
      <code>
        The [rest.limits.sizes.rows] option must be an integer of 1 or more.
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        transactions.attempts
      </code>
    </td>
    
    <td>
      an integer of 1 or more, or a string of digits
    </td>
    
    <td>
      <code>
        The [rest.transactions.attempts] option must be an integer of 1 or more.
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gates.key
      </code>
      
      , <code>
        morph.type_key
      </code>
      
      , <code>
        search.more_key
      </code>
    </td>
    
    <td>
      a string that is not empty
    </td>
    
    <td>
      <code>
        The [rest.gates.key] option must be a non-empty string.
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        authorizations.cache.store
      </code>
    </td>
    
    <td>
      <code>
        null
      </code>
      
       or a string that is not empty
    </td>
    
    <td>
      <code>
        The [rest.authorizations.cache.store] option must be null or a non-empty string.
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gates.names
      </code>
    </td>
    
    <td>
      a map of strings that holds the six built-in names
    </td>
    
    <td>
      <code>
        The [rest.gates.names] option must be a map of strings.
      </code>
      
      , or <code>
        The [rest.gates.names.authorized_to_view] option must be a string.
      </code>
      
       for a missing name
    </td>
  </tr>
</tbody>
</table>

The strings let `env()` values work as they are. `null` and an empty string are refused: a variable set without a value, such as `REST_AUTHORIZATIONS_STRICT=`, throws. `REST_AUTHORIZATIONS_CACHE_STORE=` is the exception: `config/rest.php` turns its empty value into `null` with `?: null`.

`precognition.enabled` is read when the routes are registered, `limits` when a request first reads its limits, and the other values together, the first time a request needs one of them.
