{"action":"opened","number":940,"pull_request":{"url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/940","id":232787279,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNzg3Mjc5","html_url":"https://github.com/RSS-Bridge/rss-bridge/pull/940","diff_url":"https://github.com/RSS-Bridge/rss-bridge/pull/940.diff","patch_url":"https://github.com/RSS-Bridge/rss-bridge/pull/940.patch","issue_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/940","number":940,"state":"open","locked":false,"title":"Add Feeditem class to replace the item array","user":{"login":"LogMANOriginal","id":5776685,"node_id":"MDQ6VXNlcjU3NzY2ODU=","avatar_url":"https://avatars1.githubusercontent.com/u/5776685?v=4","gravatar_id":"","url":"https://api.github.com/users/LogMANOriginal","html_url":"https://github.com/LogMANOriginal","followers_url":"https://api.github.com/users/LogMANOriginal/followers","following_url":"https://api.github.com/users/LogMANOriginal/following{/other_user}","gists_url":"https://api.github.com/users/LogMANOriginal/gists{/gist_id}","starred_url":"https://api.github.com/users/LogMANOriginal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogMANOriginal/subscriptions","organizations_url":"https://api.github.com/users/LogMANOriginal/orgs","repos_url":"https://api.github.com/users/LogMANOriginal/repos","events_url":"https://api.github.com/users/LogMANOriginal/events{/privacy}","received_events_url":"https://api.github.com/users/LogMANOriginal/received_events","type":"User","site_admin":false},"body":"This PR adds a new class `FeedItem` to replace the current `item` array generated by the bridges. It is intended to perform sanity checks during bridge execution rather than attempting to format arbitrary contents (i.e. detecting invalid URIs and broken timestamps early).\r\n\r\n* See `lib/FeedItem.php` for implementation details (documented in the source code)\r\n* See `tests/FeedItemTest.php` for test cases (in case code breaks in the future)\r\n* See any bridge for recommended changes (not required, because `index.php` still handles legacy arrays)\r\n\r\n**Remarks**: \r\n- `index.php` currently supports `FeedItem` and legacy items. Updating bridges is not a requirement, but it is part of this PR right now.\r\n- This PR updates all bridges to make use of the `$item->parameter` syntax (i.e. `$item->title` instead of `$item['title']`).\r\n- `FeedItem` supports two methods for accessing parameters:\r\n  - `$item->setParameter(...)`, for example `$item->setTitle($title)` and\r\n  - `$item->parameter = ...`, for example `$item->title = $title`, at the cost of performance according to https://stackoverflow.com/a/3330859 (though I think it can be neglected because downloading and caching is the real bottleneck)\r\n- This PR might break some bridges which have send invalid data in the first place (for example because the item URI (`$item['uri']`) is relative instead of absolute (which it should be).\r\n\r\nLet me know if there is any problem with this approach.\r\nAre there any arguments against updating all bridges?","created_at":"2018-11-21T20:16:01Z","updated_at":"2018-11-21T20:16:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":50990663,"node_id":"MDU6TGFiZWw1MDk5MDY2Mw==","url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/labels/improvement%20/%20refactoring","name":"improvement / refactoring","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/940/commits","review_comments_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/940/comments","review_comment_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/940/comments","statuses_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/statuses/4e17a544c0806e15fcac5ec47ca01c35bda2dbe0","head":{"label":"LogMANOriginal:FeedItem","ref":"FeedItem","sha":"4e17a544c0806e15fcac5ec47ca01c35bda2dbe0","user":{"login":"LogMANOriginal","id":5776685,"node_id":"MDQ6VXNlcjU3NzY2ODU=","avatar_url":"https://avatars1.githubusercontent.com/u/5776685?v=4","gravatar_id":"","url":"https://api.github.com/users/LogMANOriginal","html_url":"https://github.com/LogMANOriginal","followers_url":"https://api.github.com/users/LogMANOriginal/followers","following_url":"https://api.github.com/users/LogMANOriginal/following{/other_user}","gists_url":"https://api.github.com/users/LogMANOriginal/gists{/gist_id}","starred_url":"https://api.github.com/users/LogMANOriginal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogMANOriginal/subscriptions","organizations_url":"https://api.github.com/users/LogMANOriginal/orgs","repos_url":"https://api.github.com/users/LogMANOriginal/repos","events_url":"https://api.github.com/users/LogMANOriginal/events{/privacy}","received_events_url":"https://api.github.com/users/LogMANOriginal/received_events","type":"User","site_admin":false},"repo":{"id":39070357,"node_id":"MDEwOlJlcG9zaXRvcnkzOTA3MDM1Nw==","name":"rss-bridge","full_name":"LogMANOriginal/rss-bridge","private":false,"owner":{"login":"LogMANOriginal","id":5776685,"node_id":"MDQ6VXNlcjU3NzY2ODU=","avatar_url":"https://avatars1.githubusercontent.com/u/5776685?v=4","gravatar_id":"","url":"https://api.github.com/users/LogMANOriginal","html_url":"https://github.com/LogMANOriginal","followers_url":"https://api.github.com/users/LogMANOriginal/followers","following_url":"https://api.github.com/users/LogMANOriginal/following{/other_user}","gists_url":"https://api.github.com/users/LogMANOriginal/gists{/gist_id}","starred_url":"https://api.github.com/users/LogMANOriginal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogMANOriginal/subscriptions","organizations_url":"https://api.github.com/users/LogMANOriginal/orgs","repos_url":"https://api.github.com/users/LogMANOriginal/repos","events_url":"https://api.github.com/users/LogMANOriginal/events{/privacy}","received_events_url":"https://api.github.com/users/LogMANOriginal/received_events","type":"User","site_admin":false},"html_url":"https://github.com/LogMANOriginal/rss-bridge","description":"The RSS feed for websites missing it","fork":true,"url":"https://api.github.com/repos/LogMANOriginal/rss-bridge","forks_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/forks","keys_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/teams","hooks_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/hooks","issue_events_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/issues/events{/number}","events_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/events","assignees_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/assignees{/user}","branches_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/branches{/branch}","tags_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/tags","blobs_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/statuses/{sha}","languages_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/languages","stargazers_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/stargazers","contributors_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/contributors","subscribers_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/subscribers","subscription_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/subscription","commits_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/contents/{+path}","compare_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/merges","archive_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/downloads","issues_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/issues{/number}","pulls_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/pulls{/number}","milestones_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/milestones{/number}","notifications_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/labels{/name}","releases_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/releases{/id}","deployments_url":"https://api.github.com/repos/LogMANOriginal/rss-bridge/deployments","created_at":"2015-07-14T11:13:59Z","updated_at":"2018-08-01T17:45:56Z","pushed_at":"2018-11-21T19:55:49Z","git_url":"git://github.com/LogMANOriginal/rss-bridge.git","ssh_url":"git@github.com:LogMANOriginal/rss-bridge.git","clone_url":"https://github.com/LogMANOriginal/rss-bridge.git","svn_url":"https://github.com/LogMANOriginal/rss-bridge","homepage":null,"size":2396,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"feature"}},"base":{"label":"RSS-Bridge:master","ref":"master","sha":"b4dbd191d00c85b3b9f4b9a4a27fc43f32c84655","user":{"login":"RSS-Bridge","id":20958263,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTU4MjYz","avatar_url":"https://avatars3.githubusercontent.com/u/20958263?v=4","gravatar_id":"","url":"https://api.github.com/users/RSS-Bridge","html_url":"https://github.com/RSS-Bridge","followers_url":"https://api.github.com/users/RSS-Bridge/followers","following_url":"https://api.github.com/users/RSS-Bridge/following{/other_user}","gists_url":"https://api.github.com/users/RSS-Bridge/gists{/gist_id}","starred_url":"https://api.github.com/users/RSS-Bridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RSS-Bridge/subscriptions","organizations_url":"https://api.github.com/users/RSS-Bridge/orgs","repos_url":"https://api.github.com/users/RSS-Bridge/repos","events_url":"https://api.github.com/users/RSS-Bridge/events{/privacy}","received_events_url":"https://api.github.com/users/RSS-Bridge/received_events","type":"Organization","site_admin":false},"repo":{"id":11935508,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkzNTUwOA==","name":"rss-bridge","full_name":"RSS-Bridge/rss-bridge","private":false,"owner":{"login":"RSS-Bridge","id":20958263,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTU4MjYz","avatar_url":"https://avatars3.githubusercontent.com/u/20958263?v=4","gravatar_id":"","url":"https://api.github.com/users/RSS-Bridge","html_url":"https://github.com/RSS-Bridge","followers_url":"https://api.github.com/users/RSS-Bridge/followers","following_url":"https://api.github.com/users/RSS-Bridge/following{/other_user}","gists_url":"https://api.github.com/users/RSS-Bridge/gists{/gist_id}","starred_url":"https://api.github.com/users/RSS-Bridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RSS-Bridge/subscriptions","organizations_url":"https://api.github.com/users/RSS-Bridge/orgs","repos_url":"https://api.github.com/users/RSS-Bridge/repos","events_url":"https://api.github.com/users/RSS-Bridge/events{/privacy}","received_events_url":"https://api.github.com/users/RSS-Bridge/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/RSS-Bridge/rss-bridge","description":"The RSS feed for websites missing it","fork":false,"url":"https://api.github.com/repos/RSS-Bridge/rss-bridge","forks_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/forks","keys_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/teams","hooks_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/hooks","issue_events_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/events{/number}","events_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/events","assignees_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/assignees{/user}","branches_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/branches{/branch}","tags_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/tags","blobs_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/statuses/{sha}","languages_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/languages","stargazers_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/stargazers","contributors_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/contributors","subscribers_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/subscribers","subscription_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/subscription","commits_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/contents/{+path}","compare_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/merges","archive_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/downloads","issues_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues{/number}","pulls_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls{/number}","milestones_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/milestones{/number}","notifications_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/labels{/name}","releases_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/releases{/id}","deployments_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/deployments","created_at":"2013-08-06T21:55:13Z","updated_at":"2018-11-20T20:53:43Z","pushed_at":"2018-11-21T16:53:40Z","git_url":"git://github.com/RSS-Bridge/rss-bridge.git","ssh_url":"git@github.com:RSS-Bridge/rss-bridge.git","clone_url":"https://github.com/RSS-Bridge/rss-bridge.git","svn_url":"https://github.com/RSS-Bridge/rss-bridge","homepage":null,"size":2383,"stargazers_count":1293,"watchers_count":1293,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":227,"mirror_url":null,"archived":false,"open_issues_count":76,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":227,"open_issues":76,"watchers":1293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/940"},"html":{"href":"https://github.com/RSS-Bridge/rss-bridge/pull/940"},"issue":{"href":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/940"},"comments":{"href":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/940/comments"},"review_comments":{"href":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/940/comments"},"review_comment":{"href":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RSS-Bridge/rss-bridge/pulls/940/commits"},"statuses":{"href":"https://api.github.com/repos/RSS-Bridge/rss-bridge/statuses/4e17a544c0806e15fcac5ec47ca01c35bda2dbe0"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":8,"additions":2061,"deletions":1285,"changed_files":173}}
{"actor":{"display_login":"LogMANOriginal"}}