Weave Code
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

Pennant Laravel Package

laravel/pennant

Laravel Pennant is a simple, lightweight feature flag library for Laravel. Define and evaluate feature flags to safely roll out, test, and target functionality in your app. Official docs available on the Laravel website.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Flagging Strategy: Enable gradual rollouts, A/B testing, and canary releases for new features without deploying code changes.
  • Roadmap Execution: Prioritize high-impact features by toggling visibility to specific user segments (e.g., beta testers, paid users) via scopes (e.g., user_id, role).
  • Build vs. Buy: Avoid reinventing feature flag infrastructure; leverage a battle-tested, Laravel-native solution with minimal overhead.
  • Use Cases:
    • Dark Launching: Ship features to a subset of users (e.g., 10% of traffic) to monitor performance/UX before full release.
    • Environment Control: Toggle features per environment (e.g., disable new_payment_flow in staging).
    • Experimentation: Run A/B tests by routing users to different feature variants (e.g., dark_mode_v2 vs. dark_mode_v1).
    • Deprecation: Phase out legacy features (e.g., old_checkout) with a sunset timeline.
    • Security: Restrict sensitive endpoints (e.g., /admin) via middleware integration.
    • Analytics: Track feature adoption rates via events (e.g., FeatureUpdated) or custom metrics.

When to Consider This Package

Adopt Pennant if:

  • Your stack is Laravel-based (PHP 8.1+), and you need a lightweight, native feature flag solution.
  • You require scoped flags (e.g., user-specific, role-based, or environment-specific toggles).
  • You want performance optimizations (e.g., bulk operations, cache integration) for high-traffic apps.
  • Your team prefers developer-friendly syntax (e.g., @feature('new_ui'), middleware, Blade directives).
  • You need auditability (events, timestamps, and changelog tracking for flags).
  • You’re using Laravel 11–13 and want seamless integration with Eloquent, caching, and migrations.

Look elsewhere if:

  • You need multi-language support (Pennant is PHP/Laravel-only).
  • Your team requires advanced analytics (e.g., real-time dashboards) beyond basic flag tracking.
  • You’re in a serverless/edge-computing environment where Laravel isn’t viable.
  • You need enterprise-grade features like hierarchical flags, rate limiting, or SSO integration (consider commercial tools like LaunchDarkly or Flagsmith).
  • Your app is monolithic with non-PHP services; Pennant’s Laravel-centric design may not fit.

How to Pitch It (Stakeholders)

For Executives: "Pennant lets us ship faster and safer by controlling feature visibility with a flip of a switch—no code deployments needed. For example, we can test the new subscription flow with 5% of users before rolling it out globally. It’s lightweight, integrates natively with Laravel, and reduces risk by letting us toggle features on/off in real-time. The cost? Zero—it’s open-source and maintained by the Laravel team. ROI? Fewer bugs in production, quicker iterations, and data-driven decisions on what sticks with users."

For Engineers: *"Pennant gives us a Laravel-native, scalable way to manage feature flags with:

  • Zero boilerplate: Use @feature('flag') in Blade, feature()->bool('flag') in code, or middleware like EnsureFeaturesAreActive.
  • Performance: Optimized for bulk operations (e.g., Feature::update([...])) and cache-friendly.
  • Flexibility: Scopes (e.g., feature()->bool('pro_features', user: auth()->user())), events, and custom drivers.
  • Maintenance: Actively developed (Laravel 13 support, PHP 8.5 ready), with clear docs and community backing. It’s the LaunchDarkly alternative for teams that want control without vendor lock-in."*

For Designers/Product Managers: *"With Pennant, we can:

  • Test hypotheses without building separate branches (e.g., ‘Does this new CTA convert better?’).
  • Segment users by role, region, or behavior (e.g., ‘Show the loyalty program to VIPs only’).
  • Kill switches: Disable broken features instantly (e.g., ‘Turn off the buggy checkout’).
  • Align with dev: Flags sync with our existing Laravel workflow—no extra tools to learn."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport