From 1c6d132324fc8e9cb0ea81d5fc3b0237a00f16b8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 9 Jan 2017 18:20:34 -0500 Subject: [PATCH] Update to PicoFeed v0.1.29 --- composer.json | 2 +- composer.lock | 14 +-- vendor/composer/installed.json | 110 +++++++++--------- .../fguillot/picofeed/lib/PicoFeed/Base.php | 4 + .../picofeed/lib/PicoFeed/Client/Curl.php | 13 ++- .../picofeed/lib/PicoFeed/Parser/Parser.php | 1 + .../PicoFeed/Processor/ItemPostProcessor.php | 10 ++ 7 files changed, 88 insertions(+), 66 deletions(-) diff --git a/composer.json b/composer.json index 1e55ba2..da2e610 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "fguillot/simple-validator": "v1.0.0", "fguillot/json-rpc": "v1.2.3", "fguillot/picodb": "v1.0.14 ", - "fguillot/picofeed": "v0.1.28", + "fguillot/picofeed": "v0.1.29", "pda/pheanstalk": "v3.1.0", "ircmaxell/password-compat": "^1.0.4" }, diff --git a/composer.lock b/composer.lock index 076a3f4..9eb467c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "204c4faa66655c7453c47a6e0f754286", - "content-hash": "9a6bca283efab41057f6a3c13cfacbef", + "hash": "a1111f43530dee7323d23b4fe76637b0", + "content-hash": "957098eb24a77f8299716d34353d0fc8", "packages": [ { "name": "fguillot/json-rpc", @@ -88,16 +88,16 @@ }, { "name": "fguillot/picofeed", - "version": "v0.1.28", + "version": "v0.1.29", "source": { "type": "git", "url": "https://github.com/fguillot/picoFeed.git", - "reference": "9da506c308bcb40b6fc630f9123466028c03170b" + "reference": "03a0a603173f5d5916d54fd6b8191a3981f949e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/9da506c308bcb40b6fc630f9123466028c03170b", - "reference": "9da506c308bcb40b6fc630f9123466028c03170b", + "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/03a0a603173f5d5916d54fd6b8191a3981f949e7", + "reference": "03a0a603173f5d5916d54fd6b8191a3981f949e7", "shasum": "" }, "require": { @@ -137,7 +137,7 @@ ], "description": "Modern library to handle RSS/Atom feeds", "homepage": "https://github.com/fguillot/picoFeed", - "time": "2016-12-29 00:06:41" + "time": "2017-01-09 23:10:47" }, { "name": "fguillot/simple-validator", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0420f03..53d10fd 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -167,61 +167,6 @@ "zf2" ] }, - { - "name": "fguillot/picofeed", - "version": "v0.1.28", - "version_normalized": "0.1.28.0", - "source": { - "type": "git", - "url": "https://github.com/fguillot/picoFeed.git", - "reference": "9da506c308bcb40b6fc630f9123466028c03170b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/9da506c308bcb40b6fc630f9123466028c03170b", - "reference": "9da506c308bcb40b6fc630f9123466028c03170b", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-iconv": "*", - "ext-libxml": "*", - "ext-simplexml": "*", - "ext-xml": "*", - "php": ">=5.3.0", - "zendframework/zendxml": "^1.0" - }, - "require-dev": { - "phpdocumentor/reflection-docblock": "2.0.4", - "phpunit/phpunit": "4.8.26", - "symfony/yaml": "2.8.7" - }, - "suggest": { - "ext-curl": "PicoFeed will use cURL if present" - }, - "time": "2016-12-29 00:06:41", - "bin": [ - "picofeed" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "PicoFeed": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frédéric Guillot" - } - ], - "description": "Modern library to handle RSS/Atom feeds", - "homepage": "https://github.com/fguillot/picoFeed" - }, { "name": "pda/pheanstalk", "version": "v3.1.0", @@ -317,5 +262,60 @@ "hashing", "password" ] + }, + { + "name": "fguillot/picofeed", + "version": "v0.1.29", + "version_normalized": "0.1.29.0", + "source": { + "type": "git", + "url": "https://github.com/fguillot/picoFeed.git", + "reference": "03a0a603173f5d5916d54fd6b8191a3981f949e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/03a0a603173f5d5916d54fd6b8191a3981f949e7", + "reference": "03a0a603173f5d5916d54fd6b8191a3981f949e7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "php": ">=5.3.0", + "zendframework/zendxml": "^1.0" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "2.0.4", + "phpunit/phpunit": "4.8.26", + "symfony/yaml": "2.8.7" + }, + "suggest": { + "ext-curl": "PicoFeed will use cURL if present" + }, + "time": "2017-01-09 23:10:47", + "bin": [ + "picofeed" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "PicoFeed": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frédéric Guillot" + } + ], + "description": "Modern library to handle RSS/Atom feeds", + "homepage": "https://github.com/fguillot/picoFeed" } ] diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Base.php b/vendor/fguillot/picofeed/lib/PicoFeed/Base.php index 4be0985..41a6f8f 100644 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Base.php +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Base.php @@ -31,4 +31,8 @@ abstract class Base $this->config = $config ?: new Config(); Logger::setTimezone($this->config->getTimezone()); } + + public function setConfig(Config $config) { + $this->config = $config; + } } diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Client/Curl.php b/vendor/fguillot/picofeed/lib/PicoFeed/Client/Curl.php index 09957ff..e704b25 100644 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Client/Curl.php +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Client/Curl.php @@ -110,7 +110,10 @@ class Curl extends Client return $this->handleRedirection($headers['Location']); } - header(':', true, $status); + // Do not work with PHP-FPM + if (substr(PHP_SAPI, 0, 3) !== 'cgi') { + header(':', true, $status); + } if (isset($headers['Content-Type'])) { header('Content-Type:' .$headers['Content-Type']); @@ -354,6 +357,11 @@ class Curl extends Client * @see http://curl.haxx.se/libcurl/c/libcurl-errors.html * * @param int $errno cURL error code + * @throws InvalidCertificateException + * @throws InvalidUrlException + * @throws MaxRedirectException + * @throws MaxSizeException + * @throws TimeoutException */ private function handleError($errno) { @@ -377,8 +385,7 @@ class Curl extends Client case 66: // CURLE_SSL_ENGINE_INITFAILED case 77: // CURLE_SSL_CACERT_BADFILE case 83: // CURLE_SSL_ISSUER_ERROR - $msg = 'Invalid SSL certificate caused by CURL error number ' . - $errno; + $msg = 'Invalid SSL certificate caused by CURL error number ' . $errno; throw new InvalidCertificateException($msg, $errno); case 47: // CURLE_TOO_MANY_REDIRECTS throw new MaxRedirectException('Maximum number of redirections reached', $errno); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Parser.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Parser.php index 588d93f..b1f673f 100644 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Parser.php +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Parser.php @@ -329,6 +329,7 @@ abstract class Parser implements ParserInterface public function setConfig($config) { $this->config = $config; + $this->itemPostProcessor->setConfig($config); return $this; } diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Processor/ItemPostProcessor.php b/vendor/fguillot/picofeed/lib/PicoFeed/Processor/ItemPostProcessor.php index 97425bf..d278767 100644 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Processor/ItemPostProcessor.php +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Processor/ItemPostProcessor.php @@ -5,6 +5,7 @@ namespace PicoFeed\Processor; use PicoFeed\Base; use PicoFeed\Parser\Feed; use PicoFeed\Parser\Item; +use PicoFeed\Config\Config; /** * Item Post Processor @@ -93,4 +94,13 @@ class ItemPostProcessor extends Base { return isset($this->processors[$class]) ? $this->processors[$class] : null; } + + public function setConfig(Config $config) + { + foreach ($this->processors as $processor) { + $processor->setConfig($config); + } + + return false; + } }