{"action":"created","comment":{"url":"https://api.github.com/repos/infection/infection/pulls/comments/214754431","pull_request_review_id":151872696,"id":214754431,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDc1NDQzMQ==","diff_hunk":"@@ -9,85 +9,31 @@\n \n namespace Infection\\Console\\Util;\n \n-use Composer\\XdebugHandler\\XdebugHandler;\n+use Composer\\XdebugHandler\\PhpConfig;\n use Symfony\\Component\\Process\\Process;\n \n /**\n- * Vanilla PHP process and utility functions\n- *\n  * @internal\n  */\n final class PhpProcess extends Process\n {\n     /**\n-     * @var string|bool\n-     */\n-    private static $phprc;\n-\n-    /**\n-     * Setups a default Xdebug-free environment for all subprocesses:\n+     * Runs a PHP process with xdebug loaded\n+     *\n+     * If xdebug was loaded in the main process, it will have been restarted\n+     * without xdebug and configured to keep xdebug out of PHP sub-processes.\n      *\n-     * - PHPRC should point to our temporary php.ini (we need to save a previous value)\n+     * This method allows a sub-process to run with xdebug enabled (if it was\n+     * originally loaded), then restores the xdebug-free environment.\n      *\n-     * - PHP_INI_SCAN_DIR should be made blank because our php.ini has all we need\n-     *   (a previous value can be found in XdebugHandler::getRestartSettings()[\"scanDir\"])\n+     * {@inheritdoc}\n      */\n-    public static function setupXdebugFreeEnvironment(): void\n-    {\n-        if (!isset(self::$phprc)) {\n-            self::$phprc = getenv('PHPRC');\n-        }\n-\n-        self::putenv('PHPRC', XdebugHandler::getRestartSettings()['tmpIni']);\n-        self::putenv('PHP_INI_SCAN_DIR', '');\n-    }\n-\n     public function start(callable $callback = null, array $env = null): void\n     {\n-        // Xdebug wasn't skipped, running as is\n-        if ('' === XdebugHandler::getSkippedVersion()) {\n-            parent::start($callback, $env ?? []);\n-\n-            return;\n-        }\n-\n-        /*\n-         * Vanilla processes are expected to run in a vanilla, or the most original, environment.\n-         *\n-         * For that, we need to remove or reset all environment variables we set to setup our custom\n-         * xdebug-free environment, later setting them back so we won't have to think again about it\n-         * for the bulk of other processes, which not require xdebug to function, and work better\n-         * without it.\n-         */\n-\n-        self::restoreVanillaEnvironment();\n+        $phpConfig = new PhpConfig();","path":"src/Console/Util/PhpProcess.php","position":64,"original_position":64,"commit_id":"59067d1b67581b1ec7eced2e12dfcb61ffac3c12","original_commit_id":"59067d1b67581b1ec7eced2e12dfcb61ffac3c12","user":{"login":"BackEndTea","id":14289961,"node_id":"MDQ6VXNlcjE0Mjg5OTYx","avatar_url":"https://avatars1.githubusercontent.com/u/14289961?v=4","gravatar_id":"","url":"https://api.github.com/users/BackEndTea","html_url":"https://github.com/BackEndTea","followers_url":"https://api.github.com/users/BackEndTea/followers","following_url":"https://api.github.com/users/BackEndTea/following{/other_user}","gists_url":"https://api.github.com/users/BackEndTea/gists{/gist_id}","starred_url":"https://api.github.com/users/BackEndTea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BackEndTea/subscriptions","organizations_url":"https://api.github.com/users/BackEndTea/orgs","repos_url":"https://api.github.com/users/BackEndTea/repos","events_url":"https://api.github.com/users/BackEndTea/events{/privacy}","received_events_url":"https://api.github.com/users/BackEndTea/received_events","type":"User","site_admin":false},"body":"@sanmai Was there a specific reason that we did not use the `PhpConfig` class before?","created_at":"2018-09-03T20:51:58Z","updated_at":"2018-09-03T20:51:58Z","html_url":"https://github.com/infection/infection/pull/474#discussion_r214754431","pull_request_url":"https://api.github.com/repos/infection/infection/pulls/474","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/infection/infection/pulls/comments/214754431"},"html":{"href":"https://github.com/infection/infection/pull/474#discussion_r214754431"},"pull_request":{"href":"https://api.github.com/repos/infection/infection/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/infection/infection/pulls/474","id":212815993,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyODE1OTkz","html_url":"https://github.com/infection/infection/pull/474","diff_url":"https://github.com/infection/infection/pull/474.diff","patch_url":"https://github.com/infection/infection/pull/474.patch","issue_url":"https://api.github.com/repos/infection/infection/issues/474","number":474,"state":"open","locked":false,"title":"Update xdebug-handler to simplify sub-processes","user":{"login":"johnstevenson","id":881777,"node_id":"MDQ6VXNlcjg4MTc3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/881777?v=4","gravatar_id":"","url":"https://api.github.com/users/johnstevenson","html_url":"https://github.com/johnstevenson","followers_url":"https://api.github.com/users/johnstevenson/followers","following_url":"https://api.github.com/users/johnstevenson/following{/other_user}","gists_url":"https://api.github.com/users/johnstevenson/gists{/gist_id}","starred_url":"https://api.github.com/users/johnstevenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnstevenson/subscriptions","organizations_url":"https://api.github.com/users/johnstevenson/orgs","repos_url":"https://api.github.com/users/johnstevenson/repos","events_url":"https://api.github.com/users/johnstevenson/events{/privacy}","received_events_url":"https://api.github.com/users/johnstevenson/received_events","type":"User","site_admin":false},"body":"This PR:\r\n\r\n- [ ] Updates xdebug-handler to [1.3.0](https://github.com/composer/xdebug-handler/releases/tag/1.3.0)\r\n\r\nThis simplifies setting up a default xdebug-free environment and running PHP sub-processes with xdebug loaded.","created_at":"2018-09-03T20:38:25Z","updated_at":"2018-09-03T20:51:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea1378b377458e36382e8ef30cb2901bfada8a19","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sanmai","id":139488,"node_id":"MDQ6VXNlcjEzOTQ4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/139488?v=4","gravatar_id":"","url":"https://api.github.com/users/sanmai","html_url":"https://github.com/sanmai","followers_url":"https://api.github.com/users/sanmai/followers","following_url":"https://api.github.com/users/sanmai/following{/other_user}","gists_url":"https://api.github.com/users/sanmai/gists{/gist_id}","starred_url":"https://api.github.com/users/sanmai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanmai/subscriptions","organizations_url":"https://api.github.com/users/sanmai/orgs","repos_url":"https://api.github.com/users/sanmai/repos","events_url":"https://api.github.com/users/sanmai/events{/privacy}","received_events_url":"https://api.github.com/users/sanmai/received_events","type":"User","site_admin":false},{"login":"sidz","id":1302230,"node_id":"MDQ6VXNlcjEzMDIyMzA=","avatar_url":"https://avatars2.githubusercontent.com/u/1302230?v=4","gravatar_id":"","url":"https://api.github.com/users/sidz","html_url":"https://github.com/sidz","followers_url":"https://api.github.com/users/sidz/followers","following_url":"https://api.github.com/users/sidz/following{/other_user}","gists_url":"https://api.github.com/users/sidz/gists{/gist_id}","starred_url":"https://api.github.com/users/sidz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidz/subscriptions","organizations_url":"https://api.github.com/users/sidz/orgs","repos_url":"https://api.github.com/users/sidz/repos","events_url":"https://api.github.com/users/sidz/events{/privacy}","received_events_url":"https://api.github.com/users/sidz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":993436886,"node_id":"MDU6TGFiZWw5OTM0MzY4ODY=","url":"https://api.github.com/repos/infection/infection/labels/Needs%20Review","name":"Needs Review","color":"D3D3D3","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/infection/infection/pulls/474/commits","review_comments_url":"https://api.github.com/repos/infection/infection/pulls/474/comments","review_comment_url":"https://api.github.com/repos/infection/infection/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infection/infection/issues/474/comments","statuses_url":"https://api.github.com/repos/infection/infection/statuses/59067d1b67581b1ec7eced2e12dfcb61ffac3c12","head":{"label":"johnstevenson:new-xdebug-handler","ref":"new-xdebug-handler","sha":"59067d1b67581b1ec7eced2e12dfcb61ffac3c12","user":{"login":"johnstevenson","id":881777,"node_id":"MDQ6VXNlcjg4MTc3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/881777?v=4","gravatar_id":"","url":"https://api.github.com/users/johnstevenson","html_url":"https://github.com/johnstevenson","followers_url":"https://api.github.com/users/johnstevenson/followers","following_url":"https://api.github.com/users/johnstevenson/following{/other_user}","gists_url":"https://api.github.com/users/johnstevenson/gists{/gist_id}","starred_url":"https://api.github.com/users/johnstevenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnstevenson/subscriptions","organizations_url":"https://api.github.com/users/johnstevenson/orgs","repos_url":"https://api.github.com/users/johnstevenson/repos","events_url":"https://api.github.com/users/johnstevenson/events{/privacy}","received_events_url":"https://api.github.com/users/johnstevenson/received_events","type":"User","site_admin":false},"repo":{"id":146937425,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY5Mzc0MjU=","name":"infection","full_name":"johnstevenson/infection","owner":{"login":"johnstevenson","id":881777,"node_id":"MDQ6VXNlcjg4MTc3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/881777?v=4","gravatar_id":"","url":"https://api.github.com/users/johnstevenson","html_url":"https://github.com/johnstevenson","followers_url":"https://api.github.com/users/johnstevenson/followers","following_url":"https://api.github.com/users/johnstevenson/following{/other_user}","gists_url":"https://api.github.com/users/johnstevenson/gists{/gist_id}","starred_url":"https://api.github.com/users/johnstevenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnstevenson/subscriptions","organizations_url":"https://api.github.com/users/johnstevenson/orgs","repos_url":"https://api.github.com/users/johnstevenson/repos","events_url":"https://api.github.com/users/johnstevenson/events{/privacy}","received_events_url":"https://api.github.com/users/johnstevenson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnstevenson/infection","description":"AST based PHP Mutation Testing Framework","fork":true,"url":"https://api.github.com/repos/johnstevenson/infection","forks_url":"https://api.github.com/repos/johnstevenson/infection/forks","keys_url":"https://api.github.com/repos/johnstevenson/infection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnstevenson/infection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnstevenson/infection/teams","hooks_url":"https://api.github.com/repos/johnstevenson/infection/hooks","issue_events_url":"https://api.github.com/repos/johnstevenson/infection/issues/events{/number}","events_url":"https://api.github.com/repos/johnstevenson/infection/events","assignees_url":"https://api.github.com/repos/johnstevenson/infection/assignees{/user}","branches_url":"https://api.github.com/repos/johnstevenson/infection/branches{/branch}","tags_url":"https://api.github.com/repos/johnstevenson/infection/tags","blobs_url":"https://api.github.com/repos/johnstevenson/infection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnstevenson/infection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnstevenson/infection/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnstevenson/infection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnstevenson/infection/statuses/{sha}","languages_url":"https://api.github.com/repos/johnstevenson/infection/languages","stargazers_url":"https://api.github.com/repos/johnstevenson/infection/stargazers","contributors_url":"https://api.github.com/repos/johnstevenson/infection/contributors","subscribers_url":"https://api.github.com/repos/johnstevenson/infection/subscribers","subscription_url":"https://api.github.com/repos/johnstevenson/infection/subscription","commits_url":"https://api.github.com/repos/johnstevenson/infection/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnstevenson/infection/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnstevenson/infection/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnstevenson/infection/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnstevenson/infection/contents/{+path}","compare_url":"https://api.github.com/repos/johnstevenson/infection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnstevenson/infection/merges","archive_url":"https://api.github.com/repos/johnstevenson/infection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnstevenson/infection/downloads","issues_url":"https://api.github.com/repos/johnstevenson/infection/issues{/number}","pulls_url":"https://api.github.com/repos/johnstevenson/infection/pulls{/number}","milestones_url":"https://api.github.com/repos/johnstevenson/infection/milestones{/number}","notifications_url":"https://api.github.com/repos/johnstevenson/infection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnstevenson/infection/labels{/name}","releases_url":"https://api.github.com/repos/johnstevenson/infection/releases{/id}","deployments_url":"https://api.github.com/repos/johnstevenson/infection/deployments","created_at":"2018-08-31T20:03:08Z","updated_at":"2018-08-31T20:03:11Z","pushed_at":"2018-09-03T20:25:02Z","git_url":"git://github.com/johnstevenson/infection.git","ssh_url":"git@github.com:johnstevenson/infection.git","clone_url":"https://github.com/johnstevenson/infection.git","svn_url":"https://github.com/johnstevenson/infection","homepage":"https://infection.github.io","size":1459,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"infection:master","ref":"master","sha":"3dc9d9b2c016b0de0823cd9e19fb7970e6c3c89f","user":{"login":"infection","id":29210618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MjEwNjE4","avatar_url":"https://avatars2.githubusercontent.com/u/29210618?v=4","gravatar_id":"","url":"https://api.github.com/users/infection","html_url":"https://github.com/infection","followers_url":"https://api.github.com/users/infection/followers","following_url":"https://api.github.com/users/infection/following{/other_user}","gists_url":"https://api.github.com/users/infection/gists{/gist_id}","starred_url":"https://api.github.com/users/infection/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infection/subscriptions","organizations_url":"https://api.github.com/users/infection/orgs","repos_url":"https://api.github.com/users/infection/repos","events_url":"https://api.github.com/users/infection/events{/privacy}","received_events_url":"https://api.github.com/users/infection/received_events","type":"Organization","site_admin":false},"repo":{"id":95741878,"node_id":"MDEwOlJlcG9zaXRvcnk5NTc0MTg3OA==","name":"infection","full_name":"infection/infection","owner":{"login":"infection","id":29210618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MjEwNjE4","avatar_url":"https://avatars2.githubusercontent.com/u/29210618?v=4","gravatar_id":"","url":"https://api.github.com/users/infection","html_url":"https://github.com/infection","followers_url":"https://api.github.com/users/infection/followers","following_url":"https://api.github.com/users/infection/following{/other_user}","gists_url":"https://api.github.com/users/infection/gists{/gist_id}","starred_url":"https://api.github.com/users/infection/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infection/subscriptions","organizations_url":"https://api.github.com/users/infection/orgs","repos_url":"https://api.github.com/users/infection/repos","events_url":"https://api.github.com/users/infection/events{/privacy}","received_events_url":"https://api.github.com/users/infection/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infection/infection","description":"AST based PHP Mutation Testing Framework","fork":false,"url":"https://api.github.com/repos/infection/infection","forks_url":"https://api.github.com/repos/infection/infection/forks","keys_url":"https://api.github.com/repos/infection/infection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infection/infection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infection/infection/teams","hooks_url":"https://api.github.com/repos/infection/infection/hooks","issue_events_url":"https://api.github.com/repos/infection/infection/issues/events{/number}","events_url":"https://api.github.com/repos/infection/infection/events","assignees_url":"https://api.github.com/repos/infection/infection/assignees{/user}","branches_url":"https://api.github.com/repos/infection/infection/branches{/branch}","tags_url":"https://api.github.com/repos/infection/infection/tags","blobs_url":"https://api.github.com/repos/infection/infection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infection/infection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infection/infection/git/refs{/sha}","trees_url":"https://api.github.com/repos/infection/infection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infection/infection/statuses/{sha}","languages_url":"https://api.github.com/repos/infection/infection/languages","stargazers_url":"https://api.github.com/repos/infection/infection/stargazers","contributors_url":"https://api.github.com/repos/infection/infection/contributors","subscribers_url":"https://api.github.com/repos/infection/infection/subscribers","subscription_url":"https://api.github.com/repos/infection/infection/subscription","commits_url":"https://api.github.com/repos/infection/infection/commits{/sha}","git_commits_url":"https://api.github.com/repos/infection/infection/git/commits{/sha}","comments_url":"https://api.github.com/repos/infection/infection/comments{/number}","issue_comment_url":"https://api.github.com/repos/infection/infection/issues/comments{/number}","contents_url":"https://api.github.com/repos/infection/infection/contents/{+path}","compare_url":"https://api.github.com/repos/infection/infection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infection/infection/merges","archive_url":"https://api.github.com/repos/infection/infection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infection/infection/downloads","issues_url":"https://api.github.com/repos/infection/infection/issues{/number}","pulls_url":"https://api.github.com/repos/infection/infection/pulls{/number}","milestones_url":"https://api.github.com/repos/infection/infection/milestones{/number}","notifications_url":"https://api.github.com/repos/infection/infection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infection/infection/labels{/name}","releases_url":"https://api.github.com/repos/infection/infection/releases{/id}","deployments_url":"https://api.github.com/repos/infection/infection/deployments","created_at":"2017-06-29T05:29:49Z","updated_at":"2018-09-03T11:26:51Z","pushed_at":"2018-09-03T20:42:56Z","git_url":"git://github.com/infection/infection.git","ssh_url":"git@github.com:infection/infection.git","clone_url":"https://github.com/infection/infection.git","svn_url":"https://github.com/infection/infection","homepage":"https://infection.github.io","size":1446,"stargazers_count":529,"watchers_count":529,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":50,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":46,"open_issues":50,"watchers":529,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infection/infection/pulls/474"},"html":{"href":"https://github.com/infection/infection/pull/474"},"issue":{"href":"https://api.github.com/repos/infection/infection/issues/474"},"comments":{"href":"https://api.github.com/repos/infection/infection/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/infection/infection/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/infection/infection/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infection/infection/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/infection/infection/statuses/59067d1b67581b1ec7eced2e12dfcb61ffac3c12"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"BackEndTea"}}