{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/dbal/issues/863","labels_url":"https://api.github.com/repos/doctrine/dbal/issues/863/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/dbal/issues/863/comments","events_url":"https://api.github.com/repos/doctrine/dbal/issues/863/events","html_url":"https://github.com/doctrine/dbal/pull/863","id":79145317,"number":863,"title":"Strip leading slash of databasename from URL","user":{"login":"KingCrunch","id":90388,"avatar_url":"https://avatars.githubusercontent.com/u/90388?v=3","gravatar_id":"","url":"https://api.github.com/users/KingCrunch","html_url":"https://github.com/KingCrunch","followers_url":"https://api.github.com/users/KingCrunch/followers","following_url":"https://api.github.com/users/KingCrunch/following{/other_user}","gists_url":"https://api.github.com/users/KingCrunch/gists{/gist_id}","starred_url":"https://api.github.com/users/KingCrunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KingCrunch/subscriptions","organizations_url":"https://api.github.com/users/KingCrunch/orgs","repos_url":"https://api.github.com/users/KingCrunch/repos","events_url":"https://api.github.com/users/KingCrunch/events{/privacy}","received_events_url":"https://api.github.com/users/KingCrunch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/doctrine/dbal/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/doctrine/dbal/labels/Missing%20Tests","name":"Missing Tests","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-21T20:16:09Z","updated_at":"2015-06-17T16:11:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/doctrine/dbal/pulls/863","html_url":"https://github.com/doctrine/dbal/pull/863","diff_url":"https://github.com/doctrine/dbal/pull/863.diff","patch_url":"https://github.com/doctrine/dbal/pull/863.patch"},"body":"This is actuall the commit for [DBAL-1234](http://www.doctrine-project.org/jira/browse/DBAL-1234)\r\n\r\nWhen using a custom driver via `driverClass` in all (some?) cases one cannot set\r\nthe scheme properly. In the earlier implementation when the scheme is missing the\r\n`DriverManager` leaves the leading slash in the path, because it silently assumes,\r\nthat this is a SQLite-connection. With custom drivers this leads to invalid database\r\nnames.\r\n\r\nAdditionally this takes care, that if one specifies the driver via configuration key\r\n`driver`, but the connection with scheme-less URL it ends up in an invalid database\r\nname too    \r\n\r\n    driver: pdo_mysql\r\n    url: //user:pass@localhost/database\r\n\r\nAnother solution is to introduce a special `custom`-scheme, that doesn't point to a driver, but declares, that `driverClass` is required\r\n\r\n    custom://foo:bar@localhost:123/my_db\r\n\r\nHowever, this would not take care of the other use-case,"},"comment":{"url":"https://api.github.com/repos/doctrine/dbal/issues/comments/112862762","html_url":"https://github.com/doctrine/dbal/pull/863#issuecomment-112862762","issue_url":"https://api.github.com/repos/doctrine/dbal/issues/863","id":112862762,"user":{"login":"KingCrunch","id":90388,"avatar_url":"https://avatars.githubusercontent.com/u/90388?v=3","gravatar_id":"","url":"https://api.github.com/users/KingCrunch","html_url":"https://github.com/KingCrunch","followers_url":"https://api.github.com/users/KingCrunch/followers","following_url":"https://api.github.com/users/KingCrunch/following{/other_user}","gists_url":"https://api.github.com/users/KingCrunch/gists{/gist_id}","starred_url":"https://api.github.com/users/KingCrunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KingCrunch/subscriptions","organizations_url":"https://api.github.com/users/KingCrunch/orgs","repos_url":"https://api.github.com/users/KingCrunch/repos","events_url":"https://api.github.com/users/KingCrunch/events{/privacy}","received_events_url":"https://api.github.com/users/KingCrunch/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T16:11:08Z","updated_at":"2015-06-17T16:11:08Z","body":"Hi @zeroedin-bill \r\nThanks for the feedback. I'd made the changes.\r\n\r\nI've change the order of the `if`-statement, because this way it is easier to avoid the `undefined index 'driver'` of the `strpos()`-call."}}