friends-of-behat/variadic-extension
Given I have 1 item, Given I have 2 items, etc.).Adopt if:
Given I have X items where X varies).Look elsewhere if:
For Executives: "This package cuts the time our QA team spends maintaining Behat tests by 30%+ for scenarios with variable inputs—like carts, forms, or API payloads. Instead of writing 10 nearly identical step definitions for ‘Given I have X items,’ we’ll use one method with variadic arguments. It’s a low-risk, high-reward upgrade that aligns with our goal to reduce technical debt in test automation. The MIT license and active maintenance (last release: March 2026) make it a safe bet."
For Engineering/DevOps:
*"The FriendsOfBehat/VariadicExtension lets us replace repetitive step definitions with PHP’s native ...$args syntax, slashing boilerplate. Setup is trivial:
composer require friends-of-behat/variadic-extension --devbehat.yml.
No breaking changes—just cleaner code. Ideal for projects where test scenarios evolve (e.g., adding optional fields to forms). The package is battle-tested (228 stars, active CI) and plays well with existing Behat workflows."*For QA/Testing Teams:
*"Say goodbye to copy-pasting step definitions for every possible argument count. With this extension, one method like Given I have (...$items) items handles all cases. It’s a game-changer for:
How can I help you explore Laravel packages today?