{"action":"created","issue":{"url":"https://api.github.com/repos/php/php-src/issues/3505","repository_url":"https://api.github.com/repos/php/php-src","labels_url":"https://api.github.com/repos/php/php-src/issues/3505/labels{/name}","comments_url":"https://api.github.com/repos/php/php-src/issues/3505/comments","events_url":"https://api.github.com/repos/php/php-src/issues/3505/events","html_url":"https://github.com/php/php-src/pull/3505","id":358270319,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MDgxMTU3","number":3505,"title":"Add a new tidy.php script to fix whitespace and EOL issues","user":{"login":"petk","id":1614009,"node_id":"MDQ6VXNlcjE2MTQwMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1614009?v=4","gravatar_id":"","url":"https://api.github.com/users/petk","html_url":"https://github.com/petk","followers_url":"https://api.github.com/users/petk/followers","following_url":"https://api.github.com/users/petk/following{/other_user}","gists_url":"https://api.github.com/users/petk/gists{/gist_id}","starred_url":"https://api.github.com/users/petk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petk/subscriptions","organizations_url":"https://api.github.com/users/petk/orgs","repos_url":"https://api.github.com/users/petk/repos","events_url":"https://api.github.com/users/petk/events{/privacy}","received_events_url":"https://api.github.com/users/petk/received_events","type":"User","site_admin":false},"labels":[{"id":148912334,"node_id":"MDU6TGFiZWwxNDg5MTIzMzQ=","url":"https://api.github.com/repos/php/php-src/labels/Enhancement","name":"Enhancement","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2018-09-08T06:46:25Z","updated_at":"2018-10-04T20:46:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/php/php-src/pulls/3505","html_url":"https://github.com/php/php-src/pull/3505","diff_url":"https://github.com/php/php-src/pull/3505.diff","patch_url":"https://github.com/php/php-src/pull/3505.patch"},"body":"Hello, this patch trims trailing whitespaces in source code files for the master branch:\r\n\r\n<details><summary>excluding the following locations:</summary>\r\n\r\n* tests\r\n* Zend/tests\r\n* sapi/tests\r\n* sapi/*/tests\r\n* ext/*/tests\r\n* ext/mbstring/oniguruma\r\n* ext/mbstring/oniguruma.patch\r\n* ext/gd/libgd\r\n* ext/date/lib\r\n* ext/fileinfo/libmagic\r\n* ext/fileinfo/libmagic.patch\r\n* ext/fileinfo/magicdata.patch\r\n* ext/sqlite3/libsqlite\r\n* ext/pcre/pcre2lib\r\n* ext/zip/lib/\r\n* ext/standard/html_tables/mappings\r\n* ltmain.sh\r\n* build/libtool.m4\r\n* build/shtool\r\n* win32/php7dllts.rc\r\n* win32/php7ts.rc\r\n* win32/php7ts_cli.rc\r\n</details>\r\n\r\n<details><summary>And excluding files generated using internal scripts:</summary>\r\n\r\n* Zend/zend_language_scanner.c\r\n* Zend/zend_ini_scanner.c\r\n* Zend/zend_vm_execute.h\r\n* Zend/zend_vm_opcodes.h\r\n* Zend/zend_vm_opcodes.c\r\n* sapi/cli/mime_type_map.h\r\n* sapi/phpdbg/phpdbg_lexer.c\r\n* ext/json/json_scanner.c\r\n* ext/pdo/pdo_sql_parser.c\r\n* ext/standard/url_scanner_ex.c\r\n* ext/standard/var_unserializer.c\r\n* ext/phar/phar_path_check.c\r\n* ext/fileinfo/data_file.c\r\n* ext/standard/credits_ext.h\r\n* ext/standard/credits_sapi.h\r\n* ext/mbstring/unicode_data.h\r\n* win32/cp_enc_map.c\r\n* ext/standard/html_tables.h\r\n</details>\r\n\r\nNote, that some editors automatically trim trailing whitespaces so this is kind of for convenience of editing code also.\r\n\r\nOnce there were mentioned also merge conflicts in #3091 to trim these in PHP-7.1 and up also. Would it be ok to make separate pull requests for PHP-7.1, PHP-7.2, and PHP-7.3 so merging patches won't cause merge conflicts due to whitespaces in the future?\r\n\r\nFor easier viewing of the changes done here there is also [`?w=1`](https://github.com/php/php-src/pull/3505/files?w=1) GitHub URL parameter, which doesn't show whitespace changes... "},"comment":{"url":"https://api.github.com/repos/php/php-src/issues/comments/427163539","html_url":"https://github.com/php/php-src/pull/3505#issuecomment-427163539","issue_url":"https://api.github.com/repos/php/php-src/issues/3505","id":427163539,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzE2MzUzOQ==","user":{"login":"petk","id":1614009,"node_id":"MDQ6VXNlcjE2MTQwMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1614009?v=4","gravatar_id":"","url":"https://api.github.com/users/petk","html_url":"https://github.com/petk","followers_url":"https://api.github.com/users/petk/followers","following_url":"https://api.github.com/users/petk/following{/other_user}","gists_url":"https://api.github.com/users/petk/gists{/gist_id}","starred_url":"https://api.github.com/users/petk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petk/subscriptions","organizations_url":"https://api.github.com/users/petk/orgs","repos_url":"https://api.github.com/users/petk/repos","events_url":"https://api.github.com/users/petk/events{/privacy}","received_events_url":"https://api.github.com/users/petk/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T20:46:48Z","updated_at":"2018-10-04T20:46:48Z","author_association":"CONTRIBUTOR","body":"@carusogabriel Otherwise, the `tidy.php` will be ready for usage very shortly. So we can refactor it in the master branch and/or cherry pick it to PHP-7.1 or commit in the PHP-7.1 directly...\r\n\r\nThen, the fixing procedure will be very trivial:\r\n\r\n```bash\r\ncd php-src\r\ngit pull --rebase\r\ngit checkout PHP-7.1\r\nscripts/dev/tidy.php . --{options-yet-to-be-determined}\r\n# check the changes\r\ngit add .\r\ngit commit -m \"TL;DR of the changes\"\r\ngit checkout PHP-7.2\r\ngit merge --no-ff --log -s ours PHP-7.1\r\nscripts/dev/tidy.php . --{options-yet-to-be-determined}\r\n# check the changes\r\ngit add .\r\ngit commit -m \"TL;DR of the changes\"\r\ngit checkout PHP-7.3\r\ngit merge --no-ff --log -s ours PHP-7.2\r\nscripts/dev/tidy.php . --{options-yet-to-be-determined}\r\n# check changes\r\ngit add .\r\ngit commit -m \"TL;DR of the changes\"\r\ngit checkout master\r\ngit merge --no-ff --log -s ours PHP-7.3\r\nscripts/dev/tidy.php . --{options-yet-to-be-determined}\r\n# check changes\r\ngit add .\r\ngit commit -m \"TL;DR of the changes\"\r\ngit push origin PHP-7.1 PHP-7.2 PHP-7.3 master\r\n```\r\n\r\nOne issue is that running `scripts/dev/tidy.php` with certain options I have in mind will tidy a lot of files (~ 8k files) so it might make sense also to split the commit for *.phpt files and a separate commit for all others this one time when this is done. For easier browsing of the commits in the future."}}
{"actor":{"display_login":"petk"}}