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 Tenant Aware Laravel Package

maize-tech/laravel-tenant-aware

maize-tech/laravel-tenant-aware helps Laravel apps support multi-tenancy by resolving the active tenant, automatically scoping Eloquent models and queries, and keeping tenant data isolated with simple configuration and middleware.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. maize-tech/laravel-tenant-aware is a small, conventional Laravel package that layers multi-tenancy onto Eloquent via traits and global scopes (tenant resolution, tenant-aware models, tenant-aware queued jobs). That is idiomatic Laravel — service provider registration plus opt-in traits — so it composes cleanly with existing application architecture rather than imposing a container or connection model. The 2.2.0 delta does not change this: eight of the nine listed changes are Dependabot bumps to CI actions (aglipanci/laravel-pint-action, dependabot/fetch-metadata), which carry zero runtime footprint. The only substantive change is PR #33, "Add Laravel 13 support and drop PHP 8.1."

Integration feasibility. High, with one gate. The package remains a standard Composer dependency; adopting or upgrading it is a composer.json constraint change plus a config publish, not an application refactor. The gate is the runtime floor: PHP 8.1 is no longer supported, so any service still on 8.1 must remain pinned to 2.1.x. Whether that is acceptable depends entirely on our fleet inventory, which I do not have — this is the single item that must be resolved before we can call the upgrade "routine."

Technical risk. Low in absolute terms, moderate in one specific dimension. The functional risk is near-zero: no public API changes, no behavioural changes to tenant resolution or scoping are described, and the dependency bumps touch only GitHub Actions metadata. The versioning-discipline risk is real, however. Dropping a PHP minor version is a backward-incompatible change for consumers, yet it shipped in a patch-level-adjacent minor (2.1.0 → 2.2.0) rather than a major. That tells us the maintainer treats platform-floor bumps as non-breaking, which means we cannot rely on SemVer alone to gate future upgrades — we need a manual changelog review step in our dependency process. The second-order risk is inherent to the category, not to this release: multi-tenancy isolation is security-critical, and it is being provided by a single-maintainer package. A defect here is a cross-tenant data leak, not a bug.

Key questions.

  • What is the PHP version distribution across our Laravel services, and how many are on 8.1?
  • Is the PHP 8.1 drop accompanied by any change to the supported Laravel matrix below 13 (i.e. are Laravel 10/11 still supported)?
  • Does 2.2.0 alter tenant-resolution behaviour or global-scope application anywhere not captured in the release notes? (Notes suggest no; needs confirmation against the diff.)
  • Does the package enforce isolation purely at query-scope level, or does it also support connection/database-per-tenant? The former leaves raw queries and DB::table() unscoped.
  • What is the project's security policy and historical CVE response time? Not answerable from release notes alone.
  • Is there test coverage asserting cross-tenant non-leakage, and does CI run it?

Caveat: this is a first assessment derived solely from the 2.2.0 changelog. No package source, documentation, or dependency manifest was supplied; architecture and risk conclusions are inferred from the package's stated purpose and should be validated against the repository before commitment.

Integration Approach

Stack fit. Laravel 10–13 with PHP 8.2+ is the target envelope implied by this release; the prior line (2.1.x) remains the correct choice for any PHP 8.1 host. The package is framework-native and adds no new infrastructure — no broker, no sidecar, no separate datastore — so it fits both our monolith and our service-per-domain patterns without changing deployment topology.

Migration path. Upgrade 2.1.0 → 2.2.0 is expected to be source-compatible: update the Composer constraint, run the suite, ship. The work is not in our application code, it is in our runtime images. Two lanes:

  1. Hosts already on PHP 8.2+ — straight constraint bump, normal release cadence.
  2. Hosts on PHP 8.1 — must upgrade the base image before the package, or stay pinned to 2.1.x and accept that no further patches arrive on that line.

Compatibility. Two constraints must be satisfied simultaneously: PHP ≥ 8.2 and Laravel ≤ 13. Because both moved in the same PR, the safest verification is a full matrix run (PHP 8.2/8.3/8.4 × Laravel current/13) rather than spot-checking. Laravel 13 support is additive, so it should not regress existing versions — but "should not" is exactly what the matrix run is for.

Sequencing.

  1. Inventory PHP versions across Laravel services; size the 8.1 population.
  2. Confirm the Laravel support matrix in 2.2.0 against our current framework versions.
  3. Upgrade base images for 8.1 hosts (independent of this package; do it first).
  4. Bump the package constraint, lowest-risk service first (one with strong integration-test coverage of tenant scoping).
  5. Run tenant-isolation regression tests — explicitly including raw-query and queued-job paths, not just Eloquent model reads.
  6. Roll forward service by service; treat Laravel 13 adoption as a separate, later track that this release merely unblocks.
  7. Add a standing step to our dependency-review process: read the changelog for platform-floor changes, do not trust SemVer.

Operational Impact

Maintenance. The project shows signs of active upkeep — Dependabot is wired up and merged, and a maintainer merged the Laravel 13 PR — but the 2.2.0 content is almost entirely automated housekeeping. That is a healthy signal for a small package and a weak signal for roadmap investment. We should expect compatibility maintenance rather than feature development, and plan accordingly: no dependency on new capabilities arriving.

Support. Near-zero incremental support load from this release, since nothing user-facing changed. The support risk is asymmetric: teams pinned to 2.1.x on PHP 8.1 receive no further fixes, including security fixes, and will need an internal decision record acknowledging that exposure. Onboarding cost is low — traits and global scopes are familiar Laravel idioms, so a mid-level engineer can read the package in an afternoon.

Scaling. Unchanged by 2.2.0, but worth stating because it is the operational property that matters most. Global-scope-based tenancy adds a predicate to every tenant-aware query; in a large shared database this puts weight on tenant-id indexes and can degrade badly if composite indexes were designed without the tenant column leading. Any scaling review should treat the package's scoping strategy as a schema-design input, not just a library choice.

Failure modes. Ranked by blast radius:

  1. Silent cross-tenant leakage — tenant context unset, or a query path bypassing the global scope (raw SQL, DB::table(), some relation types). Highest severity, lowest visibility. Mitigate with explicit negative tests in CI, not just happy-path coverage.
  2. Runtime floor mismatch — a host running PHP 8.1 pulling 2.2.0 and failing at boot. Caught early by the deployment matrix; cheap to prevent.
  3. Abandonment — single-maintainer package on a security-critical path. Mitigate with a fork-readiness check: confirm the licence permits forking and that we could vendor the traits if needed.
  4. SemVer surprise — a future platform-floor or behavioural change landing in a minor bump. Mitigate with mandatory changelog review in the dependency pipeline.

Ramp-up. Low. Expect roughly half a day for an engineer familiar with Laravel to read the package, instrument the isolation tests, and land the bump on a first service. The real cost sits in the PHP 8.1 image upgrades on affected hosts and in writing the cross-tenant regression tests — both of which are worth doing regardless of this release, and both of which this release conveniently forces onto the roadmap.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package