{"action":"opened","number":84,"pull_request":{"url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/84","id":36752127,"html_url":"https://github.com/kloon/WooCommerce-REST-API-Client-Library/pull/84","diff_url":"https://github.com/kloon/WooCommerce-REST-API-Client-Library/pull/84.diff","patch_url":"https://github.com/kloon/WooCommerce-REST-API-Client-Library/pull/84.patch","issue_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/issues/84","number":84,"state":"open","locked":false,"title":"Create autoload entries for composer","user":{"login":"judgej","id":395934,"avatar_url":"https://avatars.githubusercontent.com/u/395934?v=3","gravatar_id":"","url":"https://api.github.com/users/judgej","html_url":"https://github.com/judgej","followers_url":"https://api.github.com/users/judgej/followers","following_url":"https://api.github.com/users/judgej/following{/other_user}","gists_url":"https://api.github.com/users/judgej/gists{/gist_id}","starred_url":"https://api.github.com/users/judgej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/judgej/subscriptions","organizations_url":"https://api.github.com/users/judgej/orgs","repos_url":"https://api.github.com/users/judgej/repos","events_url":"https://api.github.com/users/judgej/events{/privacy}","received_events_url":"https://api.github.com/users/judgej/received_events","type":"User","site_admin":false},"body":"When used in a composer-based application (e.g. Laravel) these changes will ensure the classes are available to the application. There are two methods used here - you may want them both, or just one or the other. Here is how they work:\r\n\r\n* The `autoload/files` entry is the equivalent to an `include`. It will load the main bootstrap file in this package on every page load. Loading that bootstrap file will then load all the classes in the package, again, on every page load.\r\n* The `autoload\\classmap` takes a different approach. This will scan the package for php scripts, then extract all the classes it finds, and sets up a register of where all those classes are. When any of those classes are used, the composer autoloader will kick in and load the appropriate file. The classes will only be loaded when they are actually used. It will load the classes in the order they are used, and will not attempt to load the bootstrap file first, since it has no need for the bootstrap file.\r\n\r\nSo, the first method has an overhead on pages the package is not needed, but it will execute everything that the package is expecting to be loaded and in the right order. The second method is more efficient, only loading classes as they are needed and used, but will skip the bootstrap script that may have some logic in that you are expecting to be run.\r\n\r\nPersonally, I would go for the classmap approach, so long as you are happy that not running the bootstrap file will be okay. Both methods are in here, but I can remove either, or we can leave both in and decide later.","created_at":"2015-06-02T17:13:14Z","updated_at":"2015-06-02T17:13:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/84/commits","review_comments_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/84/comments","review_comment_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/issues/84/comments","statuses_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/statuses/4c4cd99e9b671ead0519499b368dc472bb113a0b","head":{"label":"judgej:master","ref":"master","sha":"4c4cd99e9b671ead0519499b368dc472bb113a0b","user":{"login":"judgej","id":395934,"avatar_url":"https://avatars.githubusercontent.com/u/395934?v=3","gravatar_id":"","url":"https://api.github.com/users/judgej","html_url":"https://github.com/judgej","followers_url":"https://api.github.com/users/judgej/followers","following_url":"https://api.github.com/users/judgej/following{/other_user}","gists_url":"https://api.github.com/users/judgej/gists{/gist_id}","starred_url":"https://api.github.com/users/judgej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/judgej/subscriptions","organizations_url":"https://api.github.com/users/judgej/orgs","repos_url":"https://api.github.com/users/judgej/repos","events_url":"https://api.github.com/users/judgej/events{/privacy}","received_events_url":"https://api.github.com/users/judgej/received_events","type":"User","site_admin":false},"repo":{"id":36747739,"name":"WooCommerce-REST-API-Client-Library","full_name":"judgej/WooCommerce-REST-API-Client-Library","owner":{"login":"judgej","id":395934,"avatar_url":"https://avatars.githubusercontent.com/u/395934?v=3","gravatar_id":"","url":"https://api.github.com/users/judgej","html_url":"https://github.com/judgej","followers_url":"https://api.github.com/users/judgej/followers","following_url":"https://api.github.com/users/judgej/following{/other_user}","gists_url":"https://api.github.com/users/judgej/gists{/gist_id}","starred_url":"https://api.github.com/users/judgej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/judgej/subscriptions","organizations_url":"https://api.github.com/users/judgej/orgs","repos_url":"https://api.github.com/users/judgej/repos","events_url":"https://api.github.com/users/judgej/events{/privacy}","received_events_url":"https://api.github.com/users/judgej/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/judgej/WooCommerce-REST-API-Client-Library","description":"A PHP wrapper for the WooCommerce REST API","fork":true,"url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library","forks_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/forks","keys_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/teams","hooks_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/hooks","issue_events_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/issues/events{/number}","events_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/events","assignees_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/assignees{/user}","branches_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/branches{/branch}","tags_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/tags","blobs_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/git/refs{/sha}","trees_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/statuses/{sha}","languages_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/languages","stargazers_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/stargazers","contributors_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/contributors","subscribers_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/subscribers","subscription_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/subscription","commits_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/commits{/sha}","git_commits_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/git/commits{/sha}","comments_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/comments{/number}","issue_comment_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/issues/comments{/number}","contents_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/contents/{+path}","compare_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/merges","archive_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/downloads","issues_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/issues{/number}","pulls_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/pulls{/number}","milestones_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/milestones{/number}","notifications_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/labels{/name}","releases_url":"https://api.github.com/repos/judgej/WooCommerce-REST-API-Client-Library/releases{/id}","created_at":"2015-06-02T16:53:52Z","updated_at":"2015-06-02T16:53:53Z","pushed_at":"2015-06-02T17:03:20Z","git_url":"git://github.com/judgej/WooCommerce-REST-API-Client-Library.git","ssh_url":"git@github.com:judgej/WooCommerce-REST-API-Client-Library.git","clone_url":"https://github.com/judgej/WooCommerce-REST-API-Client-Library.git","svn_url":"https://github.com/judgej/WooCommerce-REST-API-Client-Library","homepage":"","size":420,"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":"kloon:master","ref":"master","sha":"ba25be888eaee105170955f6d80743b5ff88fc36","user":{"login":"kloon","id":271630,"avatar_url":"https://avatars.githubusercontent.com/u/271630?v=3","gravatar_id":"","url":"https://api.github.com/users/kloon","html_url":"https://github.com/kloon","followers_url":"https://api.github.com/users/kloon/followers","following_url":"https://api.github.com/users/kloon/following{/other_user}","gists_url":"https://api.github.com/users/kloon/gists{/gist_id}","starred_url":"https://api.github.com/users/kloon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kloon/subscriptions","organizations_url":"https://api.github.com/users/kloon/orgs","repos_url":"https://api.github.com/users/kloon/repos","events_url":"https://api.github.com/users/kloon/events{/privacy}","received_events_url":"https://api.github.com/users/kloon/received_events","type":"User","site_admin":false},"repo":{"id":15004504,"name":"WooCommerce-REST-API-Client-Library","full_name":"kloon/WooCommerce-REST-API-Client-Library","owner":{"login":"kloon","id":271630,"avatar_url":"https://avatars.githubusercontent.com/u/271630?v=3","gravatar_id":"","url":"https://api.github.com/users/kloon","html_url":"https://github.com/kloon","followers_url":"https://api.github.com/users/kloon/followers","following_url":"https://api.github.com/users/kloon/following{/other_user}","gists_url":"https://api.github.com/users/kloon/gists{/gist_id}","starred_url":"https://api.github.com/users/kloon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kloon/subscriptions","organizations_url":"https://api.github.com/users/kloon/orgs","repos_url":"https://api.github.com/users/kloon/repos","events_url":"https://api.github.com/users/kloon/events{/privacy}","received_events_url":"https://api.github.com/users/kloon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kloon/WooCommerce-REST-API-Client-Library","description":"A PHP wrapper for the WooCommerce REST API","fork":false,"url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library","forks_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/forks","keys_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/teams","hooks_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/hooks","issue_events_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/issues/events{/number}","events_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/events","assignees_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/assignees{/user}","branches_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/branches{/branch}","tags_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/tags","blobs_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/git/refs{/sha}","trees_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/statuses/{sha}","languages_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/languages","stargazers_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/stargazers","contributors_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/contributors","subscribers_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/subscribers","subscription_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/subscription","commits_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/commits{/sha}","git_commits_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/git/commits{/sha}","comments_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/comments{/number}","issue_comment_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/issues/comments{/number}","contents_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/contents/{+path}","compare_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/merges","archive_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/downloads","issues_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/issues{/number}","pulls_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls{/number}","milestones_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/milestones{/number}","notifications_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/labels{/name}","releases_url":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/releases{/id}","created_at":"2013-12-07T11:23:15Z","updated_at":"2015-05-31T22:20:21Z","pushed_at":"2015-06-02T13:19:48Z","git_url":"git://github.com/kloon/WooCommerce-REST-API-Client-Library.git","ssh_url":"git@github.com:kloon/WooCommerce-REST-API-Client-Library.git","clone_url":"https://github.com/kloon/WooCommerce-REST-API-Client-Library.git","svn_url":"https://github.com/kloon/WooCommerce-REST-API-Client-Library","homepage":"","size":420,"stargazers_count":130,"watchers_count":130,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":4,"forks":71,"open_issues":4,"watchers":130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/84"},"html":{"href":"https://github.com/kloon/WooCommerce-REST-API-Client-Library/pull/84"},"issue":{"href":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/issues/84"},"comments":{"href":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/issues/84/comments"},"review_comments":{"href":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/84/comments"},"review_comment":{"href":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/pulls/84/commits"},"statuses":{"href":"https://api.github.com/repos/kloon/WooCommerce-REST-API-Client-Library/statuses/4c4cd99e9b671ead0519499b368dc472bb113a0b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":4,"deletions":0,"changed_files":1}}