calebdw/laravel-sql-entities
calebdw/laravel-sql-entities maps SQL query results to typed PHP entity classes in Laravel, with attribute casting, relationships, and query integration—ideal for raw SQL, legacy schemas, and read models without full Eloquent overhead.
Architecture fit. laravel-sql-entities sits in the deployment/migration layer: PHP classes carry attributes describing SQL entities (views, functions, procedures) which the package registers and ships through Laravel's migration and service-container conventions. That is a low-footprint architectural fit for teams that already treat schema as code. The v1.1.1 changes do not alter that shape — they are internal correctness fixes — so no re-architecture is implied.
Integration feasibility. The critical fix is the shipping of ReadsClassAttributes inside the package. v1.1.0 apparently relied on a Laravel framework trait that exists only in Laravel 13, which would have broken attribute-driven configuration on Laravel 12 despite the package presumably claiming Laravel 12 support. v1.1.1 removes that hidden framework-version dependency, materially improving feasibility for Laravel 12 estates. The remaining feasibility questions are ordinary: minimum PHP/Laravel versions, publishable config/migrations, and connection handling.
Technical risk.
ReadsClassAttributes decouples the package from Laravel 13 internals, but creates a divergence surface: upstream attribute-reading semantics (inheritance, repeatable attributes, reflection caching) must be tracked manually.class-string passed to Collection::get() with a resolvable lookup is a tooling fix; it also hints that entity resolution is string/class-name driven and therefore sensitive to class aliasing, preloading, or obfuscation.Key questions.
ReadsClassAttributes shadow or duplicate the framework trait, and is behavior identical?Stack fit. Suitable for Laravel teams already using migrations as the schema source of truth and comfortable with PHP 8 attributes. It complements rather than replaces schema tooling; it is not a fit for teams doing ad-hoc DDL or using an ORM-first migration style that cannot express views/functions.
Migration path. Pin ^1.1.1 explicitly and add a conflict against 1.1.0. Existing users on 1.1.0 under Laravel 12 must treat their deployed entities as suspect: re-run migrations in a disposable database and diff the resulting DDL against expectations before trusting staging or production state.
Compatibility. Laravel 12 is the version the patch explicitly repairs; Laravel 13 should remain functional since the framework trait still exists there, but the package now supplies its own trait, so verify no double-registration or precedence surprise. PHP version floor is governed by attribute and class-string usage — confirm before rollout.
Sequencing.
composer require calebdw/laravel-sql-entities:^1.1.1 with the 1.1.0 conflict rule.Maintenance. Small OSS package with an apparent single maintainer and a recent compatibility regression; budget for periodic version-matrix validation rather than assuming semver safety. The vendored trait adds a recurring maintenance item: diff it against Laravel's framework trait on each Laravel major.
Support. No commercial SLA. Escalation is GitHub issues plus a fork. For production-critical schema objects, identify an internal owner who can patch and vendor the package if upstream stalls.
Scaling. Entity creation is deploy-time DDL, not request-path work, so runtime scaling impact is near zero. Deploy-time impact is real: view/function replacement can take locks, and ordering matters on large schemas. Coordinate with release windows for databases with high-traffic tables behind those entities.
Failure modes.
Ramp-up. Low for Laravel developers: attributes plus migrations are familiar idioms, and the package's surface is narrow. Moderate for the SQL-entity lifecycle itself — teams need to understand how entities are versioned, replaced, and rolled back, which is not standard Laravel knowledge. Plan a short internal walkthrough and a documented rollback procedure before first production use.
How can I help you explore Laravel packages today?