- Is jm/ab-bundle a Laravel package?
- No. jm/ab-bundle is a Symfony 2.x bundle built around Symfony's DI container, kernel event listeners, and Twig template-loading overrides; it has no Laravel service provider, Blade integration, or illuminate/* dependency. For Laravel, treat it as a reference design rather than an installable dependency.
- Can I install jm/ab-bundle in Laravel 10 or 11?
- No, not as a normal Composer dependency. The package is a legacy Symfony 2 bundle, and its Composer constraints will not resolve on PHP 8.x or modern Symfony, so Laravel 10/11 is not a supported target. Any Laravel adoption would be a port of the pattern, not an install.
- How do I use jm/ab-bundle with Blade templates?
- You cannot use it directly with Blade. The original bundle resolves Twig templates and swaps versioned template names at render time, while Laravel would need a ViewFinder decorator or view-name resolver that tries {view}.{variant} and falls back to the base view. That is a rewrite of the template-resolution hook, not a Blade integration.
- What Laravel version supports jm/ab-bundle?
- None. There is no Laravel support in the package, and its Symfony 2.x and PHP constraints rule out modern Laravel stacks. If you need this capability in Laravel 10 or 11, implement the experiment registry, assignment service, and view resolver natively.
- How do I port jm/ab-bundle to Laravel?
- Extract the pattern into four small Laravel components: a config-driven experiment registry mapping experiment keys to variants and weights, an assignment service using deterministic hashing of experiment key plus stable subject ID, a ViewFinder decorator for variant template resolution, and middleware for cookie or session binding. Deterministic bucketing is better than the bundle's random-and-persist approach because it is idempotent, testable without mocks, and survives cookie loss. The effort is a spike plus a focused implementation, not a large integration project.
- Does jm/ab-bundle track conversions or exposures?
- No. The bundle swaps templates; it does not record exposures or outcomes, so it cannot produce a lift estimate by itself. It is a content-variant switcher, not a full experimentation platform with metric attribution and significance testing.
- How does jm/ab-bundle handle variant stickiness and cookies?
- The bundle persists a variant choice per visitor using cookie or session storage, with random selection and persistence as the core assignment strategy. Cookie-only stickiness breaks for cookie-less and privacy-restricted users, which can cause variant churn and sample pollution. For Laravel, prefer deterministic bucketing from a stable subject ID and plan for consent requirements around any assignment cookie.
- Can I use jm/ab-bundle with CDN or full-page caching?
- The bundle does not address interaction with full-page caching, CDN caching, or reverse proxies, and that is a classic source of variant bleed. If a rendered page is cached, the variant key must be part of the cache key or the experiment is invalid. This concern applies equally to any Laravel port of the pattern.
- What are alternatives to jm/ab-bundle for A/B testing in Laravel?
- For Laravel, the practical alternative is a small native implementation: config-driven experiments, deterministic assignment, a view resolver, and explicit exposure and conversion logging. External testing services are another option if you need attribution, significance, and reporting rather than simple template variant swapping. jm/ab-bundle itself is best treated as a reference design because it is abandoned and Symfony-only.
- Is jm/ab-bundle maintained and safe for production?
- No. It is abandoned upstream, has no releases, no security process, no maintainer obligation, zero dependents, and only 23 stars, which means no downstream validation or issue history. Symfony 2 reached end-of-life in 2018, and the package's Composer constraints will not resolve on PHP 8.x or modern Symfony. Do not add it as a dependency; use it only as a pattern reference if at all.