{"action":"created","issue":{"url":"https://api.github.com/repos/qandidate-labs/qandidate-toggle-bundle/issues/8","labels_url":"https://api.github.com/repos/qandidate-labs/qandidate-toggle-bundle/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/qandidate-labs/qandidate-toggle-bundle/issues/8/comments","events_url":"https://api.github.com/repos/qandidate-labs/qandidate-toggle-bundle/issues/8/events","html_url":"https://github.com/qandidate-labs/qandidate-toggle-bundle/issues/8","id":55198416,"number":8,"title":"Add support for Collections other then in_memory and redis ","user":{"login":"ricbra","id":872886,"avatar_url":"https://avatars.githubusercontent.com/u/872886?v=3","gravatar_id":"","url":"https://api.github.com/users/ricbra","html_url":"https://github.com/ricbra","followers_url":"https://api.github.com/users/ricbra/followers","following_url":"https://api.github.com/users/ricbra/following{/other_user}","gists_url":"https://api.github.com/users/ricbra/gists{/gist_id}","starred_url":"https://api.github.com/users/ricbra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricbra/subscriptions","organizations_url":"https://api.github.com/users/ricbra/orgs","repos_url":"https://api.github.com/users/ricbra/repos","events_url":"https://api.github.com/users/ricbra/events{/privacy}","received_events_url":"https://api.github.com/users/ricbra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-22T19:37:51Z","updated_at":"2015-01-26T10:48:11Z","closed_at":null,"body":"Currently using the bundle with another storage then Redis is quite difficult. I tried the InMemoryCollection but basically its impossible to register toggles via the container configuration. While it's possible to add toggles via the <code>ToggleManager</code> as well as the <code>ToggleCollection</code> it's not supported to inject anything in there. \r\n\r\nA small summary of my journey so far:\r\n\r\nMy first attempt was to create a custom <code>ToggleCollection</code> and register it as <code>qandidate.toggle.collection.custom</code>. Then in config,yml I tried:\r\n\r\n```yml\r\nqandidate_toggle:\r\n    persistence: custom\r\n```\r\n\r\nThis would be registered in <code>QandidateToggleExtension</code> as:\r\n\r\n```php\r\n $container->setAlias('qandidate.toggle.collection', 'qandidate.toggle.collection.' . $collection);\r\n```\r\n But unfortunately the config prohibits anything else then <code>redis</code> and <code>in_memory</code>.\r\n\r\nSo what options are left? I could override <code>qandidate.toggle.collection.in_memory.class</code> parameter in my bundle.  Or override <code>qandidate.toggle.manager</code> service definition in my bundle. Both solutions are a bit hacky if you ask me.\r\n\r\nSo possible solutions I can think of:\r\n- add a YmlCollection (or perhaps more generic FileCollection with support for xml, yml, php file etc.)\r\n- add support for providing a custom collection factory (by service id) so users are completely free to build their toggle collection\r\n\r\nAny thoughts on this? I'm glad to do some PR to fix this.\r\n\r\nAlso, the bundles documentation could use some love ;);"},"comment":{"url":"https://api.github.com/repos/qandidate-labs/qandidate-toggle-bundle/issues/comments/71443075","html_url":"https://github.com/qandidate-labs/qandidate-toggle-bundle/issues/8#issuecomment-71443075","issue_url":"https://api.github.com/repos/qandidate-labs/qandidate-toggle-bundle/issues/8","id":71443075,"user":{"login":"asm89","id":657357,"avatar_url":"https://avatars.githubusercontent.com/u/657357?v=3","gravatar_id":"","url":"https://api.github.com/users/asm89","html_url":"https://github.com/asm89","followers_url":"https://api.github.com/users/asm89/followers","following_url":"https://api.github.com/users/asm89/following{/other_user}","gists_url":"https://api.github.com/users/asm89/gists{/gist_id}","starred_url":"https://api.github.com/users/asm89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asm89/subscriptions","organizations_url":"https://api.github.com/users/asm89/orgs","repos_url":"https://api.github.com/users/asm89/repos","events_url":"https://api.github.com/users/asm89/events{/privacy}","received_events_url":"https://api.github.com/users/asm89/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T10:48:11Z","updated_at":"2015-01-26T10:48:11Z","body":"@ricbra \r\n\r\n> So possible solutions I can think of:\r\n> - add a YmlCollection (or perhaps more generic FileCollection with support for xml, yml, php file etc.)\r\n\r\n:+1: that would be a great addition to the bundle (maybe to the library as well?). Would you like to work on this?\r\n\r\n> - add support for providing a custom collection factory (by service id) so users are completely free to build their toggle collection\r\n\r\n:+1: for this too. We could make it possible to just set the service id you want to use."}}