Skip to content

Commit 08c5a8f

Browse files
committed
Update CHANGELOG.md
1 parent 7ab83f6 commit 08c5a8f

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed

CHANGELOG.md

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

15+
## [v0.20.87] - 2023-11-05
16+
17+
### Added
18+
19+
- Sync: add `SyncInvalidRequestException`
20+
21+
### Changed
22+
23+
- Sync: improve entity deferral and hydration
24+
25+
- Optionally limit hydration flag scope to a given depth
26+
- Add `ISyncEntityProvider::withoutResolvingDeferrals()`, `withoutHydration()` and `withHydration()` to simplify manipulation of the underlying context
27+
- `Sync::deferredEntity()`: ignore hydration flags in favour of deferral policy
28+
- `Sync::resolveDeferred()`: resolve relationships first to take advantage of more entities per round trip
29+
- In `SyncEntityResolver::getByName()`, catch `SyncFilterPolicyViolationException` and make a second attempt without the filter
30+
- When resolving named parameters in `HttpSyncDefinition::runHttpOperation()`, claim matching **filters** before checking for matching **values**, reversing the previous order
31+
32+
- `lk-util generate sync entity`:
33+
34+
- Generate sync entities with relationships and parent/child properties
35+
- Allow properties in the reference entity to be skipped
36+
- Treat entity properties with suffix `_id` or `_ids` as relationships
37+
38+
- `Convert::valueToCode()`: improve string escaping and add support for multiline arrays
39+
- Declare `Builder::getTerminators()` so subclasses don't need to
40+
41+
### Removed
42+
43+
- Sync: remove dangerous `HydrationFlag::NO_FILTER` option
44+
45+
### Fixed
46+
47+
- Sync: fix issue where deferred entities that are immediately resolved by the provider are not assigned to the variable originally passed by reference
48+
- Sync: fix issue where checks are performed against the child of the intended context during entity and relationship deferral
49+
- Sync: fix issue where hydration flags are incorrectly performed on the receiving entity
50+
- Fix `CliCommand::getEffectiveArgument()` issue where short arguments with name `"0"` are not returned correctly
51+
52+
## [v0.20.86] - 2023-11-03
53+
54+
### Added
55+
56+
- Sync: implement hydration of relationships
57+
58+
- Add `HydrationFlag`
59+
- Allow hydration flags to be applied to sync contexts globally or per-entity
60+
- Implement suppressed, lazy, deferred and eager hydration of relationships
61+
- Apply parent/child relationships via `addChild()`/`setParent()`
62+
- Register entities with the entity store before processing deferred entities and relationships to prevent race conditions and infinite recursion
63+
- Add magic methods to `DeferredSyncEntity` for on-demand resolution of deferred entities (similar to lazy hydration implemented via `IteratorAggregate` in `DeferredRelationship`)
64+
- Add `Sync::resolveDeferred()`
65+
- Allow deferred entities and relationships to be resolved via callback instead of assignment
66+
- Store resolved entities and relationships in `DeferredSyncEntity` and `DeferredRelationship` so they can forward property actions and method calls until they go out of scope
67+
- Throw an exception if an attempt is made to resolve the same deferred entity or relationship multiple times
68+
- In `Sync::resolveDeferredEntities()`, remove attempt to resolve multiple entities via `getListA()` in favour of resolving the first instance of each entity **in its own context** to ensure parent entities are surfaced to providers
69+
70+
- Sync: add protected `DbSyncProvider::first()` method to simplify retrieval of a single entity
71+
- Add `Convert::toValue()`
72+
- Add `Test::isFloatValue()`
73+
74+
### Changed
75+
76+
- Sync: simplify filter policy API
77+
78+
- Add `ISyncProvider::getFilterPolicy()` so providers can specify a default without implementing `getDefinition()`
79+
- Add `SyncProvider::run()` to minimise the need for boilerplate safety checks in providers where sync operations are performed by declared methods
80+
81+
- Sync: improve error reporting
82+
83+
- Remove `$toConsole` parameter from `Sync::error()`
84+
- Add `Sync::enableErrorReporting()` and `disableErrorReporting()`
85+
- Fix issue where output from `Sync::reportErrors()` is not unescaped
86+
87+
- Sync: rename classes and methods:
88+
89+
- `DeferredSyncEntity` -> `DeferredEntity`
90+
- `DeferredSyncEntityPolicy` -> `DeferralPolicy`
91+
- `SyncFilterPolicy` -> `FilterPolicy`
92+
- `Sync::getDeferredEntityCheckpoint()` -> `getDeferralCheckpoint()`
93+
- `ISyncContext::withDeferredSyncEntityPolicy()` -> `withDeferralPolicy()`
94+
- `ISyncContext::getDeferredSyncEntityPolicy()` -> `getDeferralPolicy()`
95+
96+
- Add optional `$count` parameter to `Console::message{,Once}()`
97+
- `DbConnector`: use `DB2CODEPAGE` to enable UTF-8 before connecting to Db2
98+
- `DbSyncProvider`: remove UTF-8 locale assertion
99+
- `Convert`/`Test`: accept leading and trailing spaces in integer and boolean strings
100+
101+
### Removed
102+
103+
- Remove unused entity deferral methods from `SyncEntity` and `SyncEntityProvider`
104+
- Remove references to `DeferredSyncEntity::$Entity`'s unsupported nullability
105+
106+
### Fixed
107+
108+
- In `ConsoleFormatter::escapeTags()`, mitigate `PREG_JIT_STACKLIMIT_ERROR` when printing long `Console` messages with many special characters (e.g. JSON-encoded values) by only escaping recognised tag delimiters
109+
- Fix `Event::listen()` callback signature
110+
111+
## [v0.20.85] - 2023-10-31
112+
113+
### Changed
114+
115+
- ICliApplication: rework to allow chained methods after `run()`
116+
- Return `$this` from `ICliApplication::run()`
117+
- Surface the most recent return value via `ICliApplication::getLastExitStatus()`
118+
- Add `ICliApplication::exit()`
119+
15120
## [v0.20.84] - 2023-10-31
16121

17122
### Added
@@ -507,6 +612,9 @@ The format is based on [Keep a Changelog][], and this project adheres to
507612

508613
- Allow `CliOption` value names to contain arbitrary characters
509614

615+
[v0.20.87]: https://github.com/lkrms/php-util/compare/v0.20.86...v0.20.87
616+
[v0.20.86]: https://github.com/lkrms/php-util/compare/v0.20.85...v0.20.86
617+
[v0.20.85]: https://github.com/lkrms/php-util/compare/v0.20.84...v0.20.85
510618
[v0.20.84]: https://github.com/lkrms/php-util/compare/v0.20.83...v0.20.84
511619
[v0.20.83]: https://github.com/lkrms/php-util/compare/v0.20.82...v0.20.83
512620
[v0.20.82]: https://github.com/lkrms/php-util/compare/v0.20.81...v0.20.82

0 commit comments

Comments
 (0)