{"action":"closed","number":170,"pull_request":{"url":"https://api.github.com/repos/CodeSleeve/stapler/pulls/170","id":86654557,"html_url":"https://github.com/CodeSleeve/stapler/pull/170","diff_url":"https://github.com/CodeSleeve/stapler/pull/170.diff","patch_url":"https://github.com/CodeSleeve/stapler/pull/170.patch","issue_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/170","number":170,"state":"closed","locked":false,"title":"Fix duplicate unlink","user":{"login":"squigg","id":4279310,"avatar_url":"https://avatars.githubusercontent.com/u/4279310?v=3","gravatar_id":"","url":"https://api.github.com/users/squigg","html_url":"https://github.com/squigg","followers_url":"https://api.github.com/users/squigg/followers","following_url":"https://api.github.com/users/squigg/following{/other_user}","gists_url":"https://api.github.com/users/squigg/gists{/gist_id}","starred_url":"https://api.github.com/users/squigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squigg/subscriptions","organizations_url":"https://api.github.com/users/squigg/orgs","repos_url":"https://api.github.com/users/squigg/repos","events_url":"https://api.github.com/users/squigg/events{/privacy}","received_events_url":"https://api.github.com/users/squigg/received_events","type":"User","site_admin":false},"body":"This `unlink` causes two errors in the test suite. This is because when a file is added with no extension, the `$filePath` at this point is the same as the `$lockFile` path (as it has no extension). The attempt to unlink the `$lockFile` then has an error as the file does not exist anymore.\r\n\r\nErrors from phpunit before removal of `unlink`:\r\n```\r\nThere were 2 errors:\r\n\r\n1) Codesleeve\\Stapler\\Factories\\FileTest::it_should_be_able_to_build_a_stapler_uploaded_file_object_from_a_redirect_url\r\nunlink(/tmp/stapler-6hHfIS): No such file or directory\r\n\r\n/home/squigg/packages/stapler/src/Factories/File.php:147\r\n/home/squigg/packages/stapler/src/Factories/File.php:40\r\n/home/squigg/packages/stapler/tests/Codesleeve/Stapler/Factories/FileTest.php:81\r\n\r\n2) Codesleeve\\Stapler\\Factories\\FileTest::it_should_be_able_to_build_a_stapler_uploaded_file_object_without_following_querystring_in_basename\r\nunlink(/tmp/stapler-sin4Nu): No such file or directory\r\n\r\n/home/squigg/packages/stapler/src/Factories/File.php:147\r\n/home/squigg/packages/stapler/src/Factories/File.php:40\r\n/home/squigg/packages/stapler/tests/Codesleeve/Stapler/Factories/FileTest.php:94\r\n```","created_at":"2016-09-25T16:20:04Z","updated_at":"2016-10-07T22:39:46Z","closed_at":"2016-10-07T22:39:46Z","merged_at":null,"merge_commit_sha":"bb9420544ad72da31a4b5ae8627729821b26da71","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CodeSleeve/stapler/pulls/170/commits","review_comments_url":"https://api.github.com/repos/CodeSleeve/stapler/pulls/170/comments","review_comment_url":"https://api.github.com/repos/CodeSleeve/stapler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/170/comments","statuses_url":"https://api.github.com/repos/CodeSleeve/stapler/statuses/c19d1fadab362e69706a8f56096737fd2320610c","head":{"label":"squigg:fix_duplicate_unlink","ref":"fix_duplicate_unlink","sha":"c19d1fadab362e69706a8f56096737fd2320610c","user":{"login":"squigg","id":4279310,"avatar_url":"https://avatars.githubusercontent.com/u/4279310?v=3","gravatar_id":"","url":"https://api.github.com/users/squigg","html_url":"https://github.com/squigg","followers_url":"https://api.github.com/users/squigg/followers","following_url":"https://api.github.com/users/squigg/following{/other_user}","gists_url":"https://api.github.com/users/squigg/gists{/gist_id}","starred_url":"https://api.github.com/users/squigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squigg/subscriptions","organizations_url":"https://api.github.com/users/squigg/orgs","repos_url":"https://api.github.com/users/squigg/repos","events_url":"https://api.github.com/users/squigg/events{/privacy}","received_events_url":"https://api.github.com/users/squigg/received_events","type":"User","site_admin":false},"repo":{"id":69153241,"name":"stapler","full_name":"squigg/stapler","owner":{"login":"squigg","id":4279310,"avatar_url":"https://avatars.githubusercontent.com/u/4279310?v=3","gravatar_id":"","url":"https://api.github.com/users/squigg","html_url":"https://github.com/squigg","followers_url":"https://api.github.com/users/squigg/followers","following_url":"https://api.github.com/users/squigg/following{/other_user}","gists_url":"https://api.github.com/users/squigg/gists{/gist_id}","starred_url":"https://api.github.com/users/squigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squigg/subscriptions","organizations_url":"https://api.github.com/users/squigg/orgs","repos_url":"https://api.github.com/users/squigg/repos","events_url":"https://api.github.com/users/squigg/events{/privacy}","received_events_url":"https://api.github.com/users/squigg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squigg/stapler","description":"ORM-based file upload package for php.","fork":true,"url":"https://api.github.com/repos/squigg/stapler","forks_url":"https://api.github.com/repos/squigg/stapler/forks","keys_url":"https://api.github.com/repos/squigg/stapler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squigg/stapler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squigg/stapler/teams","hooks_url":"https://api.github.com/repos/squigg/stapler/hooks","issue_events_url":"https://api.github.com/repos/squigg/stapler/issues/events{/number}","events_url":"https://api.github.com/repos/squigg/stapler/events","assignees_url":"https://api.github.com/repos/squigg/stapler/assignees{/user}","branches_url":"https://api.github.com/repos/squigg/stapler/branches{/branch}","tags_url":"https://api.github.com/repos/squigg/stapler/tags","blobs_url":"https://api.github.com/repos/squigg/stapler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squigg/stapler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squigg/stapler/git/refs{/sha}","trees_url":"https://api.github.com/repos/squigg/stapler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squigg/stapler/statuses/{sha}","languages_url":"https://api.github.com/repos/squigg/stapler/languages","stargazers_url":"https://api.github.com/repos/squigg/stapler/stargazers","contributors_url":"https://api.github.com/repos/squigg/stapler/contributors","subscribers_url":"https://api.github.com/repos/squigg/stapler/subscribers","subscription_url":"https://api.github.com/repos/squigg/stapler/subscription","commits_url":"https://api.github.com/repos/squigg/stapler/commits{/sha}","git_commits_url":"https://api.github.com/repos/squigg/stapler/git/commits{/sha}","comments_url":"https://api.github.com/repos/squigg/stapler/comments{/number}","issue_comment_url":"https://api.github.com/repos/squigg/stapler/issues/comments{/number}","contents_url":"https://api.github.com/repos/squigg/stapler/contents/{+path}","compare_url":"https://api.github.com/repos/squigg/stapler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squigg/stapler/merges","archive_url":"https://api.github.com/repos/squigg/stapler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squigg/stapler/downloads","issues_url":"https://api.github.com/repos/squigg/stapler/issues{/number}","pulls_url":"https://api.github.com/repos/squigg/stapler/pulls{/number}","milestones_url":"https://api.github.com/repos/squigg/stapler/milestones{/number}","notifications_url":"https://api.github.com/repos/squigg/stapler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squigg/stapler/labels{/name}","releases_url":"https://api.github.com/repos/squigg/stapler/releases{/id}","deployments_url":"https://api.github.com/repos/squigg/stapler/deployments","created_at":"2016-09-25T08:47:01Z","updated_at":"2016-09-25T08:47:02Z","pushed_at":"2016-09-25T19:24:09Z","git_url":"git://github.com/squigg/stapler.git","ssh_url":"git@github.com:squigg/stapler.git","clone_url":"https://github.com/squigg/stapler.git","svn_url":"https://github.com/squigg/stapler","homepage":"http://codesleeve.com","size":457,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"CodeSleeve:master","ref":"master","sha":"35bc54a7c5fbbfd0211ace8fb766e4cd766ee097","user":{"login":"CodeSleeve","id":4665042,"avatar_url":"https://avatars.githubusercontent.com/u/4665042?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeSleeve","html_url":"https://github.com/CodeSleeve","followers_url":"https://api.github.com/users/CodeSleeve/followers","following_url":"https://api.github.com/users/CodeSleeve/following{/other_user}","gists_url":"https://api.github.com/users/CodeSleeve/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeSleeve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeSleeve/subscriptions","organizations_url":"https://api.github.com/users/CodeSleeve/orgs","repos_url":"https://api.github.com/users/CodeSleeve/repos","events_url":"https://api.github.com/users/CodeSleeve/events{/privacy}","received_events_url":"https://api.github.com/users/CodeSleeve/received_events","type":"Organization","site_admin":false},"repo":{"id":11246217,"name":"stapler","full_name":"CodeSleeve/stapler","owner":{"login":"CodeSleeve","id":4665042,"avatar_url":"https://avatars.githubusercontent.com/u/4665042?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeSleeve","html_url":"https://github.com/CodeSleeve","followers_url":"https://api.github.com/users/CodeSleeve/followers","following_url":"https://api.github.com/users/CodeSleeve/following{/other_user}","gists_url":"https://api.github.com/users/CodeSleeve/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeSleeve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeSleeve/subscriptions","organizations_url":"https://api.github.com/users/CodeSleeve/orgs","repos_url":"https://api.github.com/users/CodeSleeve/repos","events_url":"https://api.github.com/users/CodeSleeve/events{/privacy}","received_events_url":"https://api.github.com/users/CodeSleeve/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CodeSleeve/stapler","description":"ORM-based file upload package for php.","fork":false,"url":"https://api.github.com/repos/CodeSleeve/stapler","forks_url":"https://api.github.com/repos/CodeSleeve/stapler/forks","keys_url":"https://api.github.com/repos/CodeSleeve/stapler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CodeSleeve/stapler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CodeSleeve/stapler/teams","hooks_url":"https://api.github.com/repos/CodeSleeve/stapler/hooks","issue_events_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/events{/number}","events_url":"https://api.github.com/repos/CodeSleeve/stapler/events","assignees_url":"https://api.github.com/repos/CodeSleeve/stapler/assignees{/user}","branches_url":"https://api.github.com/repos/CodeSleeve/stapler/branches{/branch}","tags_url":"https://api.github.com/repos/CodeSleeve/stapler/tags","blobs_url":"https://api.github.com/repos/CodeSleeve/stapler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CodeSleeve/stapler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CodeSleeve/stapler/git/refs{/sha}","trees_url":"https://api.github.com/repos/CodeSleeve/stapler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CodeSleeve/stapler/statuses/{sha}","languages_url":"https://api.github.com/repos/CodeSleeve/stapler/languages","stargazers_url":"https://api.github.com/repos/CodeSleeve/stapler/stargazers","contributors_url":"https://api.github.com/repos/CodeSleeve/stapler/contributors","subscribers_url":"https://api.github.com/repos/CodeSleeve/stapler/subscribers","subscription_url":"https://api.github.com/repos/CodeSleeve/stapler/subscription","commits_url":"https://api.github.com/repos/CodeSleeve/stapler/commits{/sha}","git_commits_url":"https://api.github.com/repos/CodeSleeve/stapler/git/commits{/sha}","comments_url":"https://api.github.com/repos/CodeSleeve/stapler/comments{/number}","issue_comment_url":"https://api.github.com/repos/CodeSleeve/stapler/issues/comments{/number}","contents_url":"https://api.github.com/repos/CodeSleeve/stapler/contents/{+path}","compare_url":"https://api.github.com/repos/CodeSleeve/stapler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CodeSleeve/stapler/merges","archive_url":"https://api.github.com/repos/CodeSleeve/stapler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CodeSleeve/stapler/downloads","issues_url":"https://api.github.com/repos/CodeSleeve/stapler/issues{/number}","pulls_url":"https://api.github.com/repos/CodeSleeve/stapler/pulls{/number}","milestones_url":"https://api.github.com/repos/CodeSleeve/stapler/milestones{/number}","notifications_url":"https://api.github.com/repos/CodeSleeve/stapler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CodeSleeve/stapler/labels{/name}","releases_url":"https://api.github.com/repos/CodeSleeve/stapler/releases{/id}","deployments_url":"https://api.github.com/repos/CodeSleeve/stapler/deployments","created_at":"2013-07-08T05:03:32Z","updated_at":"2016-09-28T19:48:39Z","pushed_at":"2016-10-07T22:23:59Z","git_url":"git://github.com/CodeSleeve/stapler.git","ssh_url":"git@github.com:CodeSleeve/stapler.git","clone_url":"https://github.com/CodeSleeve/stapler.git","svn_url":"https://github.com/CodeSleeve/stapler","homepage":"http://codesleeve.com","size":571,"stargazers_count":504,"watchers_count":504,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":114,"mirror_url":null,"open_issues_count":40,"forks":114,"open_issues":40,"watchers":504,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CodeSleeve/stapler/pulls/170"},"html":{"href":"https://github.com/CodeSleeve/stapler/pull/170"},"issue":{"href":"https://api.github.com/repos/CodeSleeve/stapler/issues/170"},"comments":{"href":"https://api.github.com/repos/CodeSleeve/stapler/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/CodeSleeve/stapler/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/CodeSleeve/stapler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CodeSleeve/stapler/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/CodeSleeve/stapler/statuses/c19d1fadab362e69706a8f56096737fd2320610c"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":0,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"tabennett"}}