{"action":"closed","number":1479,"pull_request":{"url":"https://api.github.com/repos/neos/neos-development-collection/pulls/1479","id":112942423,"html_url":"https://github.com/neos/neos-development-collection/pull/1479","diff_url":"https://github.com/neos/neos-development-collection/pull/1479.diff","patch_url":"https://github.com/neos/neos-development-collection/pull/1479.patch","issue_url":"https://api.github.com/repos/neos/neos-development-collection/issues/1479","number":1479,"state":"closed","locked":false,"title":"Fix media import resources command","user":{"login":"sunweiye","id":18660206,"avatar_url":"https://avatars1.githubusercontent.com/u/18660206?v=3","gravatar_id":"","url":"https://api.github.com/users/sunweiye","html_url":"https://github.com/sunweiye","followers_url":"https://api.github.com/users/sunweiye/followers","following_url":"https://api.github.com/users/sunweiye/following{/other_user}","gists_url":"https://api.github.com/users/sunweiye/gists{/gist_id}","starred_url":"https://api.github.com/users/sunweiye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunweiye/subscriptions","organizations_url":"https://api.github.com/users/sunweiye/orgs","repos_url":"https://api.github.com/users/sunweiye/repos","events_url":"https://api.github.com/users/sunweiye/events{/privacy}","received_events_url":"https://api.github.com/users/sunweiye/received_events","type":"User","site_admin":false},"body":"<!--\r\nThanks for your contribution, we appreciate it!\r\n\r\nPlease read through our pull request guidelines, there are some interesting things there:\r\nhttps://discuss.neos.io/t/creating-a-pull-request/506\r\n\r\nAnd one more thing... Don't forget about the tests!\r\n-->\r\n\r\n\r\n**What I did**\r\n1. Fix the error by checking Doctrine ORM Entity Manager during calling the command.\r\n2. Rename the table names to the actual names in the database\r\n3. Use ConfigurationAssetModelMappingStrategy to determine target asset type\r\n\r\n**How I did it**\r\n1. Add lazy=false in the annotation of entityManager\r\n2. Check the actual table names of in the database and adapt the names in the code\r\n3. Remove the code in the for loop in the method of importResourcesCommand that is only to add image into the repository. The code, that uses the map method of ConfigurationAssetModelMappingStrategy to get the resource model object, is added and the resource model object will be added into the repository. \r\n\r\n**How to verify it**\r\n\r\n**Checklist**\r\nFor point 1 and 2, run the command, and there will not show any error message.\r\nFor point 3, the resource should be added.\r\n\r\n- [X] Code follows the PSR-2 coding style\r\n- [ ] Tests have been created, run and adjusted as needed\r\n- [ ] The PR is created against the [lowest maintained branch](https://www.neos.io/features/release-roadmap.html)\r\n","created_at":"2017-03-28T10:58:40Z","updated_at":"2017-03-28T16:07:26Z","closed_at":"2017-03-28T16:07:26Z","merged_at":null,"merge_commit_sha":"3d6d1158890d4c55990e28a86182eb7066dcd318","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/neos/neos-development-collection/pulls/1479/commits","review_comments_url":"https://api.github.com/repos/neos/neos-development-collection/pulls/1479/comments","review_comment_url":"https://api.github.com/repos/neos/neos-development-collection/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neos/neos-development-collection/issues/1479/comments","statuses_url":"https://api.github.com/repos/neos/neos-development-collection/statuses/5683dceee83942303c2e24a5c1b6522494ded59f","head":{"label":"sunweiye:FixMediaImportResourcesCommand","ref":"FixMediaImportResourcesCommand","sha":"5683dceee83942303c2e24a5c1b6522494ded59f","user":{"login":"sunweiye","id":18660206,"avatar_url":"https://avatars1.githubusercontent.com/u/18660206?v=3","gravatar_id":"","url":"https://api.github.com/users/sunweiye","html_url":"https://github.com/sunweiye","followers_url":"https://api.github.com/users/sunweiye/followers","following_url":"https://api.github.com/users/sunweiye/following{/other_user}","gists_url":"https://api.github.com/users/sunweiye/gists{/gist_id}","starred_url":"https://api.github.com/users/sunweiye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunweiye/subscriptions","organizations_url":"https://api.github.com/users/sunweiye/orgs","repos_url":"https://api.github.com/users/sunweiye/repos","events_url":"https://api.github.com/users/sunweiye/events{/privacy}","received_events_url":"https://api.github.com/users/sunweiye/received_events","type":"User","site_admin":false},"repo":{"id":86333917,"name":"neos-development-collection","full_name":"sunweiye/neos-development-collection","owner":{"login":"sunweiye","id":18660206,"avatar_url":"https://avatars1.githubusercontent.com/u/18660206?v=3","gravatar_id":"","url":"https://api.github.com/users/sunweiye","html_url":"https://github.com/sunweiye","followers_url":"https://api.github.com/users/sunweiye/followers","following_url":"https://api.github.com/users/sunweiye/following{/other_user}","gists_url":"https://api.github.com/users/sunweiye/gists{/gist_id}","starred_url":"https://api.github.com/users/sunweiye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunweiye/subscriptions","organizations_url":"https://api.github.com/users/sunweiye/orgs","repos_url":"https://api.github.com/users/sunweiye/repos","events_url":"https://api.github.com/users/sunweiye/events{/privacy}","received_events_url":"https://api.github.com/users/sunweiye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sunweiye/neos-development-collection","description":"The unified repository containing the Neos core packages, used for Neos development.","fork":true,"url":"https://api.github.com/repos/sunweiye/neos-development-collection","forks_url":"https://api.github.com/repos/sunweiye/neos-development-collection/forks","keys_url":"https://api.github.com/repos/sunweiye/neos-development-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sunweiye/neos-development-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sunweiye/neos-development-collection/teams","hooks_url":"https://api.github.com/repos/sunweiye/neos-development-collection/hooks","issue_events_url":"https://api.github.com/repos/sunweiye/neos-development-collection/issues/events{/number}","events_url":"https://api.github.com/repos/sunweiye/neos-development-collection/events","assignees_url":"https://api.github.com/repos/sunweiye/neos-development-collection/assignees{/user}","branches_url":"https://api.github.com/repos/sunweiye/neos-development-collection/branches{/branch}","tags_url":"https://api.github.com/repos/sunweiye/neos-development-collection/tags","blobs_url":"https://api.github.com/repos/sunweiye/neos-development-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sunweiye/neos-development-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sunweiye/neos-development-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/sunweiye/neos-development-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sunweiye/neos-development-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/sunweiye/neos-development-collection/languages","stargazers_url":"https://api.github.com/repos/sunweiye/neos-development-collection/stargazers","contributors_url":"https://api.github.com/repos/sunweiye/neos-development-collection/contributors","subscribers_url":"https://api.github.com/repos/sunweiye/neos-development-collection/subscribers","subscription_url":"https://api.github.com/repos/sunweiye/neos-development-collection/subscription","commits_url":"https://api.github.com/repos/sunweiye/neos-development-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/sunweiye/neos-development-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/sunweiye/neos-development-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/sunweiye/neos-development-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/sunweiye/neos-development-collection/contents/{+path}","compare_url":"https://api.github.com/repos/sunweiye/neos-development-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sunweiye/neos-development-collection/merges","archive_url":"https://api.github.com/repos/sunweiye/neos-development-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sunweiye/neos-development-collection/downloads","issues_url":"https://api.github.com/repos/sunweiye/neos-development-collection/issues{/number}","pulls_url":"https://api.github.com/repos/sunweiye/neos-development-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/sunweiye/neos-development-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/sunweiye/neos-development-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sunweiye/neos-development-collection/labels{/name}","releases_url":"https://api.github.com/repos/sunweiye/neos-development-collection/releases{/id}","deployments_url":"https://api.github.com/repos/sunweiye/neos-development-collection/deployments","created_at":"2017-03-27T12:41:01Z","updated_at":"2017-03-27T12:41:09Z","pushed_at":"2017-03-28T16:06:56Z","git_url":"git://github.com/sunweiye/neos-development-collection.git","ssh_url":"git@github.com:sunweiye/neos-development-collection.git","clone_url":"https://github.com/sunweiye/neos-development-collection.git","svn_url":"https://github.com/sunweiye/neos-development-collection","homepage":"https://www.neos.io/","size":70094,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"neos:3.0","ref":"3.0","sha":"6d3e91dd395f728a14202d72ea0bd829df702287","user":{"login":"neos","id":11575267,"avatar_url":"https://avatars1.githubusercontent.com/u/11575267?v=3","gravatar_id":"","url":"https://api.github.com/users/neos","html_url":"https://github.com/neos","followers_url":"https://api.github.com/users/neos/followers","following_url":"https://api.github.com/users/neos/following{/other_user}","gists_url":"https://api.github.com/users/neos/gists{/gist_id}","starred_url":"https://api.github.com/users/neos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neos/subscriptions","organizations_url":"https://api.github.com/users/neos/orgs","repos_url":"https://api.github.com/users/neos/repos","events_url":"https://api.github.com/users/neos/events{/privacy}","received_events_url":"https://api.github.com/users/neos/received_events","type":"Organization","site_admin":false},"repo":{"id":40964014,"name":"neos-development-collection","full_name":"neos/neos-development-collection","owner":{"login":"neos","id":11575267,"avatar_url":"https://avatars1.githubusercontent.com/u/11575267?v=3","gravatar_id":"","url":"https://api.github.com/users/neos","html_url":"https://github.com/neos","followers_url":"https://api.github.com/users/neos/followers","following_url":"https://api.github.com/users/neos/following{/other_user}","gists_url":"https://api.github.com/users/neos/gists{/gist_id}","starred_url":"https://api.github.com/users/neos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neos/subscriptions","organizations_url":"https://api.github.com/users/neos/orgs","repos_url":"https://api.github.com/users/neos/repos","events_url":"https://api.github.com/users/neos/events{/privacy}","received_events_url":"https://api.github.com/users/neos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neos/neos-development-collection","description":"The unified repository containing the Neos core packages, used for Neos development.","fork":false,"url":"https://api.github.com/repos/neos/neos-development-collection","forks_url":"https://api.github.com/repos/neos/neos-development-collection/forks","keys_url":"https://api.github.com/repos/neos/neos-development-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neos/neos-development-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neos/neos-development-collection/teams","hooks_url":"https://api.github.com/repos/neos/neos-development-collection/hooks","issue_events_url":"https://api.github.com/repos/neos/neos-development-collection/issues/events{/number}","events_url":"https://api.github.com/repos/neos/neos-development-collection/events","assignees_url":"https://api.github.com/repos/neos/neos-development-collection/assignees{/user}","branches_url":"https://api.github.com/repos/neos/neos-development-collection/branches{/branch}","tags_url":"https://api.github.com/repos/neos/neos-development-collection/tags","blobs_url":"https://api.github.com/repos/neos/neos-development-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neos/neos-development-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neos/neos-development-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/neos/neos-development-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neos/neos-development-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/neos/neos-development-collection/languages","stargazers_url":"https://api.github.com/repos/neos/neos-development-collection/stargazers","contributors_url":"https://api.github.com/repos/neos/neos-development-collection/contributors","subscribers_url":"https://api.github.com/repos/neos/neos-development-collection/subscribers","subscription_url":"https://api.github.com/repos/neos/neos-development-collection/subscription","commits_url":"https://api.github.com/repos/neos/neos-development-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/neos/neos-development-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/neos/neos-development-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/neos/neos-development-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/neos/neos-development-collection/contents/{+path}","compare_url":"https://api.github.com/repos/neos/neos-development-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neos/neos-development-collection/merges","archive_url":"https://api.github.com/repos/neos/neos-development-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neos/neos-development-collection/downloads","issues_url":"https://api.github.com/repos/neos/neos-development-collection/issues{/number}","pulls_url":"https://api.github.com/repos/neos/neos-development-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/neos/neos-development-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/neos/neos-development-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neos/neos-development-collection/labels{/name}","releases_url":"https://api.github.com/repos/neos/neos-development-collection/releases{/id}","deployments_url":"https://api.github.com/repos/neos/neos-development-collection/deployments","created_at":"2015-08-18T09:48:35Z","updated_at":"2017-03-20T13:12:33Z","pushed_at":"2017-03-28T13:57:35Z","git_url":"git://github.com/neos/neos-development-collection.git","ssh_url":"git@github.com:neos/neos-development-collection.git","clone_url":"https://github.com/neos/neos-development-collection.git","svn_url":"https://github.com/neos/neos-development-collection","homepage":"https://www.neos.io/","size":70090,"stargazers_count":120,"watchers_count":120,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":451,"forks":104,"open_issues":451,"watchers":120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/1479"},"html":{"href":"https://github.com/neos/neos-development-collection/pull/1479"},"issue":{"href":"https://api.github.com/repos/neos/neos-development-collection/issues/1479"},"comments":{"href":"https://api.github.com/repos/neos/neos-development-collection/issues/1479/comments"},"review_comments":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/1479/comments"},"review_comment":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/1479/commits"},"statuses":{"href":"https://api.github.com/repos/neos/neos-development-collection/statuses/5683dceee83942303c2e24a5c1b6522494ded59f"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":24,"additions":114,"deletions":292,"changed_files":28}}
{"actor":{"display_login":"sunweiye"}}