Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
12 changes: 7 additions & 5 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading