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
Efficient Vote Bundle

Efficient Vote Bundle Laravel Package

kinulab/efficient-vote-bundle

A lightweight Symfony bundle for implementing efficient voting in PHP applications. Add vote handling with minimal overhead, keep logic clean, and integrate quickly into existing projects. Suitable for polls, ratings, and other simple voting features.

View on GitHub
Deep Wiki
Context7

Provide a system to enhance performances of the security by voters

Frequently asked questions about Efficient Vote Bundle
Is kinulab/efficient-vote-bundle compatible with Laravel?
No. It is a Symfony bundle that plugs into Symfony's Security component, specifically the VoterInterface and AccessDecisionManager pipeline, via bundle registration, DI service definitions, and compiler passes. Laravel has no voter chain, no bundle registration hook, and no compiler-pass mechanism, so the architectural fit is zero. composer require will succeed, but nothing will actually boot.
How do I install kinulab/efficient-vote-bundle?
On a Symfony application you would run composer require kinulab/efficient-vote-bundle and then register the bundle in bundles.php or config/bundles.php and wire up the service configuration. On Laravel there is no equivalent registration step, so there is no supported install path beyond the vendor directory being populated. Treat any Laravel install as non-functional.
Does it work with Laravel 10 or Laravel 11?
There is no supported Laravel integration for Laravel 10 or 11. Laravel requires PHP 8.1+ and authorizes through Illuminate\Auth\Access\Gate and Policies, while this package's symfony/security-* dependencies would sit unused next to Laravel's own vendored Symfony components. That creates a real composer update version-skew risk with no functional payoff.
Can I use it with Laravel Gate and Policies?
No, there is no adapter, service provider, or Laravel-facing API to bridge the two. The only transferable part is the underlying idea of memoizing authorization decisions to avoid repeated checks on hot paths. In Laravel you would reimplement that as a request-scoped decorator around Gate, keyed on user id, ability, model class, model key, and tenant.
Does it cache decisions per request or across requests?
This was not confirmed during evaluation, and it is the single most important question to answer before adopting anything in an authorization path. Per-request in-memory memoization is comparatively safe; cross-request persistence introduces stale grants after role revocation and cache-key collision risk across users and tenants. Do not assume either behavior without reading the source and its invalidation contract.
Is kinulab/efficient-vote-bundle safe to use in production?
Treat it with caution for anything in the authorization path. The project shows roughly 2 stars, 0 dependents, single-org provenance, and no observable security disclosure process. Authorization code has security-critical failure modes such as stale grants after role revocation and fail-open behavior when a cache backend errors, so unproven and unmaintained is a materially worse trade than boring and owned in-house. The MIT license removes the legal blocker, not the audit burden.
What is the best Laravel alternative for faster authorization or voting?
First measure whether voter or policy evaluation is actually a hotspot by instrumenting Gate and Policy calls with Telescope or a thin decorator to get call volume and p95 latency. If the overhead is material, build a request-scoped memoizing decorator around Gate with invalidation hooks on role and permission changes, and ship it as an in-house package under your own namespace with tests. That keeps the optimization inside Laravel's Gate/Policy model instead of importing a foreign pipeline.
What PHP and Symfony version constraints does the package declare?
The package declares constraints for php, symfony/security-core, and symfony/framework-bundle, but the specific versions and the last commit and tag dates were not confirmed in the evaluation. Check composer.json and the release history directly before depending on it. Version skew against Laravel's vendored Symfony components is a realistic conflict source even if installation succeeds.
Can I use it for polls, star ratings, or upvote features?
Probably not the right tool. The bundle is oriented around authorization-style voting through Symfony's voter pipeline rather than end-user polls or rating widgets. In Laravel, polls and ratings are better modeled as Eloquent vote records tallied with query aggregates and a uniqueness constraint per user and subject, which is simpler and avoids a framework mismatch.
How should I test voting logic and cache invalidation?
Write tests that cover role changes, subject mutation, tenant isolation, and cache backend errors, since those are where authorization memoization fails. The package's own suite was not confirmed to cover these cases. If you build an in-house Gate decorator instead, explicitly assert fail-closed behavior on backend errors and that keys include user id, ability, model class, model key, and tenant.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core