{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/498","labels_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/498/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/498/comments","events_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/498/events","html_url":"https://github.com/doctrine/DoctrineBundle/pull/498","id":120361289,"number":498,"title":"Marking new types as commented event if no custom type mappings are present.","user":{"login":"TiS","id":233690,"avatar_url":"https://avatars.githubusercontent.com/u/233690?v=3","gravatar_id":"","url":"https://api.github.com/users/TiS","html_url":"https://github.com/TiS","followers_url":"https://api.github.com/users/TiS/followers","following_url":"https://api.github.com/users/TiS/following{/other_user}","gists_url":"https://api.github.com/users/TiS/gists{/gist_id}","starred_url":"https://api.github.com/users/TiS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TiS/subscriptions","organizations_url":"https://api.github.com/users/TiS/orgs","repos_url":"https://api.github.com/users/TiS/repos","events_url":"https://api.github.com/users/TiS/events{/privacy}","received_events_url":"https://api.github.com/users/TiS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-04T09:11:35Z","updated_at":"2015-12-17T13:22:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/doctrine/DoctrineBundle/pulls/498","html_url":"https://github.com/doctrine/DoctrineBundle/pull/498","diff_url":"https://github.com/doctrine/DoctrineBundle/pull/498.diff","patch_url":"https://github.com/doctrine/DoctrineBundle/pull/498.patch"},"body":"I have found an issue in ConnectionManager, wchich relates marking new custom types as commented with existence of custom type mappings. These two things are unrelated of each other.\r\n\r\nExplanation. ConnectionManager is being constructed with $typesConfig argument (passed from bundle configuration), containing new types added by user via config.yml. Then, during connection creation, it calls $this->initializeTypes(); function, which adds these types to Type registry.\r\n\r\nThen, something strange happens. If the type has 'commented' parameter set to true, it should have been mark as commented in database platform. But this operation only happened, when in addition of custom type, there was custom mapping type (any) passed to createConnection function.\r\n\r\nWhen user defines a custom Type, it does not have to (and in most cases, he will not) define custom type **MAPPING**, as custom type definition already has a mapping to a standard Doctrine field type. Also, in most cases, he wants to have his new type commented, and relating this action of existence of type mapping makers no sense.\r\n\r\nThis PR corrects this behavior, relating marking type as commented solely with the existence of marked type."},"comment":{"url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/comments/165452115","html_url":"https://github.com/doctrine/DoctrineBundle/pull/498#issuecomment-165452115","issue_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/498","id":165452115,"user":{"login":"TiS","id":233690,"avatar_url":"https://avatars.githubusercontent.com/u/233690?v=3","gravatar_id":"","url":"https://api.github.com/users/TiS","html_url":"https://github.com/TiS","followers_url":"https://api.github.com/users/TiS/followers","following_url":"https://api.github.com/users/TiS/following{/other_user}","gists_url":"https://api.github.com/users/TiS/gists{/gist_id}","starred_url":"https://api.github.com/users/TiS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TiS/subscriptions","organizations_url":"https://api.github.com/users/TiS/orgs","repos_url":"https://api.github.com/users/TiS/repos","events_url":"https://api.github.com/users/TiS/events{/privacy}","received_events_url":"https://api.github.com/users/TiS/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T13:22:58Z","updated_at":"2015-12-17T13:22:58Z","body":"I agree that this will be a better idea. \r\nBut **before** this happens... :)"}}