summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2019-02-28 07:35:41 +0100
committerGitHub <noreply@github.com>2019-02-28 07:35:41 +0100
commit249352c9d3d1f22f1f06d0c46c842984d7910d30 (patch)
tree11a7e72337010ed79b3440edee3ec41e31916b37
parent89d9b77994d564f4ef29db7cc7191c5cd87b8705 (diff)
parent7c17b2c24b1131ace6b464723978841566714f54 (diff)
Merge pull request #282 from SMillerDev/switch_feedIO
Switch to feed-io for parsing
-rw-r--r--Makefile4
-rw-r--r--composer.json15
-rw-r--r--composer.lock336
-rw-r--r--js/package-lock.json1238
-rw-r--r--js/package.json18
-rw-r--r--lib/AppInfo/Application.php113
-rw-r--r--lib/Config/Config.php4
-rw-r--r--lib/Config/FetcherConfig.php118
-rw-r--r--lib/Config/LegacyGuzzleClient.php65
-rw-r--r--lib/Config/LegacyGuzzleResponse.php86
-rw-r--r--lib/Db/Item.php14
-rwxr-xr-x[-rw-r--r--]lib/Fetcher/FeedFetcher.php414
-rw-r--r--lib/Fetcher/Fetcher.php45
-rw-r--r--lib/Fetcher/IFeedFetcher.php27
-rw-r--r--lib/Fetcher/YoutubeFetcher.php35
-rw-r--r--lib/PostProcessor/LWNProcessor.php117
-rw-r--r--lib/Service/FeedService.php69
-rw-r--r--lib/Utility/PicoFeedClientFactory.php42
-rw-r--r--lib/Utility/PicoFeedFaviconFactory.php40
-rw-r--r--lib/Utility/PsrLogger.php97
-rw-r--r--package-lock.json3
-rw-r--r--tests/Unit/Config/ConfigTest.php2
-rw-r--r--tests/Unit/Fetcher/FeedFetcherTest.php655
-rw-r--r--tests/Unit/Fetcher/FetcherTest.php2
-rw-r--r--tests/Unit/Fetcher/YoutubeFetcherTest.php19
-rw-r--r--tests/Unit/Service/FeedServiceTest.php11
26 files changed, 1674 insertions, 1915 deletions
diff --git a/Makefile b/Makefile
index d716d09da..e9aa3c1e2 100644
--- a/Makefile
+++ b/Makefile
@@ -41,10 +41,10 @@
app_name:=$(notdir $(CURDIR))
build_tools_directory:=$(CURDIR)/build/tools
-source_build_directory:=$(CURDIR)/build/source/news
+source_build_directory:=$(CURDIR)/build/source/$(app_name)
source_artifact_directory:=$(CURDIR)/build/artifacts/source
source_package_name:=$(source_artifact_directory)/$(app_name)
-appstore_build_directory:=$(CURDIR)/build/appstore/news
+appstore_build_directory:=$(CURDIR)/build/appstore/$(app_name)
appstore_artifact_directory:=$(CURDIR)/build/artifacts/appstore
appstore_package_name:=$(appstore_artifact_directory)/$(app_name)
npm:=$(shell which npm 2> /dev/null)
diff --git a/composer.json b/composer.json
index 4a03b86a2..de3b7a028 100644
--- a/composer.json
+++ b/composer.json
@@ -11,6 +11,12 @@
"role": "Developer"
},
{
+ "name": "Sean Molenaar",
+ "email": "sean@seanmolenaar.eu",
+ "homepage": "https://seanmolenaar.eu",
+ "role": "Developer"
+ },
+ {
"name": "Alessandro Cosentino",
"homepage": "http://algorithmsforthekitchen.com/",
"email": "cosenal@gmail.com",
@@ -33,11 +39,16 @@
"ezyang/htmlpurifier": "4.10.0",
"pear/net_url2": "2.2.2",
"riimu/kit-pathjoin": "1.2.0",
- "nicolus/picofeed": "0.1.35"
+ "debril/feed-io": "^3.0",
+ "arthurhoaro/favicon": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
- "squizlabs/php_codesniffer": "^3.3"
+ "squizlabs/php_codesniffer": "^3.3",
+ "guzzlehttp/guzzle": "~6.3"
+ },
+ "replace": {
+ "guzzlehttp/guzzle": "*"
},
"autoload": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
index 2c814bcd0..4a69f83c6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,93 +4,93 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f4a0d96b7e83ec4d9d232412b9e61566",
+ "content-hash": "1630b553e70e8245b11922394d4d9f59",
"packages": [
{
- "name": "ezyang/htmlpurifier",
- "version": "v4.10.0",
+ "name": "arthurhoaro/favicon",
+ "version": "v1.2.2",
"source": {
"type": "git",
- "url": "https://github.com/ezyang/htmlpurifier.git",
- "reference": "d85d39da4576a6934b72480be6978fb10c860021"
+ "url": "https://github.com/ArthurHoaro/favicon.git",
+ "reference": "50fd2a0f984db13948a69ab120451e03e41979fa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021",
- "reference": "d85d39da4576a6934b72480be6978fb10c860021",
+ "url": "https://api.github.com/repos/ArthurHoaro/favicon/zipball/50fd2a0f984db13948a69ab120451e03e41979fa",
+ "reference": "50fd2a0f984db13948a69ab120451e03e41979fa",
"shasum": ""
},
"require": {
- "php": ">=5.2"
+ "php": ">=5.3.3"
},
"require-dev": {
- "simpletest/simpletest": "^1.1"
+ "phpunit/phpunit": "~4.8",
+ "weew/helpers-filesystem": "~1.0"
},
"type": "library",
"autoload": {
- "psr-0": {
- "HTMLPurifier": "library/"
- },
- "files": [
- "library/HTMLPurifier.composer.php"
- ]
+ "psr-4": {
+ "Favicon\\": "src/Favicon/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "LGPL"
+ "Apache-2.0"
],
"authors": [
{
- "name": "Edward Z. Yang",
- "email": "admin@htmlpurifier.org",
- "homepage": "http://ezyang.com"
+ "name": "Chris Shiflett",
+ "homepage": "http://shiflett.org/"
+ },
+ {
+ "name": "Arthur Hoaro",
+ "homepage": "http://hoa.ro"
}
],
- "description": "Standards compliant HTML filter written in PHP",
- "homepage": "http://htmlpurifier.org/",
+ "description": "PHP Library used to discover favicon from given URL",
+ "homepage": "https://github.com/ArthurHoaro/favicon",
"keywords": [
- "html"
+ "favicon",
+ "finder",
+ "icon"
],
- "time": "2018-02-23T01:58:20+00:00"
+ "time": "2018-09-08T09:37:54+00:00"
},
{
- "name": "nicolus/picofeed",
- "version": "v0.1.35",
+ "name": "debril/feed-io",
+ "version": "v3.1.1",
"source": {
"type": "git",
- "url": "https://github.com/nicolus/picoFeed.git",
- "reference": "3a27b47de31eedec075c719f961783c5db7a7b08"
+ "url": "https://github.com/alexdebril/feed-io.git",
+ "reference": "a79a09a915540b5475b12c82effb3dd43c2b2a0b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nicolus/picoFeed/zipball/3a27b47de31eedec075c719f961783c5db7a7b08",
- "reference": "3a27b47de31eedec075c719f961783c5db7a7b08",
+ "url": "https://api.github.com/repos/alexdebril/feed-io/zipball/a79a09a915540b5475b12c82effb3dd43c2b2a0b",
+ "reference": "a79a09a915540b5475b12c82effb3dd43c2b2a0b",
"shasum": ""
},
"require": {
- "ext-dom": "*",
- "ext-iconv": "*",
- "ext-libxml": "*",
- "ext-simplexml": "*",
- "ext-xml": "*",
- "php": ">=5.3.0",
- "zendframework/zendxml": "^1.0"
+ "guzzlehttp/guzzle": "~6.2",
+ "php": ">=5.6.0",
+ "psr/log": "~1.0"
},
"require-dev": {
- "phpdocumentor/reflection-docblock": "2.0.4",
- "phpunit/phpunit": "4.8.26",
- "symfony/yaml": "2.8.7"
+ "friendsofphp/php-cs-fixer": "^2.4",
+ "monolog/monolog": "1.*",
+ "phpunit/phpunit": "~5.6.0"
},
"suggest": {
- "ext-curl": "PicoFeed will use cURL if present"
+ "monolog/monolog": "Allows to handle logs",
+ "symfony/console": "Allows to use the command line interface"
},
"bin": [
- "picofeed"
+ "bin/feedio"
],
"type": "library",
"autoload": {
- "psr-0": {
- "PicoFeed": "lib/"
+ "psr-4": {
+ "FeedIo\\": "src/FeedIo"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -99,12 +99,69 @@
],
"authors": [
{
- "name": "Frédéric Guillot"
+ "name": "Alexandre Debril",
+ "email": "alex.debril@gmail.com"
}
],
- "description": "Modern library to handle RSS/Atom feeds",
- "homepage": "https://github.com/miniflux/picoFeed",
- "time": "2017-06-20T22:54:47+00:00"
+ "description": "PHP library built to consume and serve JSONFeed / RSS / Atom feeds",
+ "homepage": "https://feed-io.net",
+ "keywords": [
+ "atom",
+ "cli",
+ "client",
+ "feed",
+ "jsonfeed",
+ "news",
+ "rss"
+ ],
+ "time": "2018-06-18T12:31:47+00:00"
+ },
+ {
+ "name": "ezyang/htmlpurifier",
+ "version": "v4.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ezyang/htmlpurifier.git",
+ "reference": "d85d39da4576a6934b72480be6978fb10c860021"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021",
+ "reference": "d85d39da4576a6934b72480be6978fb10c860021",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2"
+ },
+ "require-dev": {
+ "simpletest/simpletest": "^1.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "HTMLPurifier": "library/"
+ },
+ "files": [
+ "library/HTMLPurifier.composer.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL"
+ ],
+ "authors": [
+ {
+ "name": "Edward Z. Yang",
+ "email": "admin@htmlpurifier.org",
+ "homepage": "http://ezyang.com"
+ }
+ ],
+ "description": "Standards compliant HTML filter written in PHP",
+ "homepage": "http://htmlpurifier.org/",
+ "keywords": [
+ "html"
+ ],
+ "time": "2018-02-23T01:58:20+00:00"
},
{
"name": "pear/net_url2",
@@ -171,6 +228,53 @@
"time": "2017-08-25T06:16:11+00:00"
},
{
+ "name": "psr/log",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2018-11-20T15:27:04+00:00"
+ },
+ {
"name": "riimu/kit-pathjoin",
"version": "v1.2.0",
"source": {
@@ -219,52 +323,6 @@
"system"
],
"time": "2017-07-09T14:41:04+00:00"
- },
- {
- "name": "zendframework/zendxml",
- "version": "1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/zendframework/ZendXml.git",
- "reference": "267db6a2c431a08a8f8ff0f1f4c302a5ba6f5b99"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/zendframework/ZendXml/zipball/267db6a2c431a08a8f8ff0f1f4c302a5ba6f5b99",
- "reference": "267db6a2c431a08a8f8ff0f1f4c302a5ba6f5b99",
- "shasum": ""
- },
- "require": {
- "php": "^5.6 || ^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4",
- "zendframework/zend-coding-standard": "~1.0.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev",
- "dev-develop": "1.2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "ZendXml\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "description": "Utility library for XML usage, best practices, and security in PHP",
- "keywords": [
- "ZendFramework",
- "security",
- "xml",
- "zf"
- ],
- "time": "2018-04-30T15:11:04+00:00"
}
],
"packages-dev": [
@@ -938,16 +996,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "6.5.13",
+ "version": "6.5.14",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "0973426fb012359b2f18d3bd1e90ef1172839693"
+ "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693",
- "reference": "0973426fb012359b2f18d3bd1e90ef1172839693",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7",
+ "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7",
"shasum": ""
},
"require": {
@@ -1018,7 +1076,7 @@
"testing",
"xunit"
],
- "time": "2018-09-08T15:10:43+00:00"
+ "time": "2019-02-01T05:22:47+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -1077,6 +1135,7 @@
"mock",
"xunit"
],
+ "abandoned": true,
"time": "2018-08-09T05:50:03+00:00"
},
{
@@ -1640,16 +1699,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.3.2",
+ "version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e"
+ "reference": "379deb987e26c7cd103a7b387aea178baec96e48"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e",
- "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48",
+ "reference": "379deb987e26c7cd103a7b387aea178baec96e48",
"shasum": ""
},
"require": {
@@ -1687,7 +1746,65 @@
"phpcs",
"standards"
],
- "time": "2018-09-23T23:08:17+00:00"
+ "time": "2018-12-19T23:57:18+00:00"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.9-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ },
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "time": "2018-08-06T14:22:27+00:00"
},
{
"name": "theseer/tokenizer",
@@ -1731,20 +1848,21 @@
},
{
"name": "webmozart/assert",
- "version": "1.3.0",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "0df1908962e7a3071564e857d86874dad1ef204a"
+ "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
- "reference": "0df1908962e7a3071564e857d86874dad1ef204a",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
+ "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": "^5.3.3 || ^7.0",
+ "symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
@@ -1777,7 +1895,7 @@
"check",
"validate"
],
- "time": "2018-01-29T19:49:41+00:00"
+ "time": "2018-12-25T11:19:39+00:00"
}
],
"aliases": [],
diff --git a/js/package-lock.json b/js/package-lock.json
index 97204fc9b..fbd8adc6c 100644
--- a/js/package-lock.json
+++ b/js/package-lock.json
@@ -41,19 +41,6 @@
"integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=",
"dev": true