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

Xetaravel Mentions Laravel Package

xetaio/xetaravel-mentions

A Laravel package for parsing and rendering @mentions in text, converting them into links and optionally notifying mentioned users. Includes a user trait, configurable mention syntax, events, and Blade helpers for easy integration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit Xetaravel-Mentions is a small, single-purpose Laravel package: two model traits (an author-side trait for parsing mentions, a target-side Mentionable trait), a published config file, one migration for a polymorphic mentions table, a parser class, and a Blade helper for rendering @handle as links. It fits cleanly into a standard Laravel app as a domain utility for comments, posts, tickets, and activity feeds — there is no service provider surface to manage beyond package discovery and no coupling to queues, routing, or auth. It is a "feature building block," not infrastructure.

The 12.0.0 release is a single-line change (Laravel 12 compatibility, PR #35). The major version bump is the meaningful signal, not the code change: the package tracks Laravel's annual major cadence, so a major release here is primarily a compatibility boundary declaration, not a feature or behavior release. Treat the version number as "supports Laravel 12," and verify whether it also still supports 11.

Integration feasibility High. The expected effort for a greenfield adoption is on the order of one to three engineering days:

  1. composer require xetaio/xetaravel-mentions
  2. Publish config and migration, run migration
  3. Add the author trait to content models, the mentionable trait to user-like models
  4. Invoke the mention parse/sync step in the create/update path (or a queued job)
  5. Wire notifications if mention alerts are in scope, and the Blade rendering helper for output

The main non-trivial work is product policy, not code: what counts as a valid mention, whether mentions trigger notifications, whether edits re-notify, and how to render untrusted handles safely.

Technical risk

  • Maintainer/bus factor. Effectively a single-maintainer package with a small community. No evidence of a formal security policy or a large contributor base. Mitigation: vendor or fork on adoption; the code surface is small enough to own.
  • Parsing correctness. Mention detection is regex-based. Known edge-case classes: email addresses ([email protected]), URL/handle collisions, mentions inside code fences or quoted text, unicode/emoji-adjacent handles, and long display names vs. usernames. These are product-visible defects, not crashes, but they erode trust.
  • Version-scheme churn. Because majors are pinned to Laravel majors, every Laravel upgrade forces a dependency decision on this package. That is an annual, predictable maintenance task — plan for it rather than being surprised by it.
  • Upgrade opacity. The release notes do not state whether Laravel 11 support was dropped, whether the illuminate/* constraint widened or narrowed, or whether the migration changed. That is the single largest unknown for a 11.x shop.

Key questions

  1. Does 12.0.0 still support Laravel 11? Or is the illuminate/support constraint now ^12.0 only? This determines whether the upgrade is optional or forced.
  2. Does the migration/schema change between 11.x and 12.0.0? If yes, is it additive and backward-compatible?
  3. What are the PHP version requirements (8.2+? 8.3+?) and what does the CI matrix actually exercise?
  4. Is there a documented security policy / disclosure channel? What is the maintainer's response latency on issues?
  5. Does the notification contract (mentionable notification trait) remain stable, or does it now depend on Laravel 12 notification API changes?
  6. Is the Blade rendering helper escaping handles safely (XSS) — and does it need to change for Laravel 12's Blade/Echo behavior?

Integration Approach

Stack fit Fits any conventional Laravel app with Eloquent models and a relational database (MySQL/Postgres; SQLite is fine for the package's simple schema). It expects a users-like table with a unique handle column. No hard dependency on a front end, though the Blade helper assumes server-rendered views; in an SPA/Inertia app you would use the parser server-side and render links client-side. It coexists fine with a notifications stack and with queue workers.

Migration path (11.x → 12.0.0) Because there is no prior assessment and no confirmed feature delta, run this as a low-risk, reversible upgrade:

  1. Confirm the new composer.json constraints — specifically whether 12.0.0 excludes Laravel 11. If it does, this upgrade is gated on the app's own Laravel 12 migration, and 11.x becomes a pinned, unsupported-by-latest version you must consciously accept for a period.
  2. Diff config/mentions.php against your published copy. Config keys silently not merged on vendor:publish are a classic source of "it stopped working."
  3. Check whether the migration file changed; if so, generate a new migration rather than re-running an edited one.
  4. Run the app's existing mention-related tests plus a parsing golden-file test (emails, URLs, code blocks, unicode) before and after.
  5. Verify rendered output escaping and notification dispatch in a staging environment.

Compatibility Primary constraint is the app's Laravel and PHP versions. Secondary compatibility: the notification trait versus your existing notification classes; the mentionable morph map versus any existing polymorphic conventions; database collation for handle matching (case sensitivity is a real product decision).

Sequencing

  1. Spike (½ day): install in a branch, confirm parsing behavior and rendered output with representative content.
  2. Decide the version strategy: adopt 12.0.0 only if you are on Laravel 12, or if the constraints permit Laravel 11. Otherwise pin to 11.x and record it as technical debt with an owner and a review date.
  3. Ship the feature behind a flag, then enable notifications after confirming dedupe behavior on edits.
  4. Only then migrate the rest of the app toward Laravel 12 if that is on the roadmap.
  5. Establish an upgrade ritual keyed to Laravel's annual release: bump, run parsing golden files, ship.

Operational Impact

Maintenance Ongoing cost is low in absolute terms but recurring by design: expect one mandatory version decision per Laravel major. Budget roughly a day per year for the bump plus regression testing. Because the package is small and stable, most years the correct action will be "bump constraint, run tests, ship" — but that is only true if the app has tests that actually cover mention parsing.

Support Support risk concentrates in one person. There is no vendor SLA, no LTS commitment, and no guarantee of a release aligned to a given Laravel patch. For a product feature of meaningful user visibility (notifications!), that argues for either (a) an internal fork with a named owner, or (b) a thin internal abstraction layer over the parser so the package can be swapped without touching call sites. Option (b) is cheap and is the recommended posture.

Scaling

  • Write amplification: mention records are written per mentioned user per content item. A post mentioning 20 people creates 20 rows. At high content volume this table grows faster than the content table; index (mentionable_type, mentionable_id) and (mentioned_id, created_at) and plan a retention policy.
  • Synchronous cost: parsing plus inserts in the request path adds latency proportional to handle count. Move mention resolution and notification fan-out to a queue once content volume or mention counts rise.
  • Bulk operations: imports and backfills must bypass mention parsing or they will thrash the table and the notification queue.
  • Read side: "who mentioned me" feeds are a straightforward indexed query; "notifications for mentions" piggybacks on Laravel's notifications table and inherits its scaling characteristics.

Failure modes

  • Silent no-op: an unknown or renamed handle is simply not resolved — no error, no mention. Users perceive this as a broken feature. Instrument it and consider a product-level warning.
  • False positives: emails, URLs, and code blocks parsed as mentions cause spurious notifications — the highest-severity user-facing failure.
  • Duplicate notifications on edit; or notifications lost if the queue job fails after the mention rows are committed (no transactional coupling between parse and notify).
  • Config drift after an upgrade producing a parser that no longer matches production data.
  • Upstream abandonment: no release for a new Laravel major, forcing an emergency fork on the framework-upgrade critical path.

Ramp-up Low. A mid-level Laravel developer can be productive in under a day; the entire integration surface is two traits, one config file, and one migration. The learning cost is not in the package API but in the parsing edge cases and notification policy, which are product decisions that should be written down (valid handle charset, edit semantics, dedupe window, notification opt-out) before the feature ships rather than discovered in support tickets.

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.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin