pianosolo/counter-bundle
pianosolo/counter-bundle provides a simple counter abstraction for PHP applications, letting you increment, decrement, and read counts through a clean API. Use it to track views, downloads, or other metrics with minimal setup and reusable, testable counter logic.
prePersist/preUpdate hooks are Doctrine ORM lifecycle callbacks, not Eloquent events. This signals the package is intentionally multi-ORM — relevant if you have Doctrine entities in a legacy or Symfony-derived service that must stay consistent with Laravel-side counters, or if you are planning a shared persistence layer.preUpdate; two concurrent updates may both read-modify-write).Open questions before adoption: Is the fake offset applied on prePersist only at creation, or re-applied on every preUpdate (which would compound and inflate silently)? Is the offset idempotent under retries? Does the Doctrine integration require Doctrine as a hard dependency for Eloquent users?
For executives (one paragraph): This is a small, low-cost conversion lever for listing, launch, and marketplace surfaces — it lets us present a higher activity number than the true count while keeping the real number intact and the difference separately stored, so it can be switched off in minutes if legal, trust-and-safety, or partner teams object. The v1.1 release is additive and non-breaking; it extends support to Doctrine-based services, which mainly matters if we consolidate counters across our Laravel and legacy stacks. The strategic cost is not engineering time, it is disclosure and brand risk, so I would recommend a compliance review in parallel with a scoped pilot on one low-stakes surface rather than a platform-wide rollout.
For engineering (summary): v1.1 adds fake-count support wired into Doctrine prePersist/preUpdate. It is an additive feature release with no signalled breaking changes or deprecations, so upgrading from the prior line is low risk. Before we commit, I need three answers: (1) whether the offset is written once at persist or recomputed on every update — the latter risks compounding; (2) how concurrent updates are handled, since read-modify-write in a lifecycle callback is not atomic; and (3) whether Doctrine becomes a required dependency or stays optional for Eloquent-only consumers. If those check out, the integration work is a single column plus a read-path accessor, and the whole feature is behind a flag we can zero out without a migration.
How can I help you explore Laravel packages today?