{"action":"created","issue":{"url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2864","repository_url":"https://api.github.com/repos/symphonycms/symphony-2","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2864/labels{/name}","comments_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2864/comments","events_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2864/events","html_url":"https://github.com/symphonycms/symphony-2/issues/2864","id":360345771,"node_id":"MDU6SXNzdWUzNjAzNDU3NzE=","number":2864,"title":"Error reporting is set too late","user":{"login":"michael-e","id":40072,"node_id":"MDQ6VXNlcjQwMDcy","avatar_url":"https://avatars2.githubusercontent.com/u/40072?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-e","html_url":"https://github.com/michael-e","followers_url":"https://api.github.com/users/michael-e/followers","following_url":"https://api.github.com/users/michael-e/following{/other_user}","gists_url":"https://api.github.com/users/michael-e/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-e/subscriptions","organizations_url":"https://api.github.com/users/michael-e/orgs","repos_url":"https://api.github.com/users/michael-e/repos","events_url":"https://api.github.com/users/michael-e/events{/privacy}","received_events_url":"https://api.github.com/users/michael-e/received_events","type":"User","site_admin":false},"labels":[{"id":171251,"node_id":"MDU6TGFiZWwxNzEyNTE=","url":"https://api.github.com/repos/symphonycms/symphony-2/labels/1%20-%20Minor","name":"1 - Minor","color":"02e10c","default":false}],"state":"open","locked":false,"assignee":{"login":"michael-e","id":40072,"node_id":"MDQ6VXNlcjQwMDcy","avatar_url":"https://avatars2.githubusercontent.com/u/40072?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-e","html_url":"https://github.com/michael-e","followers_url":"https://api.github.com/users/michael-e/followers","following_url":"https://api.github.com/users/michael-e/following{/other_user}","gists_url":"https://api.github.com/users/michael-e/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-e/subscriptions","organizations_url":"https://api.github.com/users/michael-e/orgs","repos_url":"https://api.github.com/users/michael-e/repos","events_url":"https://api.github.com/users/michael-e/events{/privacy}","received_events_url":"https://api.github.com/users/michael-e/received_events","type":"User","site_admin":false},"assignees":[{"login":"michael-e","id":40072,"node_id":"MDQ6VXNlcjQwMDcy","avatar_url":"https://avatars2.githubusercontent.com/u/40072?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-e","html_url":"https://github.com/michael-e","followers_url":"https://api.github.com/users/michael-e/followers","following_url":"https://api.github.com/users/michael-e/following{/other_user}","gists_url":"https://api.github.com/users/michael-e/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-e/subscriptions","organizations_url":"https://api.github.com/users/michael-e/orgs","repos_url":"https://api.github.com/users/michael-e/repos","events_url":"https://api.github.com/users/michael-e/events{/privacy}","received_events_url":"https://api.github.com/users/michael-e/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/symphonycms/symphony-2/milestones/40","html_url":"https://github.com/symphonycms/symphony-2/milestone/40","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/milestones/40/labels","id":3650337,"node_id":"MDk6TWlsZXN0b25lMzY1MDMzNw==","number":40,"title":"2.7.8","description":"Last bug fix release of the 2.x line","creator":{"login":"nitriques","id":771169,"node_id":"MDQ6VXNlcjc3MTE2OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/771169?v=4","gravatar_id":"","url":"https://api.github.com/users/nitriques","html_url":"https://github.com/nitriques","followers_url":"https://api.github.com/users/nitriques/followers","following_url":"https://api.github.com/users/nitriques/following{/other_user}","gists_url":"https://api.github.com/users/nitriques/gists{/gist_id}","starred_url":"https://api.github.com/users/nitriques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitriques/subscriptions","organizations_url":"https://api.github.com/users/nitriques/orgs","repos_url":"https://api.github.com/users/nitriques/repos","events_url":"https://api.github.com/users/nitriques/events{/privacy}","received_events_url":"https://api.github.com/users/nitriques/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":4,"state":"open","created_at":"2018-09-13T02:06:23Z","updated_at":"2018-09-18T01:15:45Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-09-14T15:12:20Z","updated_at":"2018-09-18T11:06:46Z","closed_at":null,"author_association":"MEMBER","body":"Affected Symphony version(s) : 2.7.x\r\nPHP version(s) : 7.2\r\nOS(es) : all\r\n\r\nOfficially Symphony 2.7 is not supported on PHP 7.2. But, given the fact that it's an LTS release, I nevertheless suggest to keep it working if possible.\r\n\r\nPHP 7.2 has an interesting bug. Accoording to [the docs](http://php.net/manual/en/function.idn-to-utf8.php), the `variant` parameter's default value for the `idn_to_utf8` function is `INTL_IDNA_VARIANT_2003` — but this value has been deprecated. (No, I am not kidding.) So calling the function without the parameter will raise a deprecation warning. The official bug report can be seen here: <https://bugs.php.net/bug.php?id=75609>.\r\n\r\n**If PHP's default error reporting is set to `E_ALL`**, this PHP bug will cause the deprecation warning to be thrown on every page:\r\n\r\n\tDeprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /var/www/foo/symphony/lib/boot/defines.php on line 218\r\n\r\nWhy? Symphony sets its own (more forgiving/suppressing) error reporting too late. If you look at `index.php`, you see:\r\n\r\n```php\r\n// Include autoloader:\r\nrequire_once DOCROOT . '/vendor/autoload.php';\r\n\r\n// Include the boot script:\r\nrequire_once DOCROOT . '/symphony/lib/boot/bundle.php';\r\n```\r\n\r\nCurrently Symphony sets the error reporting in `bundle.php`. But the autoloader will load `defines.php` before! In this file (line 218) you will see:\r\n\r\n```php\r\ndefine_safe('HTTP_HOST', function_exists('idn_to_utf8') ? idn_to_utf8($http_host) : $http_host);\r\n```\r\n\r\nThere are two possible (simple) fixes for this:\r\n\r\n1. Move the line that defines Symphony's default error reporting from `bundle.php` to `index.php` (before the autoloader). This would mean that Symphony's error handling is applied to **everything** that \"happens\" in the autoloaded files.\r\n2. Fix **only the line** that causes the issue, by calling the function like so: `idn_to_utf8($http_host, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46)`.\r\n\r\n@nitriques: I am open to both solutions, and I can send a PR if you tell me which route to take.\r\n"},"comment":{"url":"https://api.github.com/repos/symphonycms/symphony-2/issues/comments/422351505","html_url":"https://github.com/symphonycms/symphony-2/issues/2864#issuecomment-422351505","issue_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2864","id":422351505,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjM1MTUwNQ==","user":{"login":"michael-e","id":40072,"node_id":"MDQ6VXNlcjQwMDcy","avatar_url":"https://avatars2.githubusercontent.com/u/40072?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-e","html_url":"https://github.com/michael-e","followers_url":"https://api.github.com/users/michael-e/followers","following_url":"https://api.github.com/users/michael-e/following{/other_user}","gists_url":"https://api.github.com/users/michael-e/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-e/subscriptions","organizations_url":"https://api.github.com/users/michael-e/orgs","repos_url":"https://api.github.com/users/michael-e/repos","events_url":"https://api.github.com/users/michael-e/events{/privacy}","received_events_url":"https://api.github.com/users/michael-e/received_events","type":"User","site_admin":false},"created_at":"2018-09-18T11:06:46Z","updated_at":"2018-09-18T11:06:46Z","author_association":"MEMBER","body":"I agree with most of your comment. However, we simply don't have the manpower to fix every warning in Symphony 2.7 LTS. (I have started to work on it, but still I have not come very far. I would be glad if some more experienced programmer would take care of it. We even invented a configuration setting called `error_reporting_all` which simplifies finding warnings that are suppressed otherwise.)\r\n\r\n> If someone uses a dead or old PHP version, they can hide those deprecation warnings themselves.\r\n\r\nBut: The deprecation warning happens in PHP 7.2.\r\n\r\n> Why is a deprecation warning a breaking change?\r\n\r\nIt is not. Our **attempt to fix it** is a breaking change, because we must use `INTL_IDNA_VARIANT_UTS46` if possible."}}
{"actor":{"display_login":"michael-e"}}