Skip to content

Release audit, automatic file-to-database promotion - #14

Merged
imanimanyara merged 3 commits into
mainfrom
chore/audit-and-docs
Nov 11, 2026
Merged

imanimanyara merged 3 commits into
mainfrom
chore/audit-and-docs

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Summary

A release audit, plus automatic file-to-database promotion.

  • Positioning: the README, composer.json and the docs openers now read "Key-value settings for any Laravel owner (the application, a user, a tenant, a product), stored in layered stores that work even before the database exists, and after it does."
  • Docs verified:
    • 147 PHP and 34 shell examples were checked against the code; none were broken.
    • Stale references to removed features and 1 broken link are fixed.
    • New pages: troubleshooting, upgrading, and a REST API quick start.
  • Automatic promotion: stores.<name>.promote is manual (the default) or auto, or ['mode', 'include', 'owners']:
    • include selects settings (app-wide values), owners (per-owner values, filtered by owner alias), or *.
    • It runs once when the database becomes ready: after MigrationsEnded, then on the next request or job after the response.
    • It is locked, retried on failure, and costs 0 queries once done.
    • Fluent setters (promotion()->auto()->only(...)->forOwners(...)) override runtime, persisted and file config.
    • promoteWhenReady() is available for installers. promote gains --only and --owner.
  • Previously uncalled methods now used:
    • show prints the stored value and flags a stale cache.
    • doctor checks the owner key type.
    • Layer deletion is covered by a test.
    • The REST API fails closed when no authorizer can be built.
  • Audit fixes:
    • http.page_size is wired in, clamped to 1–200.
    • Token abilities are vendor-scoped (laranail-settings:<ability>).
    • Problem type URIs point at anchors on the exceptions docs page.
    • composer test-coverage has no fixed minimum.

Behaviour changes

  • Tokens must use the laranail-settings: ability prefix.
  • Problem type URIs changed.
  • With the REST API on and an authorizer that cannot be built, requests get 401 instead of an exception.
  • A store's promote.include also limits what a manual promote copies.

Verification (local)

  • Pest: 652 passed; coverage 96.9 %.
  • PHPStan, Rector and Pint: clean.

Copilot AI balanced review requested due to automatic review settings November 11, 2026 13:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@imanimanyara
imanimanyara merged commit 0378e50 into main Nov 11, 2026
14 checks passed
@imanimanyara
imanimanyara deleted the chore/audit-and-docs branch November 11, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants