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

Markable Laravel Package

zareismail/markable

Markable is a Laravel package for adding marks such as likes, bookmarks, or favorites to Eloquent models through polymorphic relationships. It provides simple traits and query helpers to attach, remove, and retrieve marks across your application.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package operates at the Eloquent query-builder layer, extending model query construction with reusable scopes. This is a low-coupling position in a Laravel codebase: it does not touch the service container, HTTP kernel, queue, or event pipeline, and it can be adopted model-by-model rather than as an application-wide dependency. For a TPM this is the favourable case — a bounded, reversible dependency with a blast radius limited to the models that opt in.

Integration feasibility. Integration is a single composer require plus (presumably) Laravel package auto-discovery. There is no schema change, no queue worker, no scheduled job, and no external service. The realistic effort is measured in hours, not sprints, and the rollback is a composer remove plus reverting the model changes.

Technical risk. The v1.0.0 notes are small in volume but carry two signals that matter:

  1. "Fixed wrong scope query call" — a defect in how the scope resolved its underlying query. Scope bugs are the worst class of bug in this layer because they fail silently: the query executes, returns rows, and the wrongness surfaces as subtly incorrect business data rather than an exception. Any pre-1.0 usage in a production path should be treated as having produced potentially incorrect results, and the affected query paths re-validated against known-good expectations.
  2. "Added composer versioning" — versioning arrived at v1.0.0, meaning there is no prior tagged history to reason about constraint drift or regressions across versions. The 1.0.0 tag is therefore a starting line, not evidence of maturity. Treat stability claims as unproven until 1.0.x patch history accumulates.

Secondary risks: unknown maintainer/bus factor, unstated Laravel and PHP version support matrix, and potential scope-name collisions with existing local scopes on host models.

Key questions.

  • Which Laravel and PHP versions are supported, and what are the illuminate/* constraints in composer.json?
  • What exactly did the scope-call defect produce — wrong operator, wrong column, wrong table alias, or dropped constraint? This determines whether historical data is suspect.
  • Is there a test suite, and does it assert generated SQL or only result sets?
  • Who maintains the package, and is there a stated support/security policy?
  • Does the package register global macros or only per-model scopes? (Global registration widens the blast radius considerably.)

Integration Approach

Stack fit. Targets the standard Laravel + Eloquent stack with Composer. No infrastructural prerequisites. The only meaningful fit question is whether the host application's Laravel version falls inside the package's constraint range — a v1.0.0 release with freshly added versioning should be verified rather than assumed.

Migration path. Greenfield adoption is trivial. For teams that previously copy-pasted equivalent scope logic into app/Models or a trait, the migration is a substitution: delete the local implementation, add the package scope, and diff the generated SQL before and after to confirm equivalence. For teams already using the package pre-1.0, pin to ^1.0 explicitly and audit any query path that relied on the scope before the fix.

Compatibility. Composer versioning now exists, so consumers get a real constraint to pin against. Pin to ^1.0 (not *, not dev-master), commit the lockfile, and let patch releases flow only through the normal dependency-update cadence. Because the package sits on illuminate/database, a Laravel major upgrade is the most likely future break — budget a compatibility check at each framework upgrade.

Sequencing.

  1. Pin and install in a local/dev environment; confirm auto-discovery resolves and no macro collisions exist on candidate models.
  2. Add a small test harness that asserts generated SQL — not just row counts — for each adopted scope. This is the control that catches the class of bug v1.0.0 just fixed.
  3. Roll out to one non-critical model in staging; compare query output against the existing implementation for a representative sample.
  4. Expand model-by-model to production, gated on the SQL assertions passing.
  5. Backfill validation of any production query path that used the pre-fix scope.

Operational Impact

Maintenance. Surface area is small and the code is unlikely to require frequent attention. The real maintenance cost is version-watching: a freshly versioned package with a single observable release has no track record of timely framework-compatibility updates. Assign an owner to watch releases and re-verify at each Laravel upgrade.

Support. No stated support model, SLA, or security disclosure process visible in the release notes. For internal tooling or non-critical read paths this is acceptable; for anything on a regulated or revenue-critical surface, the bus factor should be documented as a known accepted risk or mitigated by vendoring the source.

Scaling. Scopes compile into SQL, so there is no runtime interpretation overhead — scaling characteristics are entirely determined by the SQL produced. Two things to watch: (a) scope predicates must be index-aligned, since a scope that filters on an unindexed column will degrade linearly with table growth; (b) scopes that touch relationships can introduce N+1 patterns or unwanted joins if eager loading is not managed at the call site. Neither is a package defect, but both need review at adoption time.

Failure modes.

  • Silent incorrect results — the failure mode demonstrated by the fixed scope-call bug. Highest severity, lowest detectability. Mitigation: SQL-shape assertions in tests.
  • Constraint drift — package pins an illuminate/database range that blocks a framework upgrade. Detectable at composer update, non-silent, low impact.
  • Scope name collision — a package scope shadowing a local scope on the same model, producing unexpected query behaviour. Detectable in review; check per model at adoption.
  • Abandonment — no updates following a Laravel major release, forcing an exit. Mitigation: small code surface means forking or inlining is cheap, which materially caps this risk.

Ramp-up. For a developer already fluent in Eloquent, ramp-up is a few hours: read the scope definitions, write the SQL assertions, adopt on one model. For a developer new to Eloquent scopes, add roughly a day to understand query-scope composition and the ordering/precedence rules. No specialist knowledge, no new infrastructure, no on-call implications.

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