{"action":"created","issue":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/924","repository_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/924/labels{/name}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/924/comments","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/924/events","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/issues/924","id":136306251,"number":924,"title":"Issue when defining configuration in several files","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/labels/help%20wanted","name":"help wanted","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-25T07:32:04Z","updated_at":"2016-02-25T18:21:54Z","closed_at":null,"body":"We allow to define the configuration in several files. Then, in the DI extension, we merge all configs using the typical Symfony code:\r\n\r\n```php\r\n$backendConfiguration = $this->processConfiguration(new Configuration(), $configs);\r\n```\r\n\r\nThe problem is that the merging is not done as we expect. For example, if the config is defined in the following two files:\r\n\r\n```yaml\r\n# file1.yml\r\neasy_admin:\r\n  entities:\r\n    First:\r\n      class: AppBundle/Entity/Entity1\r\n      # ...\r\n\r\n# file2.yml\r\neasy_admin:\r\n  entities:\r\n    Second:\r\n      class: AppBundle/Entity/Entity2\r\n      # ...\r\n```\r\n\r\nIn the previous `$backendConfig` variable, I expect to have the following:\r\n\r\n```php\r\n\"entities\" => [\r\n  \"First\"  => [...]\r\n  \"Second\" => [...]\r\n]\r\n```\r\n\r\nBut instead I get the following:\r\n\r\n```php\r\n\"entities\" => [\r\n  \"First\"  => [...]\r\n  0        => [...]\r\n]\r\n```\r\n\r\nOnly the first config file maintains the array keys, the others are stored as numeric index keys. The problem is that for us this key is very important, because is the entity name.\r\n\r\nNote: if I add `performNoDeepMerging()` to our config, the result is that all entities are removed except the ones defined in the last file:\r\n\r\n```php\r\n\"entities\" => [\r\n  \"Second\"  => [...]\r\n]\r\n```\r\n\r\n---\r\n\r\nCan anyone please tell me if I'm doing something wrong or if this is a Symfony limitation/feature/issue? Thanks!\r\n"},"comment":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments/188917756","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/issues/924#issuecomment-188917756","issue_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/924","id":188917756,"user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T18:21:54Z","updated_at":"2016-02-25T18:21:54Z","body":"@ogizanagi yes!!! Once again your genius Symfony expertise saved me :)  Thanks!\r\n\r\nThis change requires to do some other internal changes ... so I'm working on it right now."}}