mathieutu/laravel-json-syncer
Keep JSON columns in sync with regular database columns in Laravel. Automatically mirror values stored in JSON attributes, such as translations, into dedicated columns so you can query, sort, and index them efficiently. Lightweight trait-based package with simple configuration.
Architecture fit. laravel-json-syncer is a narrow, single-purpose utility: it reads JSON fixtures and syncs them into Eloquent models via an artisan command. Architecturally it belongs in the operational/data-tooling layer (reference-data seeding, config-table sync, environment bootstrapping), not in request-path application code. Footprint is small — a service provider plus command(s) — so adopting and later removing it are both cheap. The main architectural coupling is that it writes through our models, meaning our model events, casts, observers, and validation all execute during sync; that is a feature (consistency) and a hazard (unexpected side effects, slow observers).
Integration feasibility. Release 1.3.0 is a compatibility release: Laravel 7 support (issue #12), a Travis CI API migration, and one trivial import fix. No Changed, Deprecated, or Removed sections — under semver this should be a drop-in minor bump from 1.2.x. Integration itself is trivial (composer require, optional auto-discovery, one command invocation), so feasibility risk is low; the real gate is whether our framework version is inside the newly widened constraint.
Technical risk. Ranked:
Key questions.
composer.json constraints — illuminate/support/illuminate/database ranges, PHP floor/ceiling, PHPUnit version?--force, or environment gating?$fillable/$guarded, and model events handled during sync?Stack fit. Fits Laravel 5.x through 7.x. If our target is Laravel 8+, 1.3.0 does not move the needle — that becomes a fork-or-replace decision, not an upgrade decision. Best fit is a Laravel 6→7 estate with a genuine reference-data sync need.
Migration path. Pin ^1.3 (not *, not dev-master) and let the constraint resolver confirm compatibility against our locked framework version. From 1.2.x this should be a lockfile-only change: no config publish, no migration, no API change indicated. If we are already past Laravel 7, do not attempt to widen constraints ourselves — fork instead, so the patch is explicit and reviewable.
Compatibility. Verify three axes independently before merging: (a) PHP version — Travis config churn hints at an older matrix; (b) Laravel minor range — "Laravel 7 compatibility" is not the same as "all 7.x"; (c) our own illuminate/* pins and any package that also decorates the console kernel or model layer. Also confirm auto-discovery behaves under our service-provider caching.
Sequencing.
Maintenance. Expect to inherit this. The 1.3.0 changelog is compatibility catch-up plus CI housekeeping, which means upstream is tracking the ecosystem reactively. Budget a small annual allowance for a vendored fork (the surface is one command class — a from-scratch replacement is plausibly ~100–200 LOC and may be cheaper than repeated forks). Assign a named code owner at adoption time, not at first breakage.
Support. No vendor, no SLA, community issues only. Mitigate with an internal runbook: exact command invocation, required env gating, expected runtime, pre-run snapshot procedure, and rollback steps. Keep the runbook next to the pinned version so an upgrade forces a runbook review.
Scaling. In-memory JSON parsing is fine for reference data at thousands-of-rows scale, and that is the honest use case. It is not appropriate for large datasets, high-frequency syncs, or anything in a request path. Watch memory ceilings on the largest fixture we actually have, and never run two syncs concurrently against the same tables.
Failure modes.
$fillable attribute after a schema change → add a CI assertion on expected row counts/column coverage.Ramp-up. Low. A Laravel-comfortable engineer is productive in an afternoon; the package is a thin command wrapper, and the real learning is our own JSON conventions and reconciliation rules, not the library. TPM-level onboarding is a runbook entry and a one-page dependency note (why pinned, who owns it, when we fork). Do not invest in broad team training for a package we may replace.
How can I help you explore Laravel packages today?