{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/14056","labels_url":"https://api.github.com/repos/owncloud/core/issues/14056/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/14056/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/14056/events","html_url":"https://github.com/owncloud/core/pull/14056","id":57181676,"number":14056,"title":"Refactor OC_Request into TrustedDomainHelper and IRequest","user":{"login":"LukasReschke","id":878997,"avatar_url":"https://avatars.githubusercontent.com/u/878997?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasReschke","html_url":"https://github.com/LukasReschke","followers_url":"https://api.github.com/users/LukasReschke/followers","following_url":"https://api.github.com/users/LukasReschke/following{/other_user}","gists_url":"https://api.github.com/users/LukasReschke/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasReschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasReschke/subscriptions","organizations_url":"https://api.github.com/users/LukasReschke/orgs","repos_url":"https://api.github.com/users/LukasReschke/repos","events_url":"https://api.github.com/users/LukasReschke/events{/privacy}","received_events_url":"https://api.github.com/users/LukasReschke/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/5%20-%20To%20review","name":"5 - To review","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/technical%20debt","name":"technical debt","color":"FFFF00"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/31","labels_url":"https://api.github.com/repos/owncloud/core/milestones/31/labels","id":912160,"number":31,"title":"8.1-next","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":364,"closed_issues":78,"state":"open","created_at":"2014-12-22T12:04:01Z","updated_at":"2015-02-16T10:32:17Z","due_on":"2015-04-02T22:00:00Z","closed_at":null},"comments":8,"created_at":"2015-02-10T14:32:20Z","updated_at":"2015-02-16T11:54:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/14056","html_url":"https://github.com/owncloud/core/pull/14056","diff_url":"https://github.com/owncloud/core/pull/14056.diff","patch_url":"https://github.com/owncloud/core/pull/14056.patch"},"body":"This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed.\r\n\r\nThis changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions.\r\n\r\nUnfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though.\r\n\r\nFixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969\r\n\r\n(let's hope the tests pass on Jenkins as well – can't run the full test suite locally but for the changes parts they worked just fine – will take a look once CI passed)\r\n\r\n@DeepDiver1975 As requested by you.\r\n@th3fallen @nickvergessen @MorrisJobke @PVince81 Huge PR. Would be cool if you have some time to review this and test carefully.\r\n\r\nFixes itself."},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/74497933","html_url":"https://github.com/owncloud/core/pull/14056#issuecomment-74497933","issue_url":"https://api.github.com/repos/owncloud/core/issues/14056","id":74497933,"user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T11:54:19Z","updated_at":"2015-02-16T11:54:19Z","body":"In general this PR looks good.\r\nI still think we should replace `->server['ABC']` with a real method `->getServerVar('ABC')` to make them mockable. This might be the best opportunity to introduce it now."}}