Skip to content

release: v1.6.68 - #286

Open
roncodes wants to merge 4 commits into
mainfrom
release/v1.6.68
Open

roncodes wants to merge 4 commits into
mainfrom
release/v1.6.68

Conversation

@roncodes

@roncodes roncodes commented Oct 3, 2026

Copy link
Copy Markdown
Member

Release v1.6.68

Release branch for core-api v1.6.68. Merging into main triggers release.yml, which validates that composer.json and the first line of RELEASE.md name 1.6.68, then pushes the v1.6.68 tag.

Contents

  • feat(resources): agnostic resource transformer registry #285 agnostic resource transformer registry (retargeted to this branch).
  • fleetbase/laravel-mysql-spatial bumped to ^1.0.3 so building a database connection no longer connects to MySQL (fixes artisan package:discover failing during composer install without a reachable database).
  • composer.json version 1.6.67 → 1.6.68; RELEASE.md notes for v1.6.68.

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

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a698292) to head (ab33100).

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     
Flag Coverage Δ
backend 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant