{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3726","repository_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer","labels_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3726/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3726/comments","events_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3726/events","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3726","id":317909856,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg0MjQ5ODI3","number":3726,"title":"Use Box to build the PHAR","user":{"login":"theofidry","id":5175937,"node_id":"MDQ6VXNlcjUxNzU5Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5175937?v=4","gravatar_id":"","url":"https://api.github.com/users/theofidry","html_url":"https://github.com/theofidry","followers_url":"https://api.github.com/users/theofidry/followers","following_url":"https://api.github.com/users/theofidry/following{/other_user}","gists_url":"https://api.github.com/users/theofidry/gists{/gist_id}","starred_url":"https://api.github.com/users/theofidry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theofidry/subscriptions","organizations_url":"https://api.github.com/users/theofidry/orgs","repos_url":"https://api.github.com/users/theofidry/repos","events_url":"https://api.github.com/users/theofidry/events{/privacy}","received_events_url":"https://api.github.com/users/theofidry/received_events","type":"User","site_admin":false},"labels":[{"id":145649051,"node_id":"MDU6TGFiZWwxNDU2NDkwNTE=","url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/WIP","name":"WIP","color":"FF7777","default":false},{"id":5114730,"node_id":"MDU6TGFiZWw1MTE0NzMw","url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/enhancement","name":"enhancement","color":"207de5","default":true},{"id":148214610,"node_id":"MDU6TGFiZWwxNDgyMTQ2MTA=","url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/refactoring","name":"refactoring","color":"88CCFF","default":false},{"id":676588614,"node_id":"MDU6TGFiZWw2NzY1ODg2MTQ=","url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/releases","name":"releases","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"keradus","id":2716794,"node_id":"MDQ6VXNlcjI3MTY3OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2716794?v=4","gravatar_id":"","url":"https://api.github.com/users/keradus","html_url":"https://github.com/keradus","followers_url":"https://api.github.com/users/keradus/followers","following_url":"https://api.github.com/users/keradus/following{/other_user}","gists_url":"https://api.github.com/users/keradus/gists{/gist_id}","starred_url":"https://api.github.com/users/keradus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keradus/subscriptions","organizations_url":"https://api.github.com/users/keradus/orgs","repos_url":"https://api.github.com/users/keradus/repos","events_url":"https://api.github.com/users/keradus/events{/privacy}","received_events_url":"https://api.github.com/users/keradus/received_events","type":"User","site_admin":false},"assignees":[{"login":"keradus","id":2716794,"node_id":"MDQ6VXNlcjI3MTY3OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2716794?v=4","gravatar_id":"","url":"https://api.github.com/users/keradus","html_url":"https://github.com/keradus","followers_url":"https://api.github.com/users/keradus/followers","following_url":"https://api.github.com/users/keradus/following{/other_user}","gists_url":"https://api.github.com/users/keradus/gists{/gist_id}","starred_url":"https://api.github.com/users/keradus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keradus/subscriptions","organizations_url":"https://api.github.com/users/keradus/orgs","repos_url":"https://api.github.com/users/keradus/repos","events_url":"https://api.github.com/users/keradus/events{/privacy}","received_events_url":"https://api.github.com/users/keradus/received_events","type":"User","site_admin":false}],"milestone":null,"comments":37,"created_at":"2018-04-26T07:33:11Z","updated_at":"2018-10-17T14:41:14Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3726","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3726","diff_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3726.diff","patch_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3726.patch"},"body":"This PR is a suggestion to switch from the unmaintained Box 2 to the Humbug fork in which the version 3 is being developed.\r\n\r\nA few things worth mentioning:\r\n\r\n- I used a `Makefile` instead of a bash file as I think it's an improvement for this kind of task, there is a better discoverability (type `make` and you could get the list of the commands) and it's easier to manage the task dependencies, i.e. get that `make smth` and it just works experience, no need to figure out how to install Box, do a `composer install` or something.\r\n- I used [`bamarni/composer-bin-plugin`](https://github.com/bamarni/composer-bin-plugin) to install Box as a dependencies without polluting the library dependencies. I can switch that to a PHAR if you prefer, but in any case I think it's better to have a way which does not require contributors to figure out which tool they need to install and better not require them a tool globally on their machine. If you are interested in more on the topic, I wrote an [entire article](https://medium.com/@tfidry/managing-your-dependencies-in-php-321d584441ab) about it\r\n\r\nI also noticed the `composer.lock` is not committed. IMO it should: it sure does not make any difference to the user when consuming the project as a library, but when you are shipping a PHAR you are shipping a real application on which it's better to have control on what dependencies is used there.\r\n\r\nOn the same token, I didn't find any e2e tests for the PHAR. I would _highly_ recommend to have one. Updating all the deps, adding some on the fly and shipping all the stuff in the PHAR and wish that it just works is being a bit insouciant. The PHAR transformation is not a trivial process although Box try very hard to make it easier, there is still code that just don't work within the PHAR.\r\n\r\nI've pushed that against 2.x as it's still the default branch, but it can be easily ported to 3.x as well"},"comment":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/comments/430656140","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3726#issuecomment-430656140","issue_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3726","id":430656140,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDY1NjE0MA==","user":{"login":"theofidry","id":5175937,"node_id":"MDQ6VXNlcjUxNzU5Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5175937?v=4","gravatar_id":"","url":"https://api.github.com/users/theofidry","html_url":"https://github.com/theofidry","followers_url":"https://api.github.com/users/theofidry/followers","following_url":"https://api.github.com/users/theofidry/following{/other_user}","gists_url":"https://api.github.com/users/theofidry/gists{/gist_id}","starred_url":"https://api.github.com/users/theofidry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theofidry/subscriptions","organizations_url":"https://api.github.com/users/theofidry/orgs","repos_url":"https://api.github.com/users/theofidry/repos","events_url":"https://api.github.com/users/theofidry/events{/privacy}","received_events_url":"https://api.github.com/users/theofidry/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T14:41:14Z","updated_at":"2018-10-17T14:41:14Z","author_association":"NONE","body":"np, just wanted to double check :)"}}
{"actor":{"display_login":"theofidry"}}