Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Sql Entities Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Release-process risk (elevated). A Laravel-13-only symbol reached a tagged release and was caught by CI rather than by the version matrix gate. That suggests the compatibility matrix is either incomplete or not enforced pre-tag. Treat future minor bumps as requiring a full matrix run on our side.
  • Vendored-trait risk. Owning a copy of 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.
  • Static-analysis risk (low). Replacing a non-literal 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.
  • Behavioral-regression risk. The Laravel 12 bug's symptom is silent: attributes would not be read, so entities could be created with default names/options rather than failing loudly. Any prior 1.1.0 deployment should be audited rather than assumed correct.

Key questions.

  1. What is the declared support matrix (Laravel 10/11/12/13, PHP 8.1–8.4), and is it CI-enforced per version?
  2. Which SQL entity types are covered, and are they created/dropped through migrations or a separate artisan command?
  3. Does the package honor multiple connections, schemas, and multi-tenant setups?
  4. How are inter-entity dependencies ordered (view-on-view, function-used-by-view)?
  5. On Laravel 13, does the package's own ReadsClassAttributes shadow or duplicate the framework trait, and is behavior identical?
  6. Single-maintainer bus factor: is there a fork/vendor contingency plan?

Integration Approach

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.

  1. Inventory current Laravel/PHP versions and whether any environment already runs 1.1.0.
  2. Branch-level composer require calebdw/laravel-sql-entities:^1.1.1 with the 1.1.0 conflict rule.
  3. Run the package's test suite plus a local attribute-reading assertion (a class with a deliberately non-default entity name should produce that name).
  4. Apply migrations against a scratch database on both the oldest and newest supported Laravel versions.
  5. Staging deploy with a DDL diff review; then production behind the normal migration gate.
  6. Only afterwards, consider whether the package's entity abstraction is worth extending to additional schemas/connections.

Operational Impact

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.

  • Silent attribute misread (the 1.1.0 scenario) producing entities with default configuration rather than an error.
  • Deploy failure from unresolved entity dependency ordering.
  • Class-name resolution failures under aliasing, preloading, or optimized autoloaders, given the class-string-driven lookup path.
  • Trait divergence after a Laravel upgrade, manifesting as changed attribute semantics rather than a clean exception.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk