{"action":"created","issue":{"url":"https://api.github.com/repos/fisharebest/webtrees/issues/425","labels_url":"https://api.github.com/repos/fisharebest/webtrees/issues/425/labels{/name}","comments_url":"https://api.github.com/repos/fisharebest/webtrees/issues/425/comments","events_url":"https://api.github.com/repos/fisharebest/webtrees/issues/425/events","html_url":"https://github.com/fisharebest/webtrees/pull/425","id":56603346,"number":425,"title":"Moved global var $WT_SESSION as public static to Globals class","user":{"login":"WorkingDevel","id":774381,"avatar_url":"https://avatars.githubusercontent.com/u/774381?v=3","gravatar_id":"","url":"https://api.github.com/users/WorkingDevel","html_url":"https://github.com/WorkingDevel","followers_url":"https://api.github.com/users/WorkingDevel/followers","following_url":"https://api.github.com/users/WorkingDevel/following{/other_user}","gists_url":"https://api.github.com/users/WorkingDevel/gists{/gist_id}","starred_url":"https://api.github.com/users/WorkingDevel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorkingDevel/subscriptions","organizations_url":"https://api.github.com/users/WorkingDevel/orgs","repos_url":"https://api.github.com/users/WorkingDevel/repos","events_url":"https://api.github.com/users/WorkingDevel/events{/privacy}","received_events_url":"https://api.github.com/users/WorkingDevel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-04T23:19:14Z","updated_at":"2015-05-09T16:53:20Z","closed_at":"2015-05-09T16:53:20Z","pull_request":{"url":"https://api.github.com/repos/fisharebest/webtrees/pulls/425","html_url":"https://github.com/fisharebest/webtrees/pull/425","diff_url":"https://github.com/fisharebest/webtrees/pull/425.diff","patch_url":"https://github.com/fisharebest/webtrees/pull/425.patch"},"body":"To get rid off global variables it is maybe as a first step to move the global variables to a class as public static class variable.\r\nAdvantage:\r\n* no 'global' declaration in functions needed (less chance to forget)\r\n* easier to locate via search\r\n* PhpStorm can give code completion and propose globals on class\r\nDisadvantage:\r\n* more to write `Globals::$WT_SESSION` instead of `$WT_SESSION`.\r\n\r\nI did it just for the `$WT_SESSION` the other could follow if proposal is accepted.\r\n\r\n@fisharebest What do you think?"},"comment":{"url":"https://api.github.com/repos/fisharebest/webtrees/issues/comments/100516552","html_url":"https://github.com/fisharebest/webtrees/pull/425#issuecomment-100516552","issue_url":"https://api.github.com/repos/fisharebest/webtrees/issues/425","id":100516552,"user":{"login":"fisharebest","id":2306088,"avatar_url":"https://avatars.githubusercontent.com/u/2306088?v=3","gravatar_id":"","url":"https://api.github.com/users/fisharebest","html_url":"https://github.com/fisharebest","followers_url":"https://api.github.com/users/fisharebest/followers","following_url":"https://api.github.com/users/fisharebest/following{/other_user}","gists_url":"https://api.github.com/users/fisharebest/gists{/gist_id}","starred_url":"https://api.github.com/users/fisharebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fisharebest/subscriptions","organizations_url":"https://api.github.com/users/fisharebest/orgs","repos_url":"https://api.github.com/users/fisharebest/repos","events_url":"https://api.github.com/users/fisharebest/events{/privacy}","received_events_url":"https://api.github.com/users/fisharebest/received_events","type":"User","site_admin":false},"created_at":"2015-05-09T16:53:20Z","updated_at":"2015-05-09T16:53:20Z","body":"The session handler/global has been replaced by a class (which has the same interface as the laravel session handler)."}}