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

Common Laravel Package

inisiatif/common

Shared Laravel utilities for Inisiatif Zakat Indonesia: a Branch model, UUID and integer primary key traits, branch relations, Eloquent repository and tagged-cache abstractions, contracts, and common exceptions for consistent apps.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package fits Laravel 10–12 / PHP 8.2–8.4 applications that need a shared branch/location model, repository abstraction, UUID or integer primary keys, cache-aware repositories, and consistent domain exceptions.
  • It is best positioned as an internal platform package for branch-aware services such as donor management, zakat fund distribution, regional reporting, or branch-scoped administration. It is less compelling for small Laravel apps, teams committed to direct Eloquent usage, or products already using another tenancy/branch solution such as Spatie multi-tenancy, Filament, or Nova.
  • The traits and interfaces support incremental adoption: HasBranch, UuidPrimaryKey, IntegerPrimaryKey, TaggableCacheAware, and AbstractRepository can be introduced in new code without forcing a full rewrite.
  • The package is proprietary and has 0 stars / 0 dependents, so it should be treated as an internal or vendor-supported dependency, not a community-validated open-source component. A TPM should frame adoption as a build-with-leverage decision: reuse Inisiatif Zakat’s conventions where they fit, but retain an exit and ownership plan.

Integration feasibility

  • Initial integration is low-friction: composer require inisiatif/common, Laravel package discovery, optional config publishing, one environment variable (COMMON_BRANCH_TABLE_NAME), and optional migration suppression via Common::ignoreMigrations().
  • Feasibility is high for greenfield services or branch-heavy bounded contexts. It is medium for an existing monolith because repository-pattern retrofit, interface adoption, and branch-table alignment can touch many models and tests.
  • The v3.0.0 namespace move from Inisiatif\Package\Contract\... to Inisiatif\Package\Common\Contracts\... is a clear migration item. Any team adopting mid-project should pin the major version and budget for import refactoring.
  • The README is sufficient for a spike but not for broad onboarding. A TPM should require an internal proof-of-concept, usage examples, and a decision record before mandating adoption.

Technical risk

  • Vendor/maintenance risk: proprietary license, zero external adoption, and sparse release history mean bug fixes, Laravel 13 support, and security patches may depend entirely on the vendor or an internal fork.
  • Lock-in risk: interfaces, exceptions, repository base classes, and branch conventions become part of the application architecture. Replacing them later requires refactoring.
  • Migration risk: the branches migration may conflict with an existing organization/branch schema. The package allows disabling migrations, but data ownership still needs a decision.
  • Cache risk: TaggableCacheAware depends on cache drivers that support tagging, typically Redis or Memcached. File/database cache drivers will not provide equivalent behavior.
  • Abstraction risk: AbstractRepository can improve consistency, but it can also hide Eloquent behavior, complicate query optimization, and add unnecessary indirection if the team is not already comfortable with repository patterns.
  • Documentation risk: the README covers surface area but not edge cases, extension points, cache invalidation behavior, branch scoping semantics, or upgrade guides beyond v3.0.0.

Key questions

  1. Is the proprietary license valid for our organization, affiliates, contractors, and any planned external distribution?
  2. Can we obtain source access, a support commitment, or a fork/maintenance right if the vendor stops maintaining the package?
  3. Which services genuinely need branch-aware data isolation, and which can use Laravel global scopes or existing tenancy tooling?
  4. Do we standardize on UUID primary keys, integer primary keys, or a per-domain choice? What is the migration cost for existing tables?
  5. Which production cache driver will back TaggableCacheAware, and how will cache invalidation be tested?
  6. Is the package’s branches table the system of record, or must it map to an existing organization/master-data service?
  7. Will repository usage be mandatory or optional, and who owns the shared interfaces and code-review standards?
  8. What is the support policy for future Laravel/PHP versions, and what is the exit plan if the package is abandoned?

Integration Approach

Stack fit

  • Adopt where the stack already matches Laravel 10–12 and PHP 8.2–8.4, and where the domain has real branch segmentation. The strongest pilot is a branch-heavy service such as donor management or regional fund distribution.
  • Avoid forcing it into small services, non-Laravel systems, or teams with an established repository/tenancy standard. The package should reduce duplication, not create a second architecture.
  • For a TPM, the value proposition is a golden path: shared branch model, shared repository contracts, shared UUID handling, and shared cache conventions. Publish that golden path internally with examples rather than leaving adoption to individual teams.

Migration path

  1. Discovery and license review: confirm usage rights, support expectations, source access, and whether the package can be forked or vendored internally.
  2. Technical spike: install in a non-production branch, publish config, test package discovery, verify the branches migration, and run a small model/repository example against the target database.
  3. Version pinning: pin a major version and require a documented upgrade note for v3 namespace changes. Avoid floating constraints until the package has an internal compatibility test.
  4. Pilot adoption: introduce HasBranch, UuidPrimaryKey or IntegerPrimaryKey, and AbstractRepository in new models/repositories only. Do not rewrite existing repositories until the pilot proves value.
  5. Data-model decision: either use the package branches table or disable migrations and map HasBranch to the existing branch schema. Document foreign keys, indexes, and reporting implications.
  6. Cache rollout: adopt TaggableCacheAware only after confirming the production cache driver supports tags and after defining invalidation rules for branch and donor data.
  7. Expansion: after the pilot, package internal examples, add contract tests, and roll out service by service.

Compatibility

  • Enforce PHP and Laravel version constraints in CI. The package is not compatible with older Laravel versions, and future Laravel upgrades will need explicit validation.
  • Test package discovery, config publishing, migration order, and branch foreign-key dependencies in the application’s test environment.
  • For teams migrating from the older inisiatif/contract dependency, plan the v3 import rewrite as a separate pull request with static analysis and test coverage.
  • Validate cache behavior against the actual production cache store. Do not assume tagging works with file or database cache drivers.

Sequencing

  • Start with one pilot service and a small set of branch-heavy models. Success criteria should include developer onboarding time, reduction in duplicated branch logic, test coverage, and query/cache performance.
  • Then create an internal enablement package: README addendum, example repository, branch-scoping guide, cache-tagging guide, and upgrade notes.
  • Only after the pilot should the TPM mandate adoption across additional services. Sequencing should be pilot → internal standard → phased rollout → deprecation of duplicate in-house implementations.

Operational Impact

Maintenance

  • Assign an internal owner even if the vendor maintains the package. That owner should track Laravel/PHP compatibility, security advisories, release notes, and breaking changes.
  • Because external adoption is zero, assume the package will not benefit from broad community testing. Maintain a compatibility test matrix and a pinned-version policy.
  • If the license permits, keep a fork or vendor branch as a contingency. If it does not, the exit plan must include replacing the package with native Laravel traits, global scopes, and repository contracts.

Support

  • The README is a starting point, not an operating manual. Support will depend on internal documentation, office hours, and code-review guidance.
  • Expect onboarding friction around repository patterns, branch scoping, UUID migration, and cache tagging. A TPM should fund enablement material and a pilot champion.
  • License compliance and vendor communication should be handled as procurement/support items, not left to individual developers.

Scaling

  • Branch-aware models and tagged caching can improve read-heavy branch dashboards and donor portals, provided branch_id columns are indexed and cache invalidation is designed carefully.
  • Repository abstraction should remain thin. If it hides complex queries or prevents use of Eloquent performance features, teams will work around it and create inconsistency.
  • Multi-service adoption requires a clear source of truth for branches. If each service maintains its own branches table, reporting and data reconciliation become operational risks.

Failure modes

  • Abandonment: no vendor updates for new Laravel/PHP versions. Mitigation: pin versions, maintain a fork/exit plan, and avoid deep coupling outside the pilot boundary.
  • Breaking release: namespace or contract changes similar to v3.0.0. Mitigation: semantic-version pinning, upgrade runbooks, and contract tests.
  • Cache-driver mismatch: tagging fails or behaves differently in production. Mitigation: validate the cache store early and add integration tests.
  • Migration conflict: package branches migration clashes with existing schema. Mitigation: decide early whether to use Common::ignoreMigrations() and map to existing data.
  • Branch data inconsistency: scoped records point to missing or duplicated branches. Mitigation: define ownership, foreign-key rules, and reconciliation jobs.
  • Repository overreach: abstract repository becomes a bottleneck or hides query behavior. Mitigation: keep it optional for complex queries and document allowed escape hatches.

Ramp-up

  • Budget a short pilot, roughly one to two sprints depending on team familiarity, to validate installation, branch mapping, one repository, and one cached endpoint.
  • Provide developer onboarding covering repository contracts, branch scoping, UUID vs integer keys, cache tags, and domain exceptions.
  • Track adoption with concrete TPM metrics: number of services using the package, duplicated branch/repository code removed, defect rate in pilot services, cache hit rate and query counts, and time-to-first-feature for new team members.
  • Treat broad rollout as a product decision gated by pilot results, license clarity, and a named maintenance owner.
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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums