Skip to content

Commit 516ac7c

Browse files
committed
Release v0.99.23
1 parent eab3d3f commit 516ac7c

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

CHANGELOG.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,147 @@ The format is based on [Keep a Changelog][], and this project adheres to [Semant
1010
[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
1111
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
1212

13+
## [v0.99.23] - 2024-06-01
14+
15+
### Added
16+
17+
#### `Core`
18+
19+
- Add `ErrorHandler` methods `isShuttingDown()`, `isShuttingDownOnError()` and `getExitStatus()`
20+
- Destructors can use these via the `Err` facade to determine the script's exit status during shutdown and respond accordingly
21+
- Add `Arr::setIf()`
22+
- Add `getContainer()` to builders
23+
24+
#### `Curler`
25+
26+
- Add `CurlerInterface::withRequest()` so middleware can use `Curler` to inspect arbitrary requests
27+
28+
#### `Sync`
29+
30+
- Add `SyncStore::getBinaryRunUuid()` and remove `$binary` parameter from `getRunUuid()`
31+
- Add `SyncStore::getEntityId()`
32+
- Add `SyncStoreInterface` and adopt where appropriate
33+
34+
#### `PHPStan`
35+
36+
- Add PHPStan extensions:
37+
- `GetCoalesceRule` to report unnecessary use of `Get::coalesce()`
38+
- `ArrWhereNotEmptyMethodReturnTypeExtension` to resolve return type of `Arr::whereNotEmpty()`, including for constant arrays
39+
- `ArrWhereNotNullMethodReturnTypeExtension` to similarly resolve return type of `Arr::whereNotNull()`
40+
41+
#### `sli`
42+
43+
- Add `--no-declare` option to `sli generate builder`
44+
45+
### Changed
46+
47+
#### `Cache`
48+
49+
- **Automatically remove expired items from `CacheStore`**
50+
- Adopt `CacheStoreInterface` instead of `CacheStore` where appropriate
51+
52+
#### `Container`
53+
54+
- Resolve internal interfaces to internal implementations by default, e.g. resolve `CacheStoreInterface` to `CacheStore` if it hasn't been bound to something else
55+
- Move `RequiresContainer` to `Container` namespace
56+
- In `RequiresContainer::requireContainer()`, fall back to the global container if it exists, otherwise create a standalone container (unless `$createGlobalContainer = true`)
57+
58+
#### `Core`
59+
60+
- Rename builder methods for consistency and clarity:
61+
- `build()` -> `create()`
62+
- `go()` -> `build()`
63+
- Move `Http` utility class to `Http` namespace
64+
- Move `Get` methods to new `FormData` class in `Http` namespace:
65+
- `query()` -> `getQuery()`
66+
- `formData()` -> `getValues()`
67+
- `data()` -> `getData()`
68+
- Rename `QueryFlag` to `FormDataFlag` and move to `Http` namespace
69+
- Rename `Arr::same()` to `Arr::sameValues()` and add `Arr::same()`, which also checks keys (as one would expect)
70+
- Simplify `Sys::handleExitSignals()`
71+
- Move `Char` constants to `Str`
72+
- Move `SortFlag` constants to `Arr`
73+
- Rename `AbstractStore::requireUpsert()` to `assertCanUpsert()` and return `void`
74+
75+
#### `Curler`
76+
77+
- Surface middleware messages via `Curler::getLastRequest()` and `Curler::getLastResponse()`
78+
- Pass `$curler` to `Curler` cache key callbacks
79+
- Add signature to `$next` closure in `Curler` middleware annotations
80+
- Allow `Curler`'s user agent header to be suppressed
81+
- Rename `CurlerInterface::withQueryFlags()` to `CurlerInterface::withFormDataFlags()`
82+
- Rename `CurlerBuilder::queryFlags()` to `CurlerBuilder::formDataFlags()`
83+
84+
#### `Sync`
85+
86+
- Revert serialization changes in @9344acb3, where containers are propagated via serialization rules, in favour of passing an optional entity store to serialize operations
87+
- This allows serialization of possibly-detached entities--that may belong to a namespace registered with a store they can't locate--without making serialization rules container-dependent
88+
- In `SyncEntityInterface`:
89+
- Rename `defaultProvider()` -> `getDefaultProvider()`
90+
- Make `$container` a required parameter for `getDefaultProvider()` and `withDefaultProvider()`
91+
- Remove `$container` parameter from `getSerializeRules()`
92+
- Rename `plural()` -> `getPlural()` and make return type nullable
93+
- Add `$store` parameter to `toArray()` and `toArrayWith()`
94+
- In `toArrayWith()`, don't allow `$rules` to be an unresolved builder
95+
- Pass `$store` instead of `$container` to `toLink()` and `uri()`
96+
- Remove `static` modifier from `SyncClassResolverInterface` methods
97+
- Rename `SyncStore` methods:
98+
- `hasRunId()` -> `runHasStarted()`
99+
- `provider()` -> `registerProvider()`
100+
- `getProviderHash()` -> `getProviderSignature()`
101+
- `entityType()` -> `registerEntity()`
102+
- `namespace()` -> `registerNamespace()` and require `$resolver` to be a `SyncClassResolverInterface` instance
103+
- `getEntityTypeUri()` -> `getEntityUri()`
104+
- `getEntityTypeNamespace()` -> `getEntityPrefix()`
105+
- `getNamespaceResolver()` -> `getClassResolver()` and return `SyncClassResolverInterface|null`
106+
- `entity()` -> `setEntity()`
107+
- `deferredEntity()` -> `deferEntity()`
108+
- `deferredRelationship()` -> `deferRelationship()`
109+
- `resolveDeferred()` -> `resolveDeferrals()` and add `$providerId`, remove `$return`, always return resolved entities
110+
- `checkHeartbeats()` -> `checkProviderHeartbeats()`
111+
- `error()` -> `recordError()`
112+
- Add `$forEntityProperty` parameter to `SyncStore::resolveDeferredRelationships()`
113+
- Automatically detect exit status during `SyncStore` shutdown
114+
- In `SyncSerializeRules`:
115+
- Don't flatten rules until they are compiled, in case rules for entities with different normalisers are merged
116+
- Normalise new key names during compilation
117+
- Add/rename/replace in `SyncSerializeRules` and related interfaces:
118+
- `getEntity()`
119+
- `apply()` -> `merge()`
120+
- `getRemoveFrom()` -> `getRemovableKeys()`
121+
- `getReplaceIn()` -> `getReplaceableKeys()`
122+
- `withDateFormatter()`
123+
- `withDetectRecursion()`
124+
- `getRecurseRules()`
125+
- `withRecurseRules()`
126+
- `getForSyncStore()` and remove `getFlags()`
127+
- `withForSyncStore()`
128+
- `getRemoveCanonicalId()` -> `getIncludeCanonicalId()`
129+
- `withRemoveCanonicalId()` -> `withIncludeCanonicalId()`
130+
- In `SyncProviderInterface::with()`, do not accept `ContainerInterface` as a `$context`
131+
132+
### Removed
133+
134+
- Remove `getApp()` methods in favour of `getContainer()`
135+
- Remove container method `instanceIf()` to address unexpected outcome when existing bindings are not shared instances
136+
- Remove `Arr::upperFirst()`
137+
- Remove `HasProvider::requireProvider()`
138+
- Remove `AbstractStore::isTransactionOpen()`
139+
- Remove `AbstractSyncEntity::store()`
140+
- Remove `AbstractSyncProvider::buildSerializeRules()`
141+
- Remove `SyncEntityLinkType::INTERNAL`
142+
143+
### Fixed
144+
145+
- Fix `Arr::rename()` bug when renaming a key with a `null` value
146+
- Remove `of object` from container method templates to fix static analysis errors when binding or resolving interfaces
147+
- Fix issue where serialization rules applied to date and time values trigger an exception
148+
- Fix issue where nested value paths may be incorrect during serialization, preventing rules from applying correctly
149+
150+
### Security
151+
152+
- Add "unstable" HTTP header group and use it to filter headers for inclusion in `Curler`'s default cache key instead of "sensitive" headers, which had non-obvious security implications by default
153+
13154
## [v0.99.22] - 2024-05-21
14155

15156
### Added
@@ -2550,6 +2691,7 @@ This is the final release of `lkrms/util`. It is moving to [Salient](https://git
25502691

25512692
- Allow `CliOption` value names to contain arbitrary characters
25522693

2694+
[v0.99.23]: https://github.com/salient-labs/toolkit/compare/v0.99.22...v0.99.23
25532695
[v0.99.22]: https://github.com/salient-labs/toolkit/compare/v0.99.21...v0.99.22
25542696
[v0.99.21]: https://github.com/salient-labs/toolkit/compare/v0.99.20...v0.99.21
25552697
[v0.99.20]: https://github.com/salient-labs/toolkit/compare/v0.99.19...v0.99.20

0 commit comments

Comments
 (0)