roundly-consulting/likes-for-laravel
A lightweight Laravel package for adding like and unlike functionality to Eloquent models. Supports polymorphic relationships, toggle helpers, like counts, and eager loading so you can build reactions, favorites, or upvotes with minimal setup.
actor_type and likeable_type in the Liked, Unliked, and ReactionChanged broadcast payloads from the PHP class name (App\Models\User) to the class basename (User). This is a wire-format change visible to every subscriber of the likeable's channel, so it belongs in a release note and an upgrade plan, not a routine composer update.App\Models\User / App\Models\Post will silently stop matching. Because the change is silent (no exception, just no match), the product risk is missed notifications or broken reaction feeds rather than a loud failure — plan a search for string matches in your own code and in any external consumer contracts.App\Models\...) to every channel subscriber and hard-coded your internal model layout into the payload. Basenames are a cleaner, more portable contract — a modest correctness and hygiene win, not a feature.user, post) lose that indirection. Decide explicitly whether basename is an acceptable long-term contract for you; if not, this is a reason to wrap the payload in your own DTO rather than consume it raw.testing ^1.6 and PostgreSQL/MySQL CI legs on tmpfs affect maintainer throughput, not our integration. No roadmap impact.User, Post) as your long-term payload contract.actor_type/likeable_type, so upstream naming changes stop being your migration. That is a genuine build-vs-buy input this release surfaces for the first time.For executives: This release is small but not purely cosmetic. It changes the contents of our real-time like/reaction notifications: the actor and subject are now identified as User / Post instead of the full internal class path. Functionally the events still fire and the channels are unchanged, but any client or integration that was matching on the old string must be updated at the same time or it will quietly stop responding. The upside is that we stop exposing our internal code namespace to everyone subscribed to those channels, and the payload becomes more portable if we ever restructure our models. The cost is a short, contained engineering task plus a coordination step for any mobile or third-party consumer. Two things worth flagging upward: it is a one-time migration, not an ongoing cost, and because the vendor shipped a behaviour change in a patch version, I'd recommend we pin the exact version and review future bumps rather than auto-updating.
For engineering: 1.1.2 changes actor_type and likeable_type in the Liked, Unliked, and ReactionChanged broadcast payloads from the FQCN (App\Models\User) to the basename (User), both with and without a morph map — previously a registered morph map produced the alias, now it produces the basename. Channel names are untouched, so no subscription or authorization changes are needed. Before bumping: grep for literal App\Models\ and for morph aliases in listeners, front-end event handlers, and any outbound webhook or analytics consumer. Update in-repo listeners and the package version in the same deploy so matching stays atomic. For consumers we cannot redeploy atomically (cached SPA bundles, shipped mobile apps, external partners), accept both old and new values behind a short compatibility check and remove the old branch after the client population has rolled over. Verify with an end-to-end like/unlike/reaction in staging, asserting the handler actually fires — a mismatch here fails silently rather than erroring. Also note this shipped as a patch with a breaking payload change; pin to 1.1.2 exactly rather than a caret range, and raise the semver question with the maintainer if this package is on a critical path. The dev testing ^1.6 and CI tmpfs items need nothing from us.
How can I help you explore Laravel packages today?