{"action":"created","issue":{"url":"https://api.github.com/repos/theofidry/AliceBundleExtension/issues/27","repository_url":"https://api.github.com/repos/theofidry/AliceBundleExtension","labels_url":"https://api.github.com/repos/theofidry/AliceBundleExtension/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/theofidry/AliceBundleExtension/issues/27/comments","events_url":"https://api.github.com/repos/theofidry/AliceBundleExtension/issues/27/events","html_url":"https://github.com/theofidry/AliceBundleExtension/issues/27","id":281699065,"node_id":"MDU6SXNzdWUyODE2OTkwNjU=","number":27,"title":"hautelook/AliceBundle 2.0","user":{"login":"goetas","id":776743,"node_id":"MDQ6VXNlcjc3Njc0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/776743?v=4","gravatar_id":"","url":"https://api.github.com/users/goetas","html_url":"https://github.com/goetas","followers_url":"https://api.github.com/users/goetas/followers","following_url":"https://api.github.com/users/goetas/following{/other_user}","gists_url":"https://api.github.com/users/goetas/gists{/gist_id}","starred_url":"https://api.github.com/users/goetas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goetas/subscriptions","organizations_url":"https://api.github.com/users/goetas/orgs","repos_url":"https://api.github.com/users/goetas/repos","events_url":"https://api.github.com/users/goetas/events{/privacy}","received_events_url":"https://api.github.com/users/goetas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-13T10:33:30Z","updated_at":"2018-05-31T14:09:02Z","closed_at":null,"author_association":"NONE","body":"Any plan to have AliceBundleExtension compatible with hautelook/AliceBundle 2.0 ?"},"comment":{"url":"https://api.github.com/repos/theofidry/AliceBundleExtension/issues/comments/393542479","html_url":"https://github.com/theofidry/AliceBundleExtension/issues/27#issuecomment-393542479","issue_url":"https://api.github.com/repos/theofidry/AliceBundleExtension/issues/27","id":393542479,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzU0MjQ3OQ==","user":{"login":"goetas","id":776743,"node_id":"MDQ6VXNlcjc3Njc0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/776743?v=4","gravatar_id":"","url":"https://api.github.com/users/goetas","html_url":"https://github.com/goetas","followers_url":"https://api.github.com/users/goetas/followers","following_url":"https://api.github.com/users/goetas/following{/other_user}","gists_url":"https://api.github.com/users/goetas/gists{/gist_id}","starred_url":"https://api.github.com/users/goetas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goetas/subscriptions","organizations_url":"https://api.github.com/users/goetas/orgs","repos_url":"https://api.github.com/users/goetas/repos","events_url":"https://api.github.com/users/goetas/events{/privacy}","received_events_url":"https://api.github.com/users/goetas/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T14:09:02Z","updated_at":"2018-05-31T14:09:02Z","author_association":"NONE","body":"yes, just wrote it on my own... was simpler than expected.\r\n\r\nHere it is\r\n\r\n```php\r\n<?php\r\n\r\nnamespace App\\Tests\\Behat\\Context;\r\n\r\nuse Behat\\Behat\\Context\\Context;\r\nuse Behat\\Gherkin\\Node\\TableNode;\r\nuse Fidry\\AliceDataFixtures\\LoaderInterface;\r\nuse Fidry\\AliceDataFixtures\\Persistence\\PurgeMode;\r\n\r\nclass FidryAliceDataFixturesLoaderContext implements Context\r\n{\r\n\r\n    /**\r\n     * @var LoaderInterface\r\n     */\r\n    private $loader;\r\n\r\n    public function __construct(LoaderInterface $loader)\r\n    {\r\n        $this->loader = $loader;\r\n    }\r\n\r\n    /**\r\n     * @Given the fixtures :fixturesFile are loaded\r\n     * @Given the fixtures file :fixturesFile is loaded\r\n     *\r\n     * @param string $fixturesFile Path to the fixtures\r\n     */\r\n    public function thereAreFixtures($fixturesFile)\r\n    {\r\n        $this->loader->load([$fixturesFile]);\r\n    }\r\n\r\n    /**\r\n     * @Given the following fixtures are loaded:\r\n     * @Given the following fixtures files are loaded:\r\n     * @Given /^the following fixtures are loaded using the (append|delete|truncate) purger:$/\r\n     *\r\n     * @param TableNode $fixturesFiles Path to the fixtures\r\n     */\r\n    public function thereAreSeveralFixtures(TableNode $fixtures, $purgeMode = null)\r\n    {\r\n        switch ((string)$purgeMode){\r\n            case 'append';\r\n                $purgeMode = PurgeMode::createNoPurgeMode();\r\n                break;\r\n            case 'truncate';\r\n                $purgeMode = PurgeMode::createTruncateMode();\r\n                break;\r\n            case 'delete';\r\n            case '';\r\n                $purgeMode = PurgeMode::createDeleteMode();\r\n                break;\r\n           default;\r\n                throw new \\RuntimeException(\"Invalid purge mode\");\r\n                break;\r\n        }\r\n\r\n        $fixturesFiles = [];\r\n\r\n        foreach ($fixtures->getRows() as $fixturesFileRow) {\r\n            $fixturesFiles[] = $fixturesFileRow[0];\r\n        }\r\n        $this->loader->load($fixturesFiles ,  $parameters = [], $objects = [], $purgeMode);\r\n    }\r\n}\r\n\r\n```\r\n\r\nthats it!"}}
{"actor":{"display_login":"goetas"}}