{"id":13614309,"url":"https://github.com/FriendsOfBehat/VariadicExtension","last_synced_at":"2025-04-13T18:32:45.315Z","repository":{"id":10674110,"uuid":"66588782","full_name":"FriendsOfBehat/VariadicExtension","owner":"FriendsOfBehat","description":"🍺 Extension adding variadic arguments support to Behat steps definitions","archived":false,"fork":false,"pushed_at":"2024-01-30T11:29:04.000Z","size":69,"stargazers_count":226,"open_issues_count":1,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-15T02:32:20.344Z","etag":null,"topics":["behat","behat-extension","php","variadic-arguments"],"latest_commit_sha":null,"homepage":"","language":"Gherkin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FriendsOfBehat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-25T19:56:58.000Z","updated_at":"2024-06-27T19:47:52.000Z","dependencies_parsed_at":"2024-06-18T12:27:05.235Z","dependency_job_id":"b6cc25cc-63e2-437b-a280-81d565c35d38","html_url":"https://github.com/FriendsOfBehat/VariadicExtension","commit_stats":{"total_commits":60,"total_committers":4,"mean_commits":15.0,"dds":0.5,"last_synced_commit":"c6930ed7bc6aaeef3f5936d107868c51e7ff013a"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfBehat%2FVariadicExtension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfBehat%2FVariadicExtension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfBehat%2FVariadicExtension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendsOfBehat%2FVariadicExtension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FriendsOfBehat","download_url":"https://codeload.github.com/FriendsOfBehat/VariadicExtension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223600211,"owners_count":17171607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["behat","behat-extension","php","variadic-arguments"],"created_at":"2024-08-01T20:00:59.714Z","updated_at":"2024-11-07T22:31:05.891Z","avatar_url":"https://github.com/FriendsOfBehat.png","language":"Gherkin","funding_links":[],"categories":["Gherkin"],"sub_categories":[],"readme":"# Variadic Extension [![License](https://img.shields.io/packagist/l/friends-of-behat/variadic-extension.svg)](https://packagist.org/packages/friends-of-behat/variadic-extension) [![Version](https://img.shields.io/packagist/v/friends-of-behat/variadic-extension.svg)](https://packagist.org/packages/friends-of-behat/variadic-extension) [![Build](https://github.com/FriendsOfBehat/VariadicExtension/actions/workflows/build.yml/badge.svg)](https://github.com/FriendsOfBehat/VariadicExtension/actions/workflows/build.yml) [![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/FriendsOfBehat/VariadicExtension.svg)](https://scrutinizer-ci.com/g/FriendsOfBehat/VariadicExtension/)\n\nAdds variadic arguments support to Behat steps definitions.\n\n## Usage\n\n1. Install it:\n    \n    ```bash\n    $ composer require friends-of-behat/variadic-extension --dev\n    ```\n\n2. Enable it in your Behat configuration:\n    \n    ```yaml\n    # behat.yml\n    default:\n        # ...\n        extensions:\n            FriendsOfBehat\\VariadicExtension: ~\n    ```\n\n3. You can use variadic arguments in steps definitions!\n\n    ```php\n    /**\n     * @Given the store has( also) :firstProductName and :secondProductName products\n     * @Given the store has( also) :firstProductName, :secondProductName and :thirdProductName products\n     * @Given the store has( also) :firstProductName, :secondProductName, :thirdProductName and :fourthProductName products\n     */\n    public function theStoreHasProducts(...$productsNames)\n    {\n        foreach ($productsNames as $productName) {\n            $this-\u003esaveProduct($this-\u003ecreateProduct($productName));\n        }\n    }\n   \n   /**\n     * @Given /^(this channel) has \"([^\"]+)\", \"([^\"]+)\", \"([^\"]+)\" and \"([^\"]+)\" products$/\n     */\n    public function thisChannelHasProducts(ChannelInterface $channel, ...$productsNames)\n    {\n        foreach ($productsNames as $productName) {\n            $product = $this-\u003ecreateProduct($productName, 0, $channel);\n\n            $this-\u003esaveProduct($product);\n        }\n    }\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFriendsOfBehat%2FVariadicExtension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFriendsOfBehat%2FVariadicExtension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFriendsOfBehat%2FVariadicExtension/lists"}