From 47b01e92f7cd388e8f3041b7f4956de5919ed22c Mon Sep 17 00:00:00 2001 From: Imani Manyara <19682005+imanimanyara@users.noreply.github.com> Date: Mon, 16 Nov 2026 14:20:35 -0500 Subject: [PATCH] Fold the misuse exception and cache clock into 0.1.0 v0.1.0 moves to carry PRs 24 and 25, on the owner's go; the release workflow builds its notes from the [0.1.0] section. --- CHANGELOG.md | 30 ++++++++++++------------------ docs/upgrading.md | 12 +++++++----- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b099f70..383a0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,24 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Changed - -- The settings cache reads the time through `Support\Clock`, like the rest of the package, instead of - the global `now()` helper. Behaviour is unchanged: both read Laravel's date seam, so `travelTo()` - still applies. An architecture test now refuses `now()` and `today()` outside the providers and - facades. - -### Added - -- `SettingsError`, an interface every exception the package throws implements, so one - `catch (SettingsError $e)` takes them all. -- `SettingsMisuse`, a `LogicException` that also implements `SettingsError`, for a call the package - cannot serve: `value()` on a missing or redacted lookup, `flush()` without `for($owner)`, - `Settings::fake()` with no application, and a settings migration before the provider is - registered. These threw a plain `LogicException` before; a `catch (LogicException $e)` still - catches them, and the messages are unchanged. - -## [0.1.0] - 2026-11-14 +## [0.1.0] - 2026-11-16 The first public release. `Added` describes the package; `Changed`, `Removed`, `Fixed` and `Security` matter only to a checkout taken before the first tag, and [Upgrading](docs/upgrading.md) @@ -125,6 +108,13 @@ has the steps for one. toolkit's own file from `laranail.toolkit.settings`' disk and path when that config is loaded, otherwise `laranail/settings.json` on `local`; toolkit itself is not needed. The command's `source` argument is now optional. The REST import takes a document, so it has no disk option. +- `SettingsError`, an interface every exception the package throws implements, so one + `catch (SettingsError $e)` takes them all. +- `SettingsMisuse`, a `LogicException` that also implements `SettingsError`, for a call the package + cannot serve: `value()` on a missing or redacted lookup, `flush()` without `for($owner)`, + `Settings::fake()` with no application, and a settings migration before the provider is + registered. These threw a plain `LogicException` before; a `catch (LogicException $e)` still + catches them, and the messages are unchanged. ### Changed @@ -142,6 +132,10 @@ has the steps for one. - Configuration is read with typed getters: a value of the wrong type is an error, not the default. - Typed settings classes listed in `typed.classes` are bound at boot; one not listed resolves unloaded. +- The settings cache reads the time through `Support\Clock`, like the rest of the package, instead of + the global `now()` helper. Behaviour is unchanged: both read Laravel's date seam, so `travelTo()` + still applies. An architecture test now refuses `now()` and `today()` outside the providers and + facades. ### Removed diff --git a/docs/upgrading.md b/docs/upgrading.md index 3161593..2ced6d8 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -9,19 +9,21 @@ Changelog sections `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed` and `Sec minor release (`0.1` to `0.2`) may break the API; the section of that release says what breaks and what to do, and this page lists the steps. -## If you installed 0.1.0 or 0.1.1 before 2026-11-14 +## If you installed 0.1.0 or 0.1.1 before 2026-11-16 The first `v0.1.0` (2026-11-11) and `v0.1.1` (2026-11-14) were withdrawn, and the history was squashed into a single `v0.1.0`, published 2026-11-14, that holds everything both carried, plus runtime -overrides. Composer caches an archive per version name, so an install from the old tags keeps the -old code until the cache is cleared: +overrides. That tag was moved on 2026-11-16 to add `SettingsMisuse` and `SettingsError`. Composer +caches an archive per version name, so an install from an earlier tag keeps the old code until the +cache is cleared: ```bash composer clear-cache && composer update laranail/settings ``` -Your `^0.1` constraint does not change. Nothing else is needed: the API, config keys and tables -are the same as in the withdrawn `v0.1.1`. +Your `^0.1` constraint does not change. The config keys and tables are the same. The one change a +caller can see: misuse that threw a plain `LogicException` now throws `SettingsMisuse`, which still +extends `LogicException`, so existing catch blocks keep working. ## From a pre-release checkout to 0.1.0