{"action":"opened","issue":{"url":"https://api.github.com/repos/h4cc/AliceFixturesBundle/issues/44","labels_url":"https://api.github.com/repos/h4cc/AliceFixturesBundle/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/h4cc/AliceFixturesBundle/issues/44/comments","events_url":"https://api.github.com/repos/h4cc/AliceFixturesBundle/issues/44/events","html_url":"https://github.com/h4cc/AliceFixturesBundle/issues/44","id":74935599,"number":44,"title":"Using custom faker data providers without standard doctrine fixtures","user":{"login":"paquitodev","id":627886,"avatar_url":"https://avatars.githubusercontent.com/u/627886?v=3","gravatar_id":"","url":"https://api.github.com/users/paquitodev","html_url":"https://github.com/paquitodev","followers_url":"https://api.github.com/users/paquitodev/followers","following_url":"https://api.github.com/users/paquitodev/following{/other_user}","gists_url":"https://api.github.com/users/paquitodev/gists{/gist_id}","starred_url":"https://api.github.com/users/paquitodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paquitodev/subscriptions","organizations_url":"https://api.github.com/users/paquitodev/orgs","repos_url":"https://api.github.com/users/paquitodev/repos","events_url":"https://api.github.com/users/paquitodev/events{/privacy}","received_events_url":"https://api.github.com/users/paquitodev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-10T14:54:37Z","updated_at":"2015-05-10T14:54:37Z","closed_at":null,"body":"I am setting up [NelmioAlice][1] and [Faker][2] in a Symfony2 project through AlixeFixturesBundle. I need a *composed* fixture like for example:\r\n\r\n    representative{1..100}:\r\n        veeva_rep_id (unique): qlv_005800000067SwzAAE\r\n\r\nwhich is a `qlv_` prefix followed by a random 18 characters string. The best way I found to get this done (if anyone knows another one or a better way to get this done let me know) was using a custom faker and I wrote this piece of code:\r\n\r\n    <?php\r\n    /**\r\n     * FakerProvider: VeevaProvider.\r\n     */\r\n    \r\n    namespace PDI\\PDOneBundle\\DataFixtures;\r\n    \r\n    use ReverseRegex\\Lexer;\r\n    use ReverseRegex\\Random\\SimpleRandom;\r\n    use ReverseRegex\\Parser;\r\n    use ReverseRegex\\Generator\\Scope;\r\n    \r\n    class VeevaProvider extends \\Faker\\Provider\\Base\r\n    {\r\n        public function veevaRepId()\r\n        {\r\n            $lexer = new  Lexer('[a-zA-Z0-9]{18}');\r\n            $gen = new SimpleRandom(10007);\r\n            $result = '';\r\n    \r\n            $parser = new Parser($lexer, new Scope(), new Scope());\r\n            $parser->parse()->getResult()->generate($result, $gen);\r\n    \r\n            return 'qlv_' . $result;\r\n        }\r\n    }\r\n\r\nAs explain [here][4] in Faker docs. Now, [here][5] at NelmioAlice the author explain how to add *Custom Faker Data Providers* but it uses Doctrine Fixtures which I don't so, having this, how do I load and use the provider I wrote on the fixtures? Any advice around this? How the custom provider should be added and used on this bundle?\r\n\r\n [1]: https://github.com/nelmio/alice\r\n [2]: https://github.com/fzaninotto/Faker\r\n [4]: https://github.com/fzaninotto/Faker#faker-internals-understanding-providers\r\n [5]: https://github.com/nelmio/alice#custom-faker-data-providers"}}