pixiekat/symfony-common-helpers
Common helper utilities for Symfony applications, offering reusable services and small conveniences that reduce boilerplate in everyday PHP projects. A practical toolkit for sharing consistent helpers across Symfony apps.
composer require pixiekat/symfony-common-helpers.GrantVoterTrait (or similarly named trait) — release 2.0.3 added new methods there. Inspect the trait source to see the exact helper signatures.VoterInterface::ACCESS_GRANTED / ACCESS_DENIED with repeated conditionals.use GrantVoterTrait; and replace hand-written grant/deny logic with the new methods added in 2.0.3. Typical workflow: implement supports() and voteOnAttribute(), then call the trait’s helpers for common grant conditions (e.g., role checks, attribute matching).vote(). Register it as a custom Gate closure or a policy method. The trait reduces the boilerplate inside the voter, not the bridge.symfony/security-core. Keep the trait usage isolated to that module so Laravel-native code stays on Gate/Policy.composer show symfony/security-core and ensure compatibility with your Laravel/Symfony bridge versions.php -l or your test suite to catch collisions early.ReflectionClass::getTraitNames() and getTraitAliases() or your IDE’s trait method listing to see what 2.0.3 added. The release notes do not name the methods, so inspect the diff or the trait source.GrantVoterTrait::method as protected), or extract the logic into a dedicated service if you need multiple voters to share it without trait coupling.How can I help you explore Laravel packages today?