{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/doctrine2/issues/1294","labels_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1294/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1294/comments","events_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1294/events","html_url":"https://github.com/doctrine/doctrine2/pull/1294","id":55842726,"number":1294,"title":"Avoid Connection error when calling ClassMetadataFactor::getAllMetadata()","user":{"login":"weaverryan","id":121003,"avatar_url":"https://avatars.githubusercontent.com/u/121003?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverryan","html_url":"https://github.com/weaverryan","followers_url":"https://api.github.com/users/weaverryan/followers","following_url":"https://api.github.com/users/weaverryan/following{/other_user}","gists_url":"https://api.github.com/users/weaverryan/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverryan/subscriptions","organizations_url":"https://api.github.com/users/weaverryan/orgs","repos_url":"https://api.github.com/users/weaverryan/repos","events_url":"https://api.github.com/users/weaverryan/events{/privacy}","received_events_url":"https://api.github.com/users/weaverryan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"guilhermeblanco","id":208883,"avatar_url":"https://avatars.githubusercontent.com/u/208883?v=3","gravatar_id":"","url":"https://api.github.com/users/guilhermeblanco","html_url":"https://github.com/guilhermeblanco","followers_url":"https://api.github.com/users/guilhermeblanco/followers","following_url":"https://api.github.com/users/guilhermeblanco/following{/other_user}","gists_url":"https://api.github.com/users/guilhermeblanco/gists{/gist_id}","starred_url":"https://api.github.com/users/guilhermeblanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilhermeblanco/subscriptions","organizations_url":"https://api.github.com/users/guilhermeblanco/orgs","repos_url":"https://api.github.com/users/guilhermeblanco/repos","events_url":"https://api.github.com/users/guilhermeblanco/events{/privacy}","received_events_url":"https://api.github.com/users/guilhermeblanco/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-01-29T01:25:23Z","updated_at":"2015-02-04T22:47:00Z","closed_at":"2015-02-04T21:42:55Z","pull_request":{"url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1294","html_url":"https://github.com/doctrine/doctrine2/pull/1294","diff_url":"https://github.com/doctrine/doctrine2/pull/1294.diff","patch_url":"https://github.com/doctrine/doctrine2/pull/1294.patch"},"body":"Hi guys!\r\n\r\nWhen you pair the ORM with DBAL 2.5.0, then getting the `targetPlatform` means that a connection will be made to the database. For that reason, it's really important to *not* get the `targetPlatform` unless it's absolutely needed. Currently, if you call `ClassMetadataFactor::getAllMetadata()`, it will try to determine `targetPlatform` (in `initialize()`), which will make a connection. And if that connection fails (e.g. no db yet), it will blow up - even though `getAllMetadata()` doesn't need the `targetPlatform`.\r\n\r\nThis fixes that, and in an absolutely BC way, since `targetPlatform` is private (yay!). This should fix a number of issues in userland, like symfony/symfony-standard#748 and symfony/symfony-standard#774.\r\n\r\nThis is a PR to master (per the guidelines), but the real target is 2.4, since it's the latest stable. The patch won't apply cleanly, but it's simple: remove from initialize, then replace all references to the new private method.\r\n\r\nThanks in advance! More details are on the commit message.\r\n"},"comment":{"url":"https://api.github.com/repos/doctrine/doctrine2/issues/comments/72956973","html_url":"https://github.com/doctrine/doctrine2/pull/1294#issuecomment-72956973","issue_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1294","id":72956973,"user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T22:47:00Z","updated_at":"2015-02-04T22:47:00Z","body":"I'll backport it"}}