{"action":"closed","number":132,"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/132","id":211499171,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNDk5MTcx","html_url":"https://github.com/civicrm/civicrm-wordpress/pull/132","diff_url":"https://github.com/civicrm/civicrm-wordpress/pull/132.diff","patch_url":"https://github.com/civicrm/civicrm-wordpress/pull/132.patch","issue_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/issues/132","number":132,"state":"closed","locked":false,"title":"Modify PHP 7.2-incompatible statement in wp-cli","user":{"login":"MegaphoneJon","id":1796012,"node_id":"MDQ6VXNlcjE3OTYwMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1796012?v=4","gravatar_id":"","url":"https://api.github.com/users/MegaphoneJon","html_url":"https://github.com/MegaphoneJon","followers_url":"https://api.github.com/users/MegaphoneJon/followers","following_url":"https://api.github.com/users/MegaphoneJon/following{/other_user}","gists_url":"https://api.github.com/users/MegaphoneJon/gists{/gist_id}","starred_url":"https://api.github.com/users/MegaphoneJon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegaphoneJon/subscriptions","organizations_url":"https://api.github.com/users/MegaphoneJon/orgs","repos_url":"https://api.github.com/users/MegaphoneJon/repos","events_url":"https://api.github.com/users/MegaphoneJon/events{/privacy}","received_events_url":"https://api.github.com/users/MegaphoneJon/received_events","type":"User","site_admin":false},"body":"Overview\r\n----------------------------------------\r\nYou can no longer use `count()` on non-countable variables in PHP 7.2.  This modifies the `parseDSN()` function similarly to how Seamus did in https://github.com/civicrm/civicrm-packages/pull/207.\r\n\r\nBefore\r\n----------------------------------------\r\nRunning wp-cli in PHP 7.2 gets this error:\r\n\r\n```\r\nPHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/jon/local/example/htdocs/wp-content/plugins/civicrm/wp-cli/civicrm.php on line 1147\r\nPHP Stack trace:\r\nPHP   1. {main}() /usr/local/bin/wp-cli:0\r\nPHP   2. include() /usr/local/bin/wp-cli:4\r\nPHP   3. include() phar:///usr/local/bin/wp-cli/php/boot-phar.php:8\r\nPHP   4. WP_CLI\\bootstrap() phar:///usr/local/bin/wp-cli/php/wp-cli.php:23\r\nPHP   5. WP_CLI\\Bootstrap\\LaunchRunner->process() phar:///usr/local/bin/wp-cli/php/bootstrap.php:75\r\nPHP   6. WP_CLI\\Runner->start() phar:///usr/local/bin/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23\r\nPHP   7. WP_CLI\\Runner->_run_command_and_exit() phar:///usr/local/bin/wp-cli/php/WP_CLI/Runner.php:1102\r\nPHP   8. WP_CLI\\Runner->run_command() phar:///usr/local/bin/wp-cli/php/WP_CLI/Runner.php:376\r\nPHP   9. WP_CLI\\Dispatcher\\Subcommand->invoke() phar:///usr/local/bin/wp-cli/php/WP_CLI/Runner.php:353\r\nPHP  10. call_user_func:{phar:///usr/local/bin/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php:425}() phar:///usr/local/bin/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php:425\r\nPHP  11. WP_CLI\\Dispatcher\\CommandFactory::WP_CLI\\Dispatcher\\{closure}() phar:///usr/local/bin/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php:425\r\nPHP  12. call_user_func:{phar:///usr/local/bin/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php:89}() phar:///usr/local/bin/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php:89\r\nPHP  13. CiviCRM_Command->__invoke() phar:///usr/local/bin/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php:89\r\nPHP  14. CiviCRM_Command->sqlDump() /home/jon/local/example/htdocs/wp-content/plugins/civicrm/wp-cli/civicrm.php:169\r\nPHP  15. CiviCRM_Command::parseDSN() /home/jon/local/example/htdocs/wp-content/plugins/civicrm/wp-cli/civicrm.php:781\r\n```\r\n\r\nAfter\r\n----------------------------------------\r\nwp-cli works similarly to PHP < 7.2.\r\n","created_at":"2018-08-28T17:25:52Z","updated_at":"2018-10-05T13:10:36Z","closed_at":"2018-10-05T13:10:36Z","merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":248649616,"node_id":"MDU6TGFiZWwyNDg2NDk2MTY=","url":"https://api.github.com/repos/civicrm/civicrm-wordpress/labels/master","name":"master","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/132/commits","review_comments_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/132/comments","review_comment_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/issues/132/comments","statuses_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/statuses/43b1bed67c112c2ed92869299995a2cdf2e41aa8","head":{"label":"MegaphoneJon:wp-cli-php72","ref":"wp-cli-php72","sha":"43b1bed67c112c2ed92869299995a2cdf2e41aa8","user":{"login":"MegaphoneJon","id":1796012,"node_id":"MDQ6VXNlcjE3OTYwMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1796012?v=4","gravatar_id":"","url":"https://api.github.com/users/MegaphoneJon","html_url":"https://github.com/MegaphoneJon","followers_url":"https://api.github.com/users/MegaphoneJon/followers","following_url":"https://api.github.com/users/MegaphoneJon/following{/other_user}","gists_url":"https://api.github.com/users/MegaphoneJon/gists{/gist_id}","starred_url":"https://api.github.com/users/MegaphoneJon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegaphoneJon/subscriptions","organizations_url":"https://api.github.com/users/MegaphoneJon/orgs","repos_url":"https://api.github.com/users/MegaphoneJon/repos","events_url":"https://api.github.com/users/MegaphoneJon/events{/privacy}","received_events_url":"https://api.github.com/users/MegaphoneJon/received_events","type":"User","site_admin":false},"repo":{"id":9741642,"node_id":"MDEwOlJlcG9zaXRvcnk5NzQxNjQy","name":"civicrm-wordpress","full_name":"MegaphoneJon/civicrm-wordpress","private":false,"owner":{"login":"MegaphoneJon","id":1796012,"node_id":"MDQ6VXNlcjE3OTYwMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1796012?v=4","gravatar_id":"","url":"https://api.github.com/users/MegaphoneJon","html_url":"https://github.com/MegaphoneJon","followers_url":"https://api.github.com/users/MegaphoneJon/followers","following_url":"https://api.github.com/users/MegaphoneJon/following{/other_user}","gists_url":"https://api.github.com/users/MegaphoneJon/gists{/gist_id}","starred_url":"https://api.github.com/users/MegaphoneJon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegaphoneJon/subscriptions","organizations_url":"https://api.github.com/users/MegaphoneJon/orgs","repos_url":"https://api.github.com/users/MegaphoneJon/repos","events_url":"https://api.github.com/users/MegaphoneJon/events{/privacy}","received_events_url":"https://api.github.com/users/MegaphoneJon/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MegaphoneJon/civicrm-wordpress","description":"CiviCRM (WordPress Integration)","fork":true,"url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress","forks_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/forks","keys_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/teams","hooks_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/hooks","issue_events_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/issues/events{/number}","events_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/events","assignees_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/assignees{/user}","branches_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/branches{/branch}","tags_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/tags","blobs_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/git/refs{/sha}","trees_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/statuses/{sha}","languages_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/languages","stargazers_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/stargazers","contributors_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/contributors","subscribers_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/subscribers","subscription_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/subscription","commits_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/commits{/sha}","git_commits_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/git/commits{/sha}","comments_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/comments{/number}","issue_comment_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/issues/comments{/number}","contents_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/contents/{+path}","compare_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/merges","archive_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/downloads","issues_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/issues{/number}","pulls_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/pulls{/number}","milestones_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/milestones{/number}","notifications_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/labels{/name}","releases_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/releases{/id}","deployments_url":"https://api.github.com/repos/MegaphoneJon/civicrm-wordpress/deployments","created_at":"2013-04-29T05:28:20Z","updated_at":"2016-12-21T16:34:18Z","pushed_at":"2018-08-28T17:21:15Z","git_url":"git://github.com/MegaphoneJon/civicrm-wordpress.git","ssh_url":"git@github.com:MegaphoneJon/civicrm-wordpress.git","clone_url":"https://github.com/MegaphoneJon/civicrm-wordpress.git","svn_url":"https://github.com/MegaphoneJon/civicrm-wordpress","homepage":null,"size":392,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"civicrm:master","ref":"master","sha":"fd6ba3ea13c1a701e5504546a6971b65993778be","user":{"login":"civicrm","id":136373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjM3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/136373?v=4","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":8495557,"node_id":"MDEwOlJlcG9zaXRvcnk4NDk1NTU3","name":"civicrm-wordpress","full_name":"civicrm/civicrm-wordpress","private":false,"owner":{"login":"civicrm","id":136373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjM3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/136373?v=4","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/civicrm/civicrm-wordpress","description":"CiviCRM (WordPress Integration)","fork":false,"url":"https://api.github.com/repos/civicrm/civicrm-wordpress","forks_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/forks","keys_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/teams","hooks_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/events","assignees_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/tags","blobs_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/languages","stargazers_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/subscription","commits_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/merges","archive_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/downloads","issues_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civicrm-wordpress/deployments","created_at":"2013-03-01T06:15:29Z","updated_at":"2018-07-27T12:14:57Z","pushed_at":"2018-10-03T18:27:06Z","git_url":"git://github.com/civicrm/civicrm-wordpress.git","ssh_url":"git@github.com:civicrm/civicrm-wordpress.git","clone_url":"https://github.com/civicrm/civicrm-wordpress.git","svn_url":"https://github.com/civicrm/civicrm-wordpress","homepage":null,"size":512,"stargazers_count":31,"watchers_count":31,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":53,"open_issues":10,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/132"},"html":{"href":"https://github.com/civicrm/civicrm-wordpress/pull/132"},"issue":{"href":"https://api.github.com/repos/civicrm/civicrm-wordpress/issues/132"},"comments":{"href":"https://api.github.com/repos/civicrm/civicrm-wordpress/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civicrm/civicrm-wordpress/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civicrm-wordpress/statuses/43b1bed67c112c2ed92869299995a2cdf2e41aa8"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":3,"review_comments":1,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"kcristiano"}}