release: v1.6.68 - #286
Open
roncodes wants to merge 4 commits into
Open
release: v1.6.68#286roncodes wants to merge 4 commits into
roncodes wants to merge 4 commits into
Conversation
Rewrite ResourceTransformerRegistry as a container singleton that any extension can
register against without modifying the resource or model. Transformers target a
resource class, model class, interface or '*' (subclasses match), chain in ascending
priority, and can be scoped by channel (http, webhook, broadcast) and audience
(internal, public). Closures and instances are accepted alongside classes.
FleetbaseResource::resolve() applies registered transformers to every resource,
nested resource and collection item, re-filtering conditional values and honouring
without(). FleetbaseResourceCollection shares one context per collection so the new
PreparesResourceTransformation::prepare() hook can batch-load once and avoid N+1
queries. ResourceLifecycleEvent, chat participant broadcasts, Utils::serializeJsonResource
and the cached internal user payload serialize through resolve(), so transformers reach
webhook and broadcast payloads and conditional MissingValues are no longer emitted as {}.
CoreServiceProvider binds the registry, adds a $transformers property, and
registerTransformers() / registerTransformersFrom() mirroring expansion discovery.
Find::httpResourceForModel caches internal and public resolutions separately, consulting
the request only when a model has a dedicated Internal resource.
Removes the legacy duck-typed transformer API ($target + static output()), the
transform(Model) entry point, resolveByTarget(), fixClassName() and the static
$transformers array. The User resource no longer calls the registry directly.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
============================================
Coverage 100.00% 100.00%
- Complexity 7772 7931 +159
============================================
Files 436 438 +2
Lines 25334 25665 +331
============================================
+ Hits 25334 25665 +331
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…erage CI enforces 100% line and method coverage. Covers the remaining branches: the registry's empty-registration short circuits, invokable objects and array callables as transformers (and their generated ids), rejecting non-callable objects, collections wrapping items in non-resource classes, collections with no resolvable item resource class, and resolving without a bound request. Two defensive throws that normalize() makes unreachable are marked @codeCoverageIgnore with an explanation, and callableId() drops a branch that could never run because string transformers are always treated as classes.
…sformers feat(resources): agnostic resource transformer registry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release v1.6.68
Release branch for core-api v1.6.68. Merging into
maintriggersrelease.yml, which validates thatcomposer.jsonand the first line ofRELEASE.mdname1.6.68, then pushes thev1.6.68tag.Contents
fleetbase/laravel-mysql-spatialbumped to^1.0.3so building a database connection no longer connects to MySQL (fixesartisan package:discoverfailing duringcomposer installwithout a reachable database).composer.jsonversion1.6.67→1.6.68;RELEASE.mdnotes for v1.6.68.