aboutsummaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/composer/autoload_classmap.php6
-rw-r--r--vendor/composer/autoload_static.php6
-rw-r--r--vendor/composer/installed.json17
-rw-r--r--vendor/composer/installed.php10
-rw-r--r--vendor/simplepie/simplepie/.php-cs-fixer.dist.php8
-rw-r--r--vendor/simplepie/simplepie/CHANGELOG.md53
-rw-r--r--vendor/simplepie/simplepie/README.markdown17
-rw-r--r--vendor/simplepie/simplepie/composer.json3
-rwxr-xr-xvendor/simplepie/simplepie/library/SimplePie.php146
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Author.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Cache.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Cache/Base.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Cache/DB.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Cache/File.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Cache/Memcache.php6
-rwxr-xr-xvendor/simplepie/simplepie/library/SimplePie/Cache/Memcached.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Cache/MySQL.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Cache/Redis.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Caption.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Category.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Copyright.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Core.php2
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Credit.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Decode/HTML/Entities.php2
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Enclosure.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Exception.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/File.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/HTTP/Parser.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/IRI.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Item.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Locator.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Misc.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Net/IPv6.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Parse/Date.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Parser.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Rating.php6
-rwxr-xr-xvendor/simplepie/simplepie/library/SimplePie/Registry.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Restriction.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Sanitize.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/Source.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/XML/Declaration/Parser.php6
-rw-r--r--vendor/simplepie/simplepie/library/SimplePie/gzdecode.php6
-rw-r--r--vendor/simplepie/simplepie/src/Author.php2
-rw-r--r--vendor/simplepie/simplepie/src/Cache.php16
-rw-r--r--vendor/simplepie/simplepie/src/Cache/Base.php11
-rw-r--r--vendor/simplepie/simplepie/src/Cache/BaseDataCache.php159
-rw-r--r--vendor/simplepie/simplepie/src/Cache/CallableNameFilter.php89
-rw-r--r--vendor/simplepie/simplepie/src/Cache/DB.php5
-rw-r--r--vendor/simplepie/simplepie/src/Cache/DataCache.php120
-rw-r--r--vendor/simplepie/simplepie/src/Cache/File.php7
-rw-r--r--vendor/simplepie/simplepie/src/Cache/Memcache.php9
-rw-r--r--vendor/simplepie/simplepie/src/Cache/Memcached.php11
-rw-r--r--vendor/simplepie/simplepie/src/Cache/MySQL.php11
-rw-r--r--vendor/simplepie/simplepie/src/Cache/NameFilter.php76
-rw-r--r--vendor/simplepie/simplepie/src/Cache/Psr16.php147
-rw-r--r--vendor/simplepie/simplepie/src/Cache/Redis.php14
-rw-r--r--vendor/simplepie/simplepie/src/Caption.php2
-rw-r--r--vendor/simplepie/simplepie/src/Category.php2
-rw-r--r--vendor/simplepie/simplepie/src/Content/Type/Sniffer.php2
-rw-r--r--vendor/simplepie/simplepie/src/Copyright.php2
-rw-r--r--vendor/simplepie/simplepie/src/Credit.php2
-rw-r--r--vendor/simplepie/simplepie/src/Enclosure.php5
-rw-r--r--vendor/simplepie/simplepie/src/Exception.php2
-rw-r--r--vendor/simplepie/simplepie/src/File.php2
-rw-r--r--vendor/simplepie/simplepie/src/Gzdecode.php4
-rw-r--r--vendor/simplepie/simplepie/src/HTTP/Parser.php90
-rw-r--r--vendor/simplepie/simplepie/src/IRI.php79
-rw-r--r--vendor/simplepie/simplepie/src/Item.php162
-rw-r--r--vendor/simplepie/simplepie/src/Locator.php60
-rw-r--r--vendor/simplepie/simplepie/src/Misc.php33
-rw-r--r--vendor/simplepie/simplepie/src/Net/IPv6.php6
-rw-r--r--vendor/simplepie/simplepie/src/Parse/Date.php104
-rw-r--r--vendor/simplepie/simplepie/src/Parser.php22
-rw-r--r--vendor/simplepie/simplepie/src/Rating.php2
-rw-r--r--vendor/simplepie/simplepie/src/Registry.php144
-rw-r--r--vendor/simplepie/simplepie/src/RegistryAware.php65
-rw-r--r--vendor/simplepie/simplepie/src/Restriction.php2
-rw-r--r--vendor/simplepie/simplepie/src/Sanitize.php90
-rw-r--r--vendor/simplepie/simplepie/src/SimplePie.php637
-rw-r--r--vendor/simplepie/simplepie/src/Source.php42
-rw-r--r--vendor/simplepie/simplepie/src/XML/Declaration/Parser.php73
82 files changed, 1989 insertions, 784 deletions
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 896daae0b..d383f28cf 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -883,11 +883,16 @@ return array(
'SimplePie\\Author' => $vendorDir . '/simplepie/simplepie/src/Author.php',
'SimplePie\\Cache' => $vendorDir . '/simplepie/simplepie/src/Cache.php',
'SimplePie\\Cache\\Base' => $vendorDir . '/simplepie/simplepie/src/Cache/Base.php',
+ 'SimplePie\\Cache\\BaseDataCache' => $vendorDir . '/simplepie/simplepie/src/Cache/BaseDataCache.php',
+ 'SimplePie\\Cache\\CallableNameFilter' => $vendorDir . '/simplepie/simplepie/src/Cache/CallableNameFilter.php',
'SimplePie\\Cache\\DB' => $vendorDir . '/simplepie/simplepie/src/Cache/DB.php',
+ 'SimplePie\\Cache\\DataCache' => $vendorDir . '/simplepie/simplepie/src/Cache/DataCache.php',
'SimplePie\\Cache\\File' => $vendorDir . '/simplepie/simplepie/src/Cache/File.php',
'SimplePie\\Cache\\Memcache' => $vendorDir . '/simplepie/simplepie/src/Cache/Memcache.php',
'SimplePie\\Cache\\Memcached' => $vendorDir . '/simplepie/simplepie/src/Cache/Memcached.php',
'SimplePie\\Cache\\MySQL' => $vendorDir . '/simplepie/simplepie/src/Cache/MySQL.php',
+ 'SimplePie\\Cache\\NameFilter' => $vendorDir . '/simplepie/simplepie/src/Cache/NameFilter.php',
+ 'SimplePie\\Cache\\Psr16' => $vendorDir . '/simplepie/simplepie/src/Cache/Psr16.php',
'SimplePie\\Cache\\Redis' => $vendorDir . '/simplepie/simplepie/src/Cache/Redis.php',
'SimplePie\\Caption' => $vendorDir . '/simplepie/simplepie/src/Caption.php',
'SimplePie\\Category' => $vendorDir . '/simplepie/simplepie/src/Category.php',
@@ -908,6 +913,7 @@ return array(
'SimplePie\\Parser' => $vendorDir . '/simplepie/simplepie/src/Parser.php',
'SimplePie\\Rating' => $vendorDir . '/simplepie/simplepie/src/Rating.php',
'SimplePie\\Registry' => $vendorDir . '/simplepie/simplepie/src/Registry.php',
+ 'SimplePie\\RegistryAware' => $vendorDir . '/simplepie/simplepie/src/RegistryAware.php',
'SimplePie\\Restriction' => $vendorDir . '/simplepie/simplepie/src/Restriction.php',
'SimplePie\\Sanitize' => $vendorDir . '/simplepie/simplepie/src/Sanitize.php',
'SimplePie\\SimplePie' => $vendorDir . '/simplepie/simplepie/src/SimplePie.php',
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 1a3ed33e7..6eb5d4ca6 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -1094,11 +1094,16 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'SimplePie\\Author' => __DIR__ . '/..' . '/simplepie/simplepie/src/Author.php',
'SimplePie\\Cache' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache.php',
'SimplePie\\Cache\\Base' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/Base.php',
+ 'SimplePie\\Cache\\BaseDataCache' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/BaseDataCache.php',
+ 'SimplePie\\Cache\\CallableNameFilter' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/CallableNameFilter.php',
'SimplePie\\Cache\\DB' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/DB.php',
+ 'SimplePie\\Cache\\DataCache' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/DataCache.php',
'SimplePie\\Cache\\File' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/File.php',
'SimplePie\\Cache\\Memcache' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/Memcache.php',
'SimplePie\\Cache\\Memcached' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/Memcached.php',
'SimplePie\\Cache\\MySQL' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/MySQL.php',
+ 'SimplePie\\Cache\\NameFilter' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/NameFilter.php',
+ 'SimplePie\\Cache\\Psr16' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/Psr16.php',
'SimplePie\\Cache\\Redis' => __DIR__ . '/..' . '/simplepie/simplepie/src/Cache/Redis.php',
'SimplePie\\Caption' => __DIR__ . '/..' . '/simplepie/simplepie/src/Caption.php',
'SimplePie\\Category' => __DIR__ . '/..' . '/simplepie/simplepie/src/Category.php',
@@ -1119,6 +1124,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'SimplePie\\Parser' => __DIR__ . '/..' . '/simplepie/simplepie/src/Parser.php',
'SimplePie\\Rating' => __DIR__ . '/..' . '/simplepie/simplepie/src/Rating.php',
'SimplePie\\Registry' => __DIR__ . '/..' . '/simplepie/simplepie/src/Registry.php',
+ 'SimplePie\\RegistryAware' => __DIR__ . '/..' . '/simplepie/simplepie/src/RegistryAware.php',
'SimplePie\\Restriction' => __DIR__ . '/..' . '/simplepie/simplepie/src/Restriction.php',
'SimplePie\\Sanitize' => __DIR__ . '/..' . '/simplepie/simplepie/src/Sanitize.php',
'SimplePie\\SimplePie' => __DIR__ . '/..' . '/simplepie/simplepie/src/SimplePie.php',
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index ae627ff6a..0a9f11410 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1478,27 +1478,28 @@
},
{
"name": "simplepie/simplepie",
- "version": "1.7.0",
- "version_normalized": "1.7.0.0",
+ "version": "1.8.0",
+ "version_normalized": "1.8.0.0",
"source": {
"type": "git",
"url": "https://github.com/simplepie/simplepie.git",
- "reference": "9e9add3428ce86aede874bcf9a59c78e272f8dc1"
+ "reference": "65b095d87bc00898d8fa7737bdbcda93a3fbcc55"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/simplepie/simplepie/zipball/9e9add3428ce86aede874bcf9a59c78e272f8dc1",
- "reference": "9e9add3428ce86aede874bcf9a59c78e272f8dc1",
+ "url": "https://api.github.com/repos/simplepie/simplepie/zipball/65b095d87bc00898d8fa7737bdbcda93a3fbcc55",
+ "reference": "65b095d87bc00898d8fa7737bdbcda93a3fbcc55",
"shasum": ""
},
"require": {
"ext-pcre": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
- "php": ">=5.6.0"
+ "php": ">=7.2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.19 || ^3.8",
+ "psr/simple-cache": "^1 || ^2 || ^3",
"yoast/phpunit-polyfills": "^1.0.1"
},
"suggest": {
@@ -1508,7 +1509,7 @@
"ext-mbstring": "",
"mf2/mf2": "Microformat module that allows for parsing HTML for microformats"
},
- "time": "2022-09-30T06:49:48+00:00",
+ "time": "2023-01-20T08:37:35+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -1559,7 +1560,7 @@
"rss"
],
"support": {
- "source": "https://github.com/simplepie/simplepie/tree/1.7.0",
+ "source": "https://github.com/simplepie/simplepie/tree/1.8.0",
"issues": "https://github.com/simplepie/simplepie/issues"
},
"install-path": "../simplepie/simplepie"
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 640c54dff..f0c95b248 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'zotlabs/hubzilla',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '94b26e1e66113d1936aa6f1b944a3161b99e8750',
+ 'reference' => 'c3d3dc9d92d14dbcfbaf39c4cc9ad4c120812a3d',
'type' => 'application',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -206,9 +206,9 @@
'dev_requirement' => false,
),
'simplepie/simplepie' => array(
- 'pretty_version' => '1.7.0',
- 'version' => '1.7.0.0',
- 'reference' => '9e9add3428ce86aede874bcf9a59c78e272f8dc1',
+ 'pretty_version' => '1.8.0',
+ 'version' => '1.8.0.0',
+ 'reference' => '65b095d87bc00898d8fa7737bdbcda93a3fbcc55',
'type' => 'library',
'install_path' => __DIR__ . '/../simplepie/simplepie',
'aliases' => array(),
@@ -268,7 +268,7 @@
'zotlabs/hubzilla' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '94b26e1e66113d1936aa6f1b944a3161b99e8750',
+ 'reference' => 'c3d3dc9d92d14dbcfbaf39c4cc9ad4c120812a3d',
'type' => 'application',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
diff --git a/vendor/simplepie/simplepie/.php-cs-fixer.dist.php b/vendor/simplepie/simplepie/.php-cs-fixer.dist.php
index 97d39cbcd..d26f7c6c6 100644
--- a/vendor/simplepie/simplepie/.php-cs-fixer.dist.php
+++ b/vendor/simplepie/simplepie/.php-cs-fixer.dist.php
@@ -2,7 +2,6 @@
$finder = (new PhpCsFixer\Finder())
->in('build')
- ->in('demo')
->in('library')
->in('src')
->in('tests')
@@ -11,9 +10,10 @@ $finder = (new PhpCsFixer\Finder())
return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
- '@PHP54Migration' => true,
- // TODO: Allow `const` after bump requirements to PHP >=7.1
- 'visibility_required' => ['elements' => ['property', 'method', /* 'const' */]],
+ '@PHP71Migration' => true,
+ '@PHP71Migration:risky' => true,
+ 'void_return' => false,
+ '@PHPUnit84Migration:risky' => true,
])
->setFinder($finder)
;
diff --git a/vendor/simplepie/simplepie/CHANGELOG.md b/vendor/simplepie/simplepie/CHANGELOG.md
index 18d8c3f1f..dba92bbf7 100644
--- a/vendor/simplepie/simplepie/CHANGELOG.md
+++ b/vendor/simplepie/simplepie/CHANGELOG.md
@@ -5,7 +5,58 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [Unreleased](https://github.com/simplepie/simplepie/compare/1.7.0...master)
+## [Unreleased](https://github.com/simplepie/simplepie/compare/1.8.0...master)
+
+## [1.8.0](https://github.com/simplepie/simplepie/compare/1.7.0...1.8.0) - 2023-01-20
+
+### Added
+
+- New method `SimplePie\SimplePie::set_cache()` for providing a PSR-16 cache implementation by @Art4 in [#742](https://github.com/simplepie/simplepie/pull/742)
+- New method `SimplePie\SimplePie::set_cache_namefilter()` for customize the cache key in [#762](https://github.com/simplepie/simplepie/pull/762)
+- New class `SimplePie\Cache\CallableNameFilter` to provide a `callable` to customize the cache key in [#762](https://github.com/simplepie/simplepie/pull/762)
+- New interface `SimplePie\RegistryAware` to inject the `Registry` instance into classes created by `Registry` by @Art4 in [#760](https://github.com/simplepie/simplepie/pull/760)
+- update PHP versions in GH Actions workflows by @jrfnl in [#767](https://github.com/simplepie/simplepie/pull/767)
+- Registry: Allow using class-strings instead of magic strings by @jtojnar and @Art4 in [#766](https://github.com/simplepie/simplepie/pull/766)
+
+### Changed
+
+- Clarify branching strategy by @Art4 in [#751](https://github.com/simplepie/simplepie/pull/751)
+- Use native array_replace_recursive() by @Alkarex in [#749](https://github.com/simplepie/simplepie/pull/749)
+- PHP 7.2 or newer is now required by @Art4 in [#743](https://github.com/simplepie/simplepie/pull/743)
+- Parse\Date: Clean up regex structure by @jtojnar in [#765](https://github.com/simplepie/simplepie/pull/765)
+- Declare strict_types=1 in every file by @Art4 in [#763](https://github.com/simplepie/simplepie/pull/763)
+
+### Fixed
+
+- Item::get_date(): fix return type on unparsable date by @jtojnar in [#753](https://github.com/simplepie/simplepie/pull/753)
+- Fix error handling for PHP 8.1 by @cedric-anne in [#747](https://github.com/simplepie/simplepie/pull/747)
+- The method `SimplePie\SimplePie::get_image_height()` returns the pixel number as `int` instead of `float` by @Art4 in [#763](https://github.com/simplepie/simplepie/pull/763)
+- The method `SimplePie\SimplePie::get_image_width()` returns the pixel number as `int` instead of `float` by @Art4 in [#763](https://github.com/simplepie/simplepie/pull/763)
+- No URL Decode for enclosure links by @Alkarex in [#768](https://github.com/simplepie/simplepie/pull/768)
+- Sanitize thumbnail URL by @Alkarex in [#770](https://github.com/simplepie/simplepie/pull/770)
+- Fix case of multiple RSS2.0 enclosures by @Alkarex in [#769](https://github.com/simplepie/simplepie/pull/769)
+- Fix broken phpdoc references by @jtojnar in [#771](https://github.com/simplepie/simplepie/pull/771)
+
+### Deprecated
+
+- The method `SimplePie\Misc::array_merge_recursive()` is deprecated, use native `array_replace_recursive()` instead
+- The method `SimplePie\SimplePie::set_cache_name_function()` is deprecated, use `SimplePie\SimplePie::set_cache_namefilter()` instead
+- The method `SimplePie\SimplePie::set_cache_location()` is deprecated, use `SimplePie\SimplePie::set_cache()` instead
+- The method `SimplePie\SimplePie::force_cache_fallback()` is deprecated, expired cache will not be used anymore
+- The class `SimplePie\Cache` is deprecated, use implementation of `SimplePie\SimplePie::set_cache()` instead
+- The class `SimplePie\Cache\DB` is deprecated, use implementation of `Psr\SimpleCache\CacheInterface` instead
+- The class `SimplePie\Cache\File` is deprecated, use implementation of `Psr\SimpleCache\CacheInterface` instead
+- The class `SimplePie\Cache\Memcache` is deprecated, use implementation of `Psr\SimpleCache\CacheInterface` instead
+- The class `SimplePie\Cache\Memcached` is deprecated, use implementation of `Psr\SimpleCache\CacheInterface` instead
+- The class `SimplePie\Cache\MySQL` is deprecated, use implementation of `Psr\SimpleCache\CacheInterface` instead
+- The class `SimplePie\Cache\Redis` is deprecated, use implementation of `Psr\SimpleCache\CacheInterface` instead
+- The interface `SimplePie\Cache\Base` is deprecated, use interface `Psr\SimpleCache\CacheInterface` instead
+
+### Removed
+
+- ROADMAP.md removed by @Art4 in [#748](https://github.com/simplepie/simplepie/pull/748)
+- remove check for E_USER_DEPRECATED definition by @Art4 in [#750](https://github.com/simplepie/simplepie/pull/750)
+- remove broken BC code in Registry by @Art4 in [#764](https://github.com/simplepie/simplepie/pull/764)
## [1.7.0](https://github.com/simplepie/simplepie/compare/1.6.0...1.7.0) - 2022-09-30
diff --git a/vendor/simplepie/simplepie/README.markdown b/vendor/simplepie/simplepie/README.markdown
index ca982cabe..5500f03c2 100644
--- a/vendor/simplepie/simplepie/README.markdown
+++ b/vendor/simplepie/simplepie/README.markdown
@@ -11,7 +11,7 @@ compatibility and standards compliance][what_is].
Requirements
------------
-* PHP 5.6+ (Required since SimplePie 1.5.3)
+* PHP 7.2+ (Required since SimplePie 1.8.0)
* libxml2 (certain 2.7.x releases are too buggy for words, and will crash)
* One of iconv, mbstring or intl extensions
* cURL or fsockopen()
@@ -75,9 +75,20 @@ to be prioritized.
If you'd like to contribute to SimplePie, the best way to get started is to fork
the project on GitHub and send pull requests for patches. When doing so, please
-be aware of our [coding standards][].
+be aware of our [coding standards](http://simplepie.org/wiki/misc/coding_standards).
-[coding standards]: http://simplepie.org/wiki/misc/coding_standards
+The main development for the next minor release happens in `master` branch.
+Please create your pull requests primarily against this branch.
+
+We do not actively provide bug fixes or security fixes for older versions. Nevertheless,
+you are welcome to create backport PRs if you still need support for older PHP versions.
+Please open your PR against the appropriate branch.
+
+| branch | requires |
+|----------------------------------------------------------------------------|-------------|
+| [master](https://github.com/simplepie/simplepie/tree/master) | PHP 7.2.0+ |
+| [one-dot-seven](https://github.com/simplepie/simplepie/tree/one-dot-seven) | PHP 5.6.0+ |
+| [one-dot-three](https://github.com/simplepie/simplepie/tree/one-dot-three) | PHP 5.2.0+ |
Authors and contributors
diff --git a/vendor/simplepie/simplepie/composer.json b/vendor/simplepie/simplepie/composer.json
index 71267ce0c..cfede2b53 100644
--- a/vendor/simplepie/simplepie/composer.json
+++ b/vendor/simplepie/simplepie/composer.json
@@ -24,13 +24,14 @@
}
],
"require": {
- "php": ">=5.6.0",
+ "php": ">=7.2.0",
"ext-pcre": "*",
"ext-xml": "*",
"ext-xmlreader": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.19 || ^3.8",
+ "psr/simple-cache": "^1 || ^2 || ^3",
"yoast/phpunit-polyfills": "^1.0.1"
},
"suggest": {
diff --git a/vendor/simplepie/simplepie/library/SimplePie.php b/vendor/simplepie/simplepie/library/SimplePie.php
index 76c1c2213..8a2b334e1 100755
--- a/vendor/simplepie/simplepie/library/SimplePie.php
+++ b/vendor/simplepie/simplepie/library/SimplePie.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -46,10 +48,10 @@ use SimplePie\SimplePie as NamespacedSimplePie;
class_exists('SimplePie\SimplePie');
-// @trigger_error(sprintf('Using the "SimplePie" class is deprecated since SimplePie 1.7, use "SimplePie\SimplePie" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie" class is deprecated since SimplePie 1.7.0, use "SimplePie\SimplePie" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\SimplePie" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\SimplePie" instead */
class SimplePie extends NamespacedSimplePie
{
}
@@ -57,430 +59,430 @@ if (\false) {
/**
* SimplePie Name
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAME instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAME instead.
*/
define('SIMPLEPIE_NAME', NamespacedSimplePie::NAME);
/**
* SimplePie Version
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::VERSION instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::VERSION instead.
*/
define('SIMPLEPIE_VERSION', NamespacedSimplePie::VERSION);
/**
* SimplePie Build
* @todo Hardcode for release (there's no need to have to call SimplePie_Misc::get_build() only every load of simplepie.inc)
- * @deprecated since SimplePie 1.7, use \SimplePie\Misc::get_build() instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\Misc::get_build() instead.
*/
define('SIMPLEPIE_BUILD', gmdate('YmdHis', \SimplePie\Misc::get_build()));
/**
* SimplePie Website URL
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::URL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::URL instead.
*/
define('SIMPLEPIE_URL', NamespacedSimplePie::URL);
/**
* SimplePie Useragent
* @see SimplePie::set_useragent()
- * @deprecated since SimplePie 1.7, use \SimplePie\Misc::get_default_useragent() instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\Misc::get_default_useragent() instead.
*/
define('SIMPLEPIE_USERAGENT', \SimplePie\Misc::get_default_useragent());
/**
* SimplePie Linkback
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LINKBACK instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LINKBACK instead.
*/
define('SIMPLEPIE_LINKBACK', NamespacedSimplePie::LINKBACK);
/**
* No Autodiscovery
* @see SimplePie::set_autodiscovery_level()
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOCATOR_NONE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOCATOR_NONE instead.
*/
define('SIMPLEPIE_LOCATOR_NONE', NamespacedSimplePie::LOCATOR_NONE);
/**
* Feed Link Element Autodiscovery
* @see SimplePie::set_autodiscovery_level()
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOCATOR_AUTODISCOVERY instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOCATOR_AUTODISCOVERY instead.
*/
define('SIMPLEPIE_LOCATOR_AUTODISCOVERY', NamespacedSimplePie::LOCATOR_AUTODISCOVERY);
/**
* Local Feed Extension Autodiscovery
* @see SimplePie::set_autodiscovery_level()
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOCATOR_LOCAL_EXTENSION instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOCATOR_LOCAL_EXTENSION instead.
*/
define('SIMPLEPIE_LOCATOR_LOCAL_EXTENSION', NamespacedSimplePie::LOCATOR_LOCAL_EXTENSION);
/**
* Local Feed Body Autodiscovery
* @see SimplePie::set_autodiscovery_level()
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOCATOR_LOCAL_BODY instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOCATOR_LOCAL_BODY instead.
*/
define('SIMPLEPIE_LOCATOR_LOCAL_BODY', NamespacedSimplePie::LOCATOR_LOCAL_BODY);
/**
* Remote Feed Extension Autodiscovery
* @see SimplePie::set_autodiscovery_level()
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOCATOR_REMOTE_EXTENSION instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOCATOR_REMOTE_EXTENSION instead.
*/
define('SIMPLEPIE_LOCATOR_REMOTE_EXTENSION', NamespacedSimplePie::LOCATOR_REMOTE_EXTENSION);
/**
* Remote Feed Body Autodiscovery
* @see SimplePie::set_autodiscovery_level()
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOCATOR_REMOTE_BODY instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOCATOR_REMOTE_BODY instead.
*/
define('SIMPLEPIE_LOCATOR_REMOTE_BODY', NamespacedSimplePie::LOCATOR_REMOTE_BODY);
/**
* All Feed Autodiscovery
* @see SimplePie::set_autodiscovery_level()
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOCATOR_ALL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOCATOR_ALL instead.
*/
define('SIMPLEPIE_LOCATOR_ALL', NamespacedSimplePie::LOCATOR_ALL);
/**
* No known feed type
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_NONE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_NONE instead.
*/
define('SIMPLEPIE_TYPE_NONE', NamespacedSimplePie::TYPE_NONE);
/**
* RSS 0.90
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_090 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_090 instead.
*/
define('SIMPLEPIE_TYPE_RSS_090', NamespacedSimplePie::TYPE_RSS_090);
/**
* RSS 0.91 (Netscape)
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_091_NETSCAPE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_091_NETSCAPE instead.
*/
define('SIMPLEPIE_TYPE_RSS_091_NETSCAPE', NamespacedSimplePie::TYPE_RSS_091_NETSCAPE);
/**
* RSS 0.91 (Userland)
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_091_USERLAND instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_091_USERLAND instead.
*/
define('SIMPLEPIE_TYPE_RSS_091_USERLAND', NamespacedSimplePie::TYPE_RSS_091_USERLAND);
/**
* RSS 0.91 (both Netscape and Userland)
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_091 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_091 instead.
*/
define('SIMPLEPIE_TYPE_RSS_091', NamespacedSimplePie::TYPE_RSS_091);
/**
* RSS 0.92
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_092 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_092 instead.
*/
define('SIMPLEPIE_TYPE_RSS_092', NamespacedSimplePie::TYPE_RSS_092);
/**
* RSS 0.93
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_093 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_093 instead.
*/
define('SIMPLEPIE_TYPE_RSS_093', NamespacedSimplePie::TYPE_RSS_093);
/**
* RSS 0.94
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_094 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_094 instead.
*/
define('SIMPLEPIE_TYPE_RSS_094', NamespacedSimplePie::TYPE_RSS_094);
/**
* RSS 1.0
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_10 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_10 instead.
*/
define('SIMPLEPIE_TYPE_RSS_10', NamespacedSimplePie::TYPE_RSS_10);
/**
* RSS 2.0
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_20 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_20 instead.
*/
define('SIMPLEPIE_TYPE_RSS_20', NamespacedSimplePie::TYPE_RSS_20);
/**
* RDF-based RSS
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_RDF instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_RDF instead.
*/
define('SIMPLEPIE_TYPE_RSS_RDF', NamespacedSimplePie::TYPE_RSS_RDF);
/**
* Non-RDF-based RSS (truly intended as syndication format)
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_SYNDICATION instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_SYNDICATION instead.
*/
define('SIMPLEPIE_TYPE_RSS_SYNDICATION', NamespacedSimplePie::TYPE_RSS_SYNDICATION);
/**
* All RSS
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_RSS_ALL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_RSS_ALL instead.
*/
define('SIMPLEPIE_TYPE_RSS_ALL', NamespacedSimplePie::TYPE_RSS_ALL);
/**
* Atom 0.3
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_ATOM_03 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_ATOM_03 instead.
*/
define('SIMPLEPIE_TYPE_ATOM_03', NamespacedSimplePie::TYPE_ATOM_03);
/**
* Atom 1.0
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_ATOM_10 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_ATOM_10 instead.
*/
define('SIMPLEPIE_TYPE_ATOM_10', NamespacedSimplePie::TYPE_ATOM_10);
/**
* All Atom
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_ATOM_ALL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_ATOM_ALL instead.
*/
define('SIMPLEPIE_TYPE_ATOM_ALL', NamespacedSimplePie::TYPE_ATOM_ALL);
/**
* All feed types
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::TYPE_ALL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::TYPE_ALL instead.
*/
define('SIMPLEPIE_TYPE_ALL', NamespacedSimplePie::TYPE_ALL);
/**
* No construct
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_NONE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_NONE instead.
*/
define('SIMPLEPIE_CONSTRUCT_NONE', NamespacedSimplePie::CONSTRUCT_NONE);
/**
* Text construct
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_TEXT instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_TEXT instead.
*/
define('SIMPLEPIE_CONSTRUCT_TEXT', NamespacedSimplePie::CONSTRUCT_TEXT);
/**
* HTML construct
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_HTML instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_HTML instead.
*/
define('SIMPLEPIE_CONSTRUCT_HTML', NamespacedSimplePie::CONSTRUCT_HTML);
/**
* XHTML construct
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_XHTML instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_XHTML instead.
*/
define('SIMPLEPIE_CONSTRUCT_XHTML', NamespacedSimplePie::CONSTRUCT_XHTML);
/**
* base64-encoded construct
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_BASE64 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_BASE64 instead.
*/
define('SIMPLEPIE_CONSTRUCT_BASE64', NamespacedSimplePie::CONSTRUCT_BASE64);
/**
* IRI construct
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_IRI instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_IRI instead.
*/
define('SIMPLEPIE_CONSTRUCT_IRI', NamespacedSimplePie::CONSTRUCT_IRI);
/**
* A construct that might be HTML
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_MAYBE_HTML instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_MAYBE_HTML instead.
*/
define('SIMPLEPIE_CONSTRUCT_MAYBE_HTML', NamespacedSimplePie::CONSTRUCT_MAYBE_HTML);
/**
* All constructs
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::CONSTRUCT_ALL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::CONSTRUCT_ALL instead.
*/
define('SIMPLEPIE_CONSTRUCT_ALL', NamespacedSimplePie::CONSTRUCT_ALL);
/**
* Don't change case
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::SAME_CASE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::SAME_CASE instead.
*/
define('SIMPLEPIE_SAME_CASE', NamespacedSimplePie::SAME_CASE);
/**
* Change to lowercase
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::LOWERCASE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::LOWERCASE instead.
*/
define('SIMPLEPIE_LOWERCASE', NamespacedSimplePie::LOWERCASE);
/**
* Change to uppercase
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::UPPERCASE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::UPPERCASE instead.
*/
define('SIMPLEPIE_UPPERCASE', NamespacedSimplePie::UPPERCASE);
/**
* PCRE for HTML attributes
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::PCRE_HTML_ATTRIBUTE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::PCRE_HTML_ATTRIBUTE instead.
*/
define('SIMPLEPIE_PCRE_HTML_ATTRIBUTE', NamespacedSimplePie::PCRE_HTML_ATTRIBUTE);
/**
* PCRE for XML attributes
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::PCRE_XML_ATTRIBUTE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::PCRE_XML_ATTRIBUTE instead.
*/
define('SIMPLEPIE_PCRE_XML_ATTRIBUTE', NamespacedSimplePie::PCRE_XML_ATTRIBUTE);
/**
* XML Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_XML instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_XML instead.
*/
define('SIMPLEPIE_NAMESPACE_XML', NamespacedSimplePie::NAMESPACE_XML);
/**
* Atom 1.0 Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_ATOM_10 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_ATOM_10 instead.
*/
define('SIMPLEPIE_NAMESPACE_ATOM_10', NamespacedSimplePie::NAMESPACE_ATOM_10);
/**
* Atom 0.3 Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_ATOM_03 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_ATOM_03 instead.
*/
define('SIMPLEPIE_NAMESPACE_ATOM_03', NamespacedSimplePie::NAMESPACE_ATOM_03);
/**
* RDF Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_RDF instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_RDF instead.
*/
define('SIMPLEPIE_NAMESPACE_RDF', NamespacedSimplePie::NAMESPACE_RDF);
/**
* RSS 0.90 Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_RSS_090 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_RSS_090 instead.
*/
define('SIMPLEPIE_NAMESPACE_RSS_090', NamespacedSimplePie::NAMESPACE_RSS_090);
/**
* RSS 1.0 Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_RSS_10 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_RSS_10 instead.
*/
define('SIMPLEPIE_NAMESPACE_RSS_10', NamespacedSimplePie::NAMESPACE_RSS_10);
/**
* RSS 1.0 Content Module Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_RSS_10_MODULES_CONTENT instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_RSS_10_MODULES_CONTENT instead.
*/
define('SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT', NamespacedSimplePie::NAMESPACE_RSS_10_MODULES_CONTENT);
/**
* RSS 2.0 Namespace
* (Stupid, I know, but I'm certain it will confuse people less with support.)
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_RSS_20 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_RSS_20 instead.
*/
define('SIMPLEPIE_NAMESPACE_RSS_20', NamespacedSimplePie::NAMESPACE_RSS_20);
/**
* DC 1.0 Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_DC_10 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_DC_10 instead.
*/
define('SIMPLEPIE_NAMESPACE_DC_10', NamespacedSimplePie::NAMESPACE_DC_10);
/**
* DC 1.1 Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_DC_11 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_DC_11 instead.
*/
define('SIMPLEPIE_NAMESPACE_DC_11', NamespacedSimplePie::NAMESPACE_DC_11);
/**
* W3C Basic Geo (WGS84 lat/long) Vocabulary Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_W3C_BASIC_GEO instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_W3C_BASIC_GEO instead.
*/
define('SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO', NamespacedSimplePie::NAMESPACE_W3C_BASIC_GEO);
/**
* GeoRSS Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_GEORSS instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_GEORSS instead.
*/
define('SIMPLEPIE_NAMESPACE_GEORSS', NamespacedSimplePie::NAMESPACE_GEORSS);
/**
* Media RSS Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS instead.
*/
define('SIMPLEPIE_NAMESPACE_MEDIARSS', NamespacedSimplePie::NAMESPACE_MEDIARSS);
/**
* Wrong Media RSS Namespace. Caused by a long-standing typo in the spec.
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG instead.
*/
define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG', NamespacedSimplePie::NAMESPACE_MEDIARSS_WRONG);
/**
* Wrong Media RSS Namespace #2. New namespace introduced in Media RSS 1.5.
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG2 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG2 instead.
*/
define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG2', NamespacedSimplePie::NAMESPACE_MEDIARSS_WRONG2);
/**
* Wrong Media RSS Namespace #3. A possible typo of the Media RSS 1.5 namespace.
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG3 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG3 instead.
*/
define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG3', NamespacedSimplePie::NAMESPACE_MEDIARSS_WRONG3);
/**
* Wrong Media RSS Namespace #4. New spec location after the RSS Advisory Board takes it over, but not a valid namespace.
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG4 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG4 instead.
*/
define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG4', NamespacedSimplePie::NAMESPACE_MEDIARSS_WRONG4);
/**
* Wrong Media RSS Namespace #5. A possible typo of the RSS Advisory Board URL.
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG5 instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_MEDIARSS_WRONG5 instead.
*/
define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG5', NamespacedSimplePie::NAMESPACE_MEDIARSS_WRONG5);
/**
* iTunes RSS Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_ITUNES instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_ITUNES instead.
*/
define('SIMPLEPIE_NAMESPACE_ITUNES', NamespacedSimplePie::NAMESPACE_ITUNES);
/**
* XHTML Namespace
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::NAMESPACE_XHTML instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::NAMESPACE_XHTML instead.
*/
define('SIMPLEPIE_NAMESPACE_XHTML', NamespacedSimplePie::NAMESPACE_XHTML);
/**
* IANA Link Relations Registry
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY instead.
*/
define('SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY', NamespacedSimplePie::IANA_LINK_RELATIONS_REGISTRY);
/**
* No file source
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::FILE_SOURCE_NONE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::FILE_SOURCE_NONE instead.
*/
define('SIMPLEPIE_FILE_SOURCE_NONE', NamespacedSimplePie::FILE_SOURCE_NONE);
/**
* Remote file source
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::FILE_SOURCE_REMOTE instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::FILE_SOURCE_REMOTE instead.
*/
define('SIMPLEPIE_FILE_SOURCE_REMOTE', NamespacedSimplePie::FILE_SOURCE_REMOTE);
/**
* Local file source
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::FILE_SOURCE_LOCAL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::FILE_SOURCE_LOCAL instead.
*/
define('SIMPLEPIE_FILE_SOURCE_LOCAL', NamespacedSimplePie::FILE_SOURCE_LOCAL);
/**
* fsockopen() file source
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::FILE_SOURCE_FSOCKOPEN instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::FILE_SOURCE_FSOCKOPEN instead.
*/
define('SIMPLEPIE_FILE_SOURCE_FSOCKOPEN', NamespacedSimplePie::FILE_SOURCE_FSOCKOPEN);
/**
* cURL file source
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::FILE_SOURCE_CURL instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::FILE_SOURCE_CURL instead.
*/
define('SIMPLEPIE_FILE_SOURCE_CURL', NamespacedSimplePie::FILE_SOURCE_CURL);
/**
* file_get_contents() file source
- * @deprecated since SimplePie 1.7, use \SimplePie\SimplePie::FILE_SOURCE_FILE_GET_CONTENTS instead.
+ * @deprecated since SimplePie 1.7.0, use \SimplePie\SimplePie::FILE_SOURCE_FILE_GET_CONTENTS instead.
*/
define('SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS', NamespacedSimplePie::FILE_SOURCE_FILE_GET_CONTENTS);
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Author.php b/vendor/simplepie/simplepie/library/SimplePie/Author.php
index 1da49e2c2..3b3ab50e6 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Author.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Author.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Author;
class_exists('SimplePie\Author');
-// @trigger_error(sprintf('Using the "SimplePie_Author" class is deprecated since SimplePie 1.7, use "SimplePie\Author" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Author" class is deprecated since SimplePie 1.7.0, use "SimplePie\Author" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Author" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Author" instead */
class SimplePie_Author extends Author
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache.php b/vendor/simplepie/simplepie/library/SimplePie/Cache.php
index 034af74e2..9f2883ed6 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Cache;
class_exists('SimplePie\Cache');
-// @trigger_error(sprintf('Using the "SimplePie_Cache" class is deprecated since SimplePie 1.7, use "SimplePie\Cache" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache" instead */
class SimplePie_Cache extends Cache
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache/Base.php b/vendor/simplepie/simplepie/library/SimplePie/Cache/Base.php
index 3eddd1f3e..2988ce7c8 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache/Base.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache/Base.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Cache\Base;
interface_exists('SimplePie\Cache\Base');
-// @trigger_error(sprintf('Using the "SimplePie_Cache_Base" class is deprecated since SimplePie 1.7, use "SimplePie\Cache\Base" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache_Base" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Base" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache\Base" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Base" instead */
interface SimplePie_Cache_Base extends Base
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache/DB.php b/vendor/simplepie/simplepie/library/SimplePie/Cache/DB.php
index 778b0d117..4fb8d2c65 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache/DB.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache/DB.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Cache\DB;
class_exists('SimplePie\Cache\DB');
-// @trigger_error(sprintf('Using the "SimplePie_Cache_DB" class is deprecated since SimplePie 1.7, use "SimplePie\Cache\DB" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache_DB" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache\DB" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache\DB" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\DB" instead */
abstract class SimplePie_Cache_DB extends DB
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache/File.php b/vendor/simplepie/simplepie/library/SimplePie/Cache/File.php
index be1005d71..cd5646f20 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache/File.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache/File.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Cache\File;
class_exists('SimplePie\Cache\File');
-// @trigger_error(sprintf('Using the "SimplePie_Cache_File" class is deprecated since SimplePie 1.7, use "SimplePie\Cache\File" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache_File" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache\File" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache\File" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\File" instead */
class SimplePie_Cache_File extends File
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcache.php b/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcache.php
index 97f6f2a00..a5e088f00 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcache.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcache.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Cache\Memcache;
class_exists('SimplePie\Cache\Memcache');
-// @trigger_error(sprintf('Using the "SimplePie_Cache_Memcache" class is deprecated since SimplePie 1.7, use "SimplePie\Cache\Memcache" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache_Memcache" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcache" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache\Memcache" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcache" instead */
class SimplePie_Cache_Memcache extends Memcache
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcached.php b/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcached.php
index 937053257..aef5b953a 100755
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcached.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache/Memcached.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Cache\Memcached;
class_exists('SimplePie\Cache\Memcached');
-// @trigger_error(sprintf('Using the "SimplePie_Cache_Memcached" class is deprecated since SimplePie 1.7, use "SimplePie\Cache\Memcached" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache_Memcached" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcached" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache\Memcached" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcached" instead */
class SimplePie_Cache_Memcached extends Memcached
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache/MySQL.php b/vendor/simplepie/simplepie/library/SimplePie/Cache/MySQL.php
index c3b9d4f86..01ea48cbb 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache/MySQL.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache/MySQL.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Cache\MySQL;
class_exists('SimplePie\Cache\MySQL');
-// @trigger_error(sprintf('Using the "SimplePie_Cache_MySQL" class is deprecated since SimplePie 1.7, use "SimplePie\Cache\MySQL" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache_MySQL" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache\MySQL" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache\MySQL" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\MySQL" instead */
class SimplePie_Cache_MySQL extends MySQL
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Cache/Redis.php b/vendor/simplepie/simplepie/library/SimplePie/Cache/Redis.php
index 3beec3ecc..7d68c9795 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Cache/Redis.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Cache/Redis.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
/**
* SimplePie Redis Cache Extension
*
@@ -14,10 +16,10 @@ use SimplePie\Cache\Redis;
class_exists('SimplePie\Cache\Redis');
-// @trigger_error(sprintf('Using the "SimplePie_Cache_Redis" class is deprecated since SimplePie 1.7, use "SimplePie\Cache\Redis" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Cache_Redis" class is deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Redis" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Cache\Redis" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Redis" instead */
class SimplePie_Cache_Redis extends Redis
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Caption.php b/vendor/simplepie/simplepie/library/SimplePie/Caption.php
index c6006ae62..6e96e11b2 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Caption.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Caption.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Caption;
class_exists('SimplePie\Caption');
-// @trigger_error(sprintf('Using the "SimplePie_Caption" class is deprecated since SimplePie 1.7, use "SimplePie\Caption" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Caption" class is deprecated since SimplePie 1.7.0, use "SimplePie\Caption" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Caption" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Caption" instead */
class SimplePie_Caption extends Caption
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Category.php b/vendor/simplepie/simplepie/library/SimplePie/Category.php
index f5df6073a..7bdf595df 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Category.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Category.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Category;
class_exists('SimplePie\Category');
-// @trigger_error(sprintf('Using the "SimplePie_Category" class is deprecated since SimplePie 1.7, use "SimplePie\Category" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Category" class is deprecated since SimplePie 1.7.0, use "SimplePie\Category" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Category" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Category" instead */
class SimplePie_Category extends Category
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php b/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php
index f37257f8a..016755753 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Content\Type\Sniffer;
class_exists('SimplePie\Content\Type\Sniffer');
-// @trigger_error(sprintf('Using the "SimplePie_Content_Type_Sniffer" class is deprecated since SimplePie 1.7, use "SimplePie\Content\Type\Sniffer" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Content_Type_Sniffer" class is deprecated since SimplePie 1.7.0, use "SimplePie\Content\Type\Sniffer" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Content\Type\Sniffer" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Content\Type\Sniffer" instead */
class SimplePie_Content_Type_Sniffer extends Sniffer
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Copyright.php b/vendor/simplepie/simplepie/library/SimplePie/Copyright.php
index 19c008969..fd50d702c 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Copyright.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Copyright.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Copyright;
class_exists('SimplePie\Copyright');
-// @trigger_error(sprintf('Using the "SimplePie_Copyright" class is deprecated since SimplePie 1.7, use "SimplePie\Copyright" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Copyright" class is deprecated since SimplePie 1.7.0, use "SimplePie\Copyright" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Copyright" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Copyright" instead */
class SimplePie_Copyright extends Copyright
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Core.php b/vendor/simplepie/simplepie/library/SimplePie/Core.php
index bb68d470f..7f3313345 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Core.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Core.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Credit.php b/vendor/simplepie/simplepie/library/SimplePie/Credit.php
index 119c86071..14a197224 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Credit.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Credit.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Credit;
class_exists('SimplePie\Credit');
-// @trigger_error(sprintf('Using the "SimplePie_Credit" class is deprecated since SimplePie 1.7, use "SimplePie\Credit" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Credit" class is deprecated since SimplePie 1.7.0, use "SimplePie\Credit" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Credit" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Credit" instead */
class SimplePie_Credit extends Credit
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Decode/HTML/Entities.php b/vendor/simplepie/simplepie/library/SimplePie/Decode/HTML/Entities.php
index e8a1617c0..496c7bf52 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Decode/HTML/Entities.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Decode/HTML/Entities.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Enclosure.php b/vendor/simplepie/simplepie/library/SimplePie/Enclosure.php
index db8ab091e..a0e057511 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Enclosure.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Enclosure.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Enclosure;
class_exists('SimplePie\Enclosure');
-// @trigger_error(sprintf('Using the "SimplePie_Enclosure" class is deprecated since SimplePie 1.7, use "SimplePie\Enclosure" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Enclosure" class is deprecated since SimplePie 1.7.0, use "SimplePie\Enclosure" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Enclosure" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Enclosure" instead */
class SimplePie_Enclosure extends Enclosure
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Exception.php b/vendor/simplepie/simplepie/library/SimplePie/Exception.php
index b3228350f..218a8e3c4 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Exception.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Exception.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Exception as SimplePieException;
class_exists('SimplePie\Exception');
-// @trigger_error(sprintf('Using the "SimplePie_Exception" class is deprecated since SimplePie 1.7, use "SimplePie\Exception" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Exception" class is deprecated since SimplePie 1.7.0, use "SimplePie\Exception" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Exception" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Exception" instead */
class SimplePie_Exception extends SimplePieException
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/File.php b/vendor/simplepie/simplepie/library/SimplePie/File.php
index 89e00de09..99f14fa6b 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/File.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/File.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\File;
class_exists('SimplePie\File');
-// @trigger_error(sprintf('Using the "SimplePie_File" class is deprecated since SimplePie 1.7, use "SimplePie\File" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_File" class is deprecated since SimplePie 1.7.0, use "SimplePie\File" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\File" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\File" instead */
class SimplePie_File extends File
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/HTTP/Parser.php b/vendor/simplepie/simplepie/library/SimplePie/HTTP/Parser.php
index 4d859df4b..65f6c9f6d 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/HTTP/Parser.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/HTTP/Parser.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\HTTP\Parser;
class_exists('SimplePie\HTTP\Parser');
-// @trigger_error(sprintf('Using the "SimplePie_HTTP_Parser" class is deprecated since SimplePie 1.7, use "SimplePie\HTTP\Parser" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_HTTP_Parser" class is deprecated since SimplePie 1.7.0, use "SimplePie\HTTP\Parser" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\HTTP\Parser" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\HTTP\Parser" instead */
class SimplePie_HTTP_Parser extends Parser
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/IRI.php b/vendor/simplepie/simplepie/library/SimplePie/IRI.php
index cb374b862..561cfca06 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/IRI.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/IRI.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\IRI;
class_exists('SimplePie\IRI');
-// @trigger_error(sprintf('Using the "SimplePie_IRI" class is deprecated since SimplePie 1.7, use "SimplePie\IRI" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_IRI" class is deprecated since SimplePie 1.7.0, use "SimplePie\IRI" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\IRI" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\IRI" instead */
class SimplePie_IRI extends IRI
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Item.php b/vendor/simplepie/simplepie/library/SimplePie/Item.php
index 238c6e397..13c51c3b7 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Item.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Item.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Item;
class_exists('SimplePie\Item');
-// @trigger_error(sprintf('Using the "SimplePie_Item" class is deprecated since SimplePie 1.7, use "SimplePie\Item" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Item" class is deprecated since SimplePie 1.7.0, use "SimplePie\Item" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Item" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Item" instead */
class SimplePie_Item extends Item
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Locator.php b/vendor/simplepie/simplepie/library/SimplePie/Locator.php
index 4d1c0fe87..77f83d6af 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Locator.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Locator.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Locator;
class_exists('SimplePie\Locator');
-// @trigger_error(sprintf('Using the "SimplePie_Locator" class is deprecated since SimplePie 1.7, use "SimplePie\Locator" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Locator" class is deprecated since SimplePie 1.7.0, use "SimplePie\Locator" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Locator" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Locator" instead */
class SimplePie_Locator extends Locator
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Misc.php b/vendor/simplepie/simplepie/library/SimplePie/Misc.php
index 80933e770..d357b040c 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Misc.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Misc.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Misc;
class_exists('SimplePie\Misc');
-// @trigger_error(sprintf('Using the "SimplePie_Misc" class is deprecated since SimplePie 1.7, use "SimplePie\Misc" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Misc" class is deprecated since SimplePie 1.7.0, use "SimplePie\Misc" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Misc" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Misc" instead */
class SimplePie_Misc extends Misc
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Net/IPv6.php b/vendor/simplepie/simplepie/library/SimplePie/Net/IPv6.php
index 42fc06459..8d125e3a0 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Net/IPv6.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Net/IPv6.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Net\IPv6;
class_exists('SimplePie\Net\IPv6');
-// @trigger_error(sprintf('Using the "SimplePie_Net_IPv6" class is deprecated since SimplePie 1.7, use "SimplePie\Net\IPv6" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Net_IPv6" class is deprecated since SimplePie 1.7.0, use "SimplePie\Net\IPv6" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Net\IPv6" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Net\IPv6" instead */
class SimplePie_Net_IPv6 extends IPv6
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Parse/Date.php b/vendor/simplepie/simplepie/library/SimplePie/Parse/Date.php
index d171ee6a4..e55c2f468 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Parse/Date.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Parse/Date.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Parse\Date;
class_exists('SimplePie\Parse\Date');
-// @trigger_error(sprintf('Using the "SimplePie_Parse_Date" class is deprecated since SimplePie 1.7, use "SimplePie\Parse\Date" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Parse_Date" class is deprecated since SimplePie 1.7.0, use "SimplePie\Parse\Date" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Parse\Date" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Parse\Date" instead */
class SimplePie_Parse_Date extends Date
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Parser.php b/vendor/simplepie/simplepie/library/SimplePie/Parser.php
index 967abd10d..1a1ff9ab4 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Parser.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Parser.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Parser;
class_exists('SimplePie\Parser');
-// @trigger_error(sprintf('Using the "SimplePie_Parser" class is deprecated since SimplePie 1.7, use "SimplePie\Parser" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Parser" class is deprecated since SimplePie 1.7.0, use "SimplePie\Parser" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Parser" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Parser" instead */
class SimplePie_Parser extends Parser
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Rating.php b/vendor/simplepie/simplepie/library/SimplePie/Rating.php
index 69ca4eff1..c096850c4 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Rating.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Rating.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Rating;
class_exists('SimplePie\Rating');
-// @trigger_error(sprintf('Using the "SimplePie_Rating" class is deprecated since SimplePie 1.7, use "SimplePie\Rating" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Rating" class is deprecated since SimplePie 1.7.0, use "SimplePie\Rating" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Rating" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Rating" instead */
class SimplePie_Rating extends Rating
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Registry.php b/vendor/simplepie/simplepie/library/SimplePie/Registry.php
index a04fd7149..eaf32c05a 100755
--- a/vendor/simplepie/simplepie/library/SimplePie/Registry.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Registry.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Registry;
class_exists('SimplePie\Registry');
-// @trigger_error(sprintf('Using the "SimplePie_Registry" class is deprecated since SimplePie 1.7, use "SimplePie\Registry" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Registry" class is deprecated since SimplePie 1.7.0, use "SimplePie\Registry" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Registry" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Registry" instead */
class SimplePie_Registry extends Registry
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Restriction.php b/vendor/simplepie/simplepie/library/SimplePie/Restriction.php
index 7a3b92055..28a1ebfb2 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Restriction.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Restriction.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Restriction;
class_exists('SimplePie\Restriction');
-// @trigger_error(sprintf('Using the "SimplePie_Restriction" class is deprecated since SimplePie 1.7, use "SimplePie\Restriction" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Restriction" class is deprecated since SimplePie 1.7.0, use "SimplePie\Restriction" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Restriction" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Restriction" instead */
class SimplePie_Restriction extends Restriction
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Sanitize.php b/vendor/simplepie/simplepie/library/SimplePie/Sanitize.php
index 4f8b49086..36c59ebce 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Sanitize.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Sanitize.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Sanitize;
class_exists('SimplePie\Sanitize');
-// @trigger_error(sprintf('Using the "SimplePie_Sanitize" class is deprecated since SimplePie 1.7, use "SimplePie\Sanitize" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Sanitize" class is deprecated since SimplePie 1.7.0, use "SimplePie\Sanitize" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Sanitize" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Sanitize" instead */
class SimplePie_Sanitize extends Sanitize
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/Source.php b/vendor/simplepie/simplepie/library/SimplePie/Source.php
index 7847b41d3..d2205e5dd 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/Source.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/Source.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Source;
class_exists('SimplePie\Source');
-// @trigger_error(sprintf('Using the "SimplePie_Source" class is deprecated since SimplePie 1.7, use "SimplePie\Source" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_Source" class is deprecated since SimplePie 1.7.0, use "SimplePie\Source" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Source" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Source" instead */
class SimplePie_Source extends Source
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/XML/Declaration/Parser.php b/vendor/simplepie/simplepie/library/SimplePie/XML/Declaration/Parser.php
index f7be9f399..3bedaabe2 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/XML/Declaration/Parser.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/XML/Declaration/Parser.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\XML\Declaration\Parser;
class_exists('SimplePie\XML\Declaration\Parser');
-// @trigger_error(sprintf('Using the "SimplePie_XML_Declaration_Parser" class is deprecated since SimplePie 1.7, use "SimplePie\XML\Declaration\Parser" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_XML_Declaration_Parser" class is deprecated since SimplePie 1.7.0, use "SimplePie\XML\Declaration\Parser" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\XML\Declaration\Parser" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\XML\Declaration\Parser" instead */
class SimplePie_XML_Declaration_Parser extends Parser
{
}
diff --git a/vendor/simplepie/simplepie/library/SimplePie/gzdecode.php b/vendor/simplepie/simplepie/library/SimplePie/gzdecode.php
index ec97a1fe7..dea37ed47 100644
--- a/vendor/simplepie/simplepie/library/SimplePie/gzdecode.php
+++ b/vendor/simplepie/simplepie/library/SimplePie/gzdecode.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -45,10 +47,10 @@ use SimplePie\Gzdecode;
class_exists('SimplePie\Gzdecode');
-// @trigger_error(sprintf('Using the "SimplePie_gzdecode" class is deprecated since SimplePie 1.7, use "SimplePie\Gzdecode" instead.'), \E_USER_DEPRECATED);
+// @trigger_error(sprintf('Using the "SimplePie_gzdecode" class is deprecated since SimplePie 1.7.0, use "SimplePie\Gzdecode" instead.'), \E_USER_DEPRECATED);
if (\false) {
- /** @deprecated since SimplePie 1.7, use "SimplePie\Gzdecode" instead */
+ /** @deprecated since SimplePie 1.7.0, use "SimplePie\Gzdecode" instead */
class SimplePie_gzdecode extends Gzdecode
{
}
diff --git a/vendor/simplepie/simplepie/src/Author.php b/vendor/simplepie/simplepie/src/Author.php
index 0f7039a87..f82a021e2 100644
--- a/vendor/simplepie/simplepie/src/Author.php
+++ b/vendor/simplepie/simplepie/src/Author.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Cache.php b/vendor/simplepie/simplepie/src/Cache.php
index f91a9ca84..740091f08 100644
--- a/vendor/simplepie/simplepie/src/Cache.php
+++ b/vendor/simplepie/simplepie/src/Cache.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -43,6 +45,8 @@
namespace SimplePie;
+use SimplePie\Cache\Base;
+
/**
* Used to create cache objects
*
@@ -52,6 +56,7 @@ namespace SimplePie;
*
* @package SimplePie
* @subpackage Caching
+ * @deprecated since SimplePie 1.8.0, use "SimplePie\SimplePie::set_cache()" instead
*/
class Cache
{
@@ -81,8 +86,8 @@ class Cache
*
* @param string $location URL location (scheme is used to determine handler)
* @param string $filename Unique identifier for cache object
- * @param string $extension 'spi' or 'spc'
- * @return \SimplePie\Cache\Base Type of object depends on scheme of `$location`
+ * @param Base::TYPE_FEED|Base::TYPE_IMAGE $extension 'spi' or 'spc'
+ * @return Base Type of object depends on scheme of `$location`
*/
public static function get_handler($location, $filename, $extension)
{
@@ -99,11 +104,12 @@ class Cache
/**
* Create a new SimplePie\Cache object
*
- * @deprecated Use {@see get_handler} instead
+ * @deprecated since SimplePie 1.3.1, use {@see get_handler()} instead
*/
public function create($location, $filename, $extension)
{
- trigger_error('Cache::create() has been replaced with Cache::get_handler(). Switch to the registry system to use this.', E_USER_DEPRECATED);
+ trigger_error('Cache::create() has been replaced with Cache::get_handler() since SimplePie 1.3.1, use the registry system instead.', \E_USER_DEPRECATED);
+
return self::get_handler($location, $filename, $extension);
}
@@ -111,7 +117,7 @@ class Cache
* Register a handler
*
* @param string $type DSN type to register for
- * @param string $class Name of handler class. Must implement \SimplePie\Cache\Base
+ * @param class-string<Base> $class Name of handler class. Must implement Base
*/
public static function register($type, $class)
{
diff --git a/vendor/simplepie/simplepie/src/Cache/Base.php b/vendor/simplepie/simplepie/src/Cache/Base.php
index 08304648b..134d097fc 100644
--- a/vendor/simplepie/simplepie/src/Cache/Base.php
+++ b/vendor/simplepie/simplepie/src/Cache/Base.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -51,6 +53,7 @@ namespace SimplePie\Cache;
*
* @package SimplePie
* @subpackage Caching
+ * @deprecated since SimplePie 1.8.0, use "Psr\SimpleCache\CacheInterface" instead
*/
interface Base
{
@@ -59,28 +62,28 @@ interface Base
*
* @var string
*/
- const TYPE_FEED = 'spc';
+ public const TYPE_FEED = 'spc';
/**
* Image cache type
*
* @var string
*/
- const TYPE_IMAGE = 'spi';
+ public const TYPE_IMAGE = 'spi';
/**
* Create a new cache object
*
* @param string $location Location string (from SimplePie::$cache_location)
* @param string $name Unique ID for the cache
- * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
*/
public function __construct($location, $name, $type);
/**
* Save data to the cache
*
- * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
* @return bool Successfulness
*/
public function save($data);
diff --git a/vendor/simplepie/simplepie/src/Cache/BaseDataCache.php b/vendor/simplepie/simplepie/src/Cache/BaseDataCache.php
new file mode 100644
index 000000000..b8b239195
--- /dev/null
+++ b/vendor/simplepie/simplepie/src/Cache/BaseDataCache.php
@@ -0,0 +1,159 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package SimplePie
+ * @copyright 2004-2022 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+
+namespace SimplePie\Cache;
+
+use InvalidArgumentException;
+
+/**
+ * Adapter for deprecated \SimplePie\Cache\Base implementations
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ * @internal
+ */
+final class BaseDataCache implements DataCache
+{
+ /**
+ * @var Base
+ */
+ private $cache;
+
+ public function __construct(Base $cache)
+ {
+ $this->cache = $cache;
+ }
+
+ /**
+ * Fetches a value from the cache.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::get()
+ * <code>
+ * public function get(string $key, mixed $default = null): mixed;
+ * </code>
+ *
+ * @param string $key The unique key of this item in the cache.
+ * @param mixed $default Default value to return if the key does not exist.
+ *
+ * @return array|mixed The value of the item from the cache, or $default in case of cache miss.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function get_data(string $key, $default = null)
+ {
+ $data = $this->cache->load();
+
+ if (! is_array($data)) {
+ return $default;
+ }
+
+ // ignore data if internal cache expiration time is not set
+ if (! array_key_exists('__cache_expiration_time', $data)) {
+ return $default;
+ }
+
+ // ignore data if internal cache expiration time is expired
+ if ($data['__cache_expiration_time'] < time()) {
+ return $default;
+ }
+
+ // remove internal cache expiration time
+ unset($data['__cache_expiration_time']);
+
+ return $data;
+ }
+
+ /**
+ * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::set()
+ * <code>
+ * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
+ * </code>
+ *
+ * @param string $key The key of the item to store.
+ * @param array $value The value of the item to store, must be serializable.
+ * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and
+ * the driver supports TTL then the library may set a default value
+ * for it or let the driver take care of that.
+ *
+ * @return bool True on success and false on failure.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function set_data(string $key, array $value, ?int $ttl = null): bool
+ {
+ if ($ttl === null) {
+ $ttl = 3600;
+ }
+
+ // place internal cache expiration time
+ $value['__cache_expiration_time'] = time() + $ttl;
+
+ return $this->cache->save($value);
+ }
+
+ /**
+ * Delete an item from the cache by its unique key.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::delete()
+ * <code>
+ * public function delete(string $key): bool;
+ * </code>
+ *
+ * @param string $key The unique cache key of the item to delete.
+ *
+ * @return bool True if the item was successfully removed. False if there was an error.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function delete_data(string $key): bool
+ {
+ return $this->cache->unlink();
+ }
+}
diff --git a/vendor/simplepie/simplepie/src/Cache/CallableNameFilter.php b/vendor/simplepie/simplepie/src/Cache/CallableNameFilter.php
new file mode 100644
index 000000000..0583d0d9b
--- /dev/null
+++ b/vendor/simplepie/simplepie/src/Cache/CallableNameFilter.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package SimplePie
+ * @copyright 2004-2022 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+
+namespace SimplePie\Cache;
+
+/**
+ * Creating a cache filename with callables
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ */
+final class CallableNameFilter implements NameFilter
+{
+ /**
+ * @var callable
+ */
+ private $callable;
+
+ public function __construct(callable $callable)
+ {
+ $this->callable = $callable;
+ }
+
+ /**
+ * Method to create cache filename with.
+ *
+ * The returning name MUST follow the rules for keys in PSR-16.
+ *
+ * @link https://www.php-fig.org/psr/psr-16/
+ *
+ * The returning name MUST be a string of at least one character
+ * that uniquely identifies a cached item, MUST only contain the
+ * characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding
+ * and MUST not longer then 64 characters. The following characters
+ * are reserved for future extensions and MUST NOT be used: {}()/\@:
+ *
+ * A provided implementing library MAY support additional characters
+ * and encodings or longer lengths, but MUST support at least that
+ * minimum.
+ *
+ * @param string $name The name for the cache will be most likly an url with query string
+ *
+ * @return string the new cache name
+ */
+ public function filter(string $name): string
+ {
+ return call_user_func($this->callable, $name);
+ }
+}
diff --git a/vendor/simplepie/simplepie/src/Cache/DB.php b/vendor/simplepie/simplepie/src/Cache/DB.php
index 6bb37d283..7994e3210 100644
--- a/vendor/simplepie/simplepie/src/Cache/DB.php
+++ b/vendor/simplepie/simplepie/src/Cache/DB.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -48,6 +50,7 @@ namespace SimplePie\Cache;
*
* @package SimplePie
* @subpackage Caching
+ * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead
*/
abstract class DB implements Base
{
@@ -56,7 +59,7 @@ abstract class DB implements Base
*
* Converts a given {@see SimplePie} object into data to be stored
*
- * @param SimplePie $data
+ * @param \SimplePie\SimplePie $data
* @return array First item is the serialized data for storage, second item is the unique ID for this item
*/
protected static function prepare_simplepie_object_for_cache($data)
diff --git a/vendor/simplepie/simplepie/src/Cache/DataCache.php b/vendor/simplepie/simplepie/src/Cache/DataCache.php
new file mode 100644
index 000000000..bf3aebe90
--- /dev/null
+++ b/vendor/simplepie/simplepie/src/Cache/DataCache.php
@@ -0,0 +1,120 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package SimplePie
+ * @copyright 2004-2022 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+
+namespace SimplePie\Cache;
+
+use InvalidArgumentException;
+
+/**
+ * Subset of PSR-16 Cache client for caching data arrays
+ *
+ * Only get(), set() and delete() methods are used,
+ * but not has(), getMultiple(), setMultiple() or deleteMultiple().
+ *
+ * The methods names must be different, but should be compatible to the
+ * methods of \Psr\SimpleCache\CacheInterface.
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ * @internal
+ */
+interface DataCache
+{
+ /**
+ * Fetches a value from the cache.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::get()
+ * <code>
+ * public function get(string $key, mixed $default = null): mixed;
+ * </code>
+ *
+ * @param string $key The unique key of this item in the cache.
+ * @param mixed $default Default value to return if the key does not exist.
+ *
+ * @return array|mixed The value of the item from the cache, or $default in case of cache miss.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function get_data(string $key, $default = null);
+
+ /**
+ * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::set()
+ * <code>
+ * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
+ * </code>
+ *
+ * @param string $key The key of the item to store.
+ * @param array $value The value of the item to store, must be serializable.
+ * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and
+ * the driver supports TTL then the library may set a default value
+ * for it or let the driver take care of that.
+ *
+ * @return bool True on success and false on failure.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function set_data(string $key, array $value, ?int $ttl = null): bool;
+
+ /**
+ * Delete an item from the cache by its unique key.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::delete()
+ * <code>
+ * public function delete(string $key): bool;
+ * </code>
+ *
+ * @param string $key The unique cache key of the item to delete.
+ *
+ * @return bool True if the item was successfully removed. False if there was an error.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function delete_data(string $key): bool;
+}
diff --git a/vendor/simplepie/simplepie/src/Cache/File.php b/vendor/simplepie/simplepie/src/Cache/File.php
index b4076ba0a..248d41a8a 100644
--- a/vendor/simplepie/simplepie/src/Cache/File.php
+++ b/vendor/simplepie/simplepie/src/Cache/File.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -48,6 +50,7 @@ namespace SimplePie\Cache;
*
* @package SimplePie
* @subpackage Caching
+ * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead
*/
class File implements Base
{
@@ -85,7 +88,7 @@ class File implements Base
*
* @param string $location Location string (from SimplePie::$cache_location)
* @param string $name Unique ID for the cache
- * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
*/
public function __construct($location, $name, $type)
{
@@ -98,7 +101,7 @@ class File implements Base
/**
* Save data to the cache
*
- * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
* @return bool Successfulness
*/
public function save($data)
diff --git a/vendor/simplepie/simplepie/src/Cache/Memcache.php b/vendor/simplepie/simplepie/src/Cache/Memcache.php
index 36cf4b785..aeabd51b3 100644
--- a/vendor/simplepie/simplepie/src/Cache/Memcache.php
+++ b/vendor/simplepie/simplepie/src/Cache/Memcache.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -57,6 +59,7 @@ use Memcache as NativeMemcache;
* @package SimplePie
* @subpackage Caching
* @uses Memcache
+ * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead
*/
class Memcache implements Base
{
@@ -86,7 +89,7 @@ class Memcache implements Base
*
* @param string $location Location string (from SimplePie::$cache_location)
* @param string $name Unique ID for the cache
- * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
*/
public function __construct($location, $name, $type)
{
@@ -98,7 +101,7 @@ class Memcache implements Base
'prefix' => 'simplepie_',
],
];
- $this->options = \SimplePie\Misc::array_merge_recursive($this->options, \SimplePie\Cache::parse_URL($location));
+ $this->options = array_replace_recursive($this->options, \SimplePie\Cache::parse_URL($location));
$this->name = $this->options['extras']['prefix'] . md5("$name:$type");
@@ -109,7 +112,7 @@ class Memcache implements Base
/**
* Save data to the cache
*
- * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
* @return bool Successfulness
*/
public function save($data)
diff --git a/vendor/simplepie/simplepie/src/Cache/Memcached.php b/vendor/simplepie/simplepie/src/Cache/Memcached.php
index db58ddc02..4aa3701b5 100644
--- a/vendor/simplepie/simplepie/src/Cache/Memcached.php
+++ b/vendor/simplepie/simplepie/src/Cache/Memcached.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -58,6 +60,7 @@ use Memcached as NativeMemcached;
* @subpackage Caching
* @author Paul L. McNeely
* @uses Memcached
+ * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead
*/
class Memcached implements Base
{
@@ -82,8 +85,8 @@ class Memcached implements Base
/**
* Create a new cache object
* @param string $location Location string (from SimplePie::$cache_location)
- * @param string $name Unique ID for the cache
- * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ * @param string $name Unique ID for the cache
+ * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
*/
public function __construct($location, $name, $type)
{
@@ -95,7 +98,7 @@ class Memcached implements Base
'prefix' => 'simplepie_',
],
];
- $this->options = \SimplePie\Misc::array_merge_recursive($this->options, \SimplePie\Cache::parse_URL($location));
+ $this->options = array_replace_recursive($this->options, \SimplePie\Cache::parse_URL($location));
$this->name = $this->options['extras']['prefix'] . md5("$name:$type");
@@ -105,7 +108,7 @@ class Memcached implements Base
/**
* Save data to the cache
- * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
* @return bool Successfulness
*/
public function save($data)
diff --git a/vendor/simplepie/simplepie/src/Cache/MySQL.php b/vendor/simplepie/simplepie/src/Cache/MySQL.php
index 7d645b277..62abb12cd 100644
--- a/vendor/simplepie/simplepie/src/Cache/MySQL.php
+++ b/vendor/simplepie/simplepie/src/Cache/MySQL.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -54,13 +56,14 @@ namespace SimplePie\Cache;
*
* @package SimplePie
* @subpackage Caching
+ * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead
*/
class MySQL extends DB
{
/**
* PDO instance
*
- * @var PDO
+ * @var \PDO
*/
protected $mysql;
@@ -83,7 +86,7 @@ class MySQL extends DB
*
* @param string $location Location string (from SimplePie::$cache_location)
* @param string $name Unique ID for the cache
- * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
*/
public function __construct($location, $name, $type)
{
@@ -99,7 +102,7 @@ class MySQL extends DB
],
];
- $this->options = \SimplePie\Misc::array_merge_recursive($this->options, \SimplePie\Cache::parse_URL($location));
+ $this->options = array_replace_recursive($this->options, \SimplePie\Cache::parse_URL($location));
// Path is prefixed with a "/"
$this->options['dbname'] = substr($this->options['path'], 1);
@@ -145,7 +148,7 @@ class MySQL extends DB
/**
* Save data to the cache
*
- * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
* @return bool Successfulness
*/
public function save($data)
diff --git a/vendor/simplepie/simplepie/src/Cache/NameFilter.php b/vendor/simplepie/simplepie/src/Cache/NameFilter.php
new file mode 100644
index 000000000..19ce7b0a2
--- /dev/null
+++ b/vendor/simplepie/simplepie/src/Cache/NameFilter.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package SimplePie
+ * @copyright 2004-2022 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+
+namespace SimplePie\Cache;
+
+/**
+ * Interface for creating a cache filename
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ */
+interface NameFilter
+{
+ /**
+ * Method to create cache filename with.
+ *
+ * The returning name MUST follow the rules for keys in PSR-16.
+ *
+ * @link https://www.php-fig.org/psr/psr-16/
+ *
+ * The returning name MUST be a string of at least one character
+ * that uniquely identifies a cached item, MUST only contain the
+ * characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding
+ * and MUST not longer then 64 characters. The following characters
+ * are reserved for future extensions and MUST NOT be used: {}()/\@:
+ *
+ * A provided implementing library MAY support additional characters
+ * and encodings or longer lengths, but MUST support at least that
+ * minimum.
+ *
+ * @param string $name The name for the cache will be most likly an url with query string
+ *
+ * @return string the new cache name
+ */
+ public function filter(string $name): string;
+}
diff --git a/vendor/simplepie/simplepie/src/Cache/Psr16.php b/vendor/simplepie/simplepie/src/Cache/Psr16.php
new file mode 100644
index 000000000..710996b4d
--- /dev/null
+++ b/vendor/simplepie/simplepie/src/Cache/Psr16.php
@@ -0,0 +1,147 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package SimplePie
+ * @copyright 2004-2022 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+
+namespace SimplePie\Cache;
+
+use Psr\SimpleCache\CacheInterface;
+use Psr\SimpleCache\InvalidArgumentException;
+
+/**
+ * Caches data into a PSR-16 cache implementation
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ * @internal
+ */
+final class Psr16 implements DataCache
+{
+ /**
+ * PSR-16 cache implementation
+ *
+ * @var CacheInterface
+ */
+ private $cache;
+
+ /**
+ * PSR-16 cache implementation
+ *
+ * @param CacheInterface $cache
+ */
+ public function __construct(CacheInterface $cache)
+ {
+ $this->cache = $cache;
+ }
+
+ /**
+ * Fetches a value from the cache.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::get()
+ * <code>
+ * public function get(string $key, mixed $default = null): mixed;
+ * </code>
+ *
+ * @param string $key The unique key of this item in the cache.
+ * @param mixed $default Default value to return if the key does not exist.
+ *
+ * @return array|mixed The value of the item from the cache, or $default in case of cache miss.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function get_data(string $key, $default = null)
+ {
+ $data = $this->cache->get($key, $default);
+
+ if (! is_array($data) || $data === $default) {
+ return $default;
+ }
+
+ return $data;
+ }
+
+ /**
+ * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::set()
+ * <code>
+ * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
+ * </code>
+ *
+ * @param string $key The key of the item to store.
+ * @param array $value The value of the item to store, must be serializable.
+ * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and
+ * the driver supports TTL then the library may set a default value
+ * for it or let the driver take care of that.
+ *
+ * @return bool True on success and false on failure.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function set_data(string $key, array $value, ?int $ttl = null): bool
+ {
+ return $this->cache->set($key, $value, $ttl);
+ }
+
+ /**
+ * Delete an item from the cache by its unique key.
+ *
+ * Equivalent to \Psr\SimpleCache\CacheInterface::delete()
+ * <code>
+ * public function delete(string $key): bool;
+ * </code>
+ *
+ * @param string $key The unique cache key of the item to delete.
+ *
+ * @return bool True if the item was successfully removed. False if there was an error.
+ *
+ * @throws InvalidArgumentException
+ * MUST be thrown if the $key string is not a legal value.
+ */
+ public function delete_data(string $key): bool
+ {
+ return $this->cache->delete($key);
+ }
+}
diff --git a/vendor/simplepie/simplepie/src/Cache/Redis.php b/vendor/simplepie/simplepie/src/Cache/Redis.php
index 96f47f658..0effccadb 100644
--- a/vendor/simplepie/simplepie/src/Cache/Redis.php
+++ b/vendor/simplepie/simplepie/src/Cache/Redis.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -57,6 +59,7 @@ use Redis as NativeRedis;
* @package SimplePie
* @subpackage Caching
* @uses Redis
+ * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead
*/
class Redis implements Base
{
@@ -82,18 +85,11 @@ class Redis implements Base
protected $name;
/**
- * Cache Data
- *
- * @var type
- */
- protected $data;
-
- /**
* Create a new cache object
*
* @param string $location Location string (from SimplePie::$cache_location)
* @param string $name Unique ID for the cache
- * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
*/
public function __construct($location, $name, $options = null)
{
@@ -132,7 +128,7 @@ class Redis implements Base
/**
* Save data to the cache
*
- * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
* @return bool Successfulness
*/
public function save($data)
diff --git a/vendor/simplepie/simplepie/src/Caption.php b/vendor/simplepie/simplepie/src/Caption.php
index 0795115c9..467183239 100644
--- a/vendor/simplepie/simplepie/src/Caption.php
+++ b/vendor/simplepie/simplepie/src/Caption.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Category.php b/vendor/simplepie/simplepie/src/Category.php
index 351e93bed..b49b4fd96 100644
--- a/vendor/simplepie/simplepie/src/Category.php
+++ b/vendor/simplepie/simplepie/src/Category.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Content/Type/Sniffer.php b/vendor/simplepie/simplepie/src/Content/Type/Sniffer.php
index c74b0885e..33c27b64b 100644
--- a/vendor/simplepie/simplepie/src/Content/Type/Sniffer.php
+++ b/vendor/simplepie/simplepie/src/Content/Type/Sniffer.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Copyright.php b/vendor/simplepie/simplepie/src/Copyright.php
index d2840b184..878e4ffa4 100644
--- a/vendor/simplepie/simplepie/src/Copyright.php
+++ b/vendor/simplepie/simplepie/src/Copyright.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Credit.php b/vendor/simplepie/simplepie/src/Credit.php
index 9834c3da8..6b1402266 100644
--- a/vendor/simplepie/simplepie/src/Credit.php
+++ b/vendor/simplepie/simplepie/src/Credit.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Enclosure.php b/vendor/simplepie/simplepie/src/Enclosure.php
index 7ec92e67f..065577653 100644
--- a/vendor/simplepie/simplepie/src/Enclosure.php
+++ b/vendor/simplepie/simplepie/src/Enclosure.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -604,7 +606,7 @@ class Enclosure
public function get_link()
{
if ($this->link !== null) {
- return urldecode($this->link);
+ return $this->link;
}
return null;
@@ -875,6 +877,7 @@ class Enclosure
$widescreen = false;
$handler = $this->get_handler();
$type = $this->get_real_type();
+ $placeholder = '';
// Process options and reassign values as necessary
if (is_array($options)) {
diff --git a/vendor/simplepie/simplepie/src/Exception.php b/vendor/simplepie/simplepie/src/Exception.php
index 5c34c3483..a20681f55 100644
--- a/vendor/simplepie/simplepie/src/Exception.php
+++ b/vendor/simplepie/simplepie/src/Exception.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/File.php b/vendor/simplepie/simplepie/src/File.php
index 597661652..bdbf56927 100644
--- a/vendor/simplepie/simplepie/src/File.php
+++ b/vendor/simplepie/simplepie/src/File.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Gzdecode.php b/vendor/simplepie/simplepie/src/Gzdecode.php
index 786125e0b..67cbfefe0 100644
--- a/vendor/simplepie/simplepie/src/Gzdecode.php
+++ b/vendor/simplepie/simplepie/src/Gzdecode.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -202,6 +204,8 @@ class Gzdecode
public function parse()
{
if ($this->compressed_size >= $this->min_compressed_size) {
+ $len = 0;
+
// Check ID1, ID2, and CM
if (substr($this->compressed_data, 0, 3) !== "\x1F\x8B\x08") {
return false;
diff --git a/vendor/simplepie/simplepie/src/HTTP/Parser.php b/vendor/simplepie/simplepie/src/HTTP/Parser.php
index a36c32f4f..15c46ebe8 100644
--- a/vendor/simplepie/simplepie/src/HTTP/Parser.php
+++ b/vendor/simplepie/simplepie/src/HTTP/Parser.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -86,62 +88,33 @@ class Parser
*/
public $body = '';
- /**
- * @access private
- */
- const STATE_HTTP_VERSION = 'http_version';
- /**
- * @access private
- */
- const STATE_STATUS = 'status';
- /**
- * @access private
- */
- const STATE_REASON = 'reason';
- /**
- * @access private
- */
- const STATE_NEW_LINE = 'new_line';
- /**
- * @access private
- */
- const STATE_BODY = 'body';
- /**
- * @access private
- */
- const STATE_NAME = 'name';
- /**
- * @access private
- */
- const STATE_VALUE = 'value';
- /**
- * @access private
- */
- const STATE_VALUE_CHAR = 'value_char';
- /**
- * @access private
- */
- const STATE_QUOTE = 'quote';
- /**
- * @access private
- */
- const STATE_QUOTE_ESCAPED = 'quote_escaped';
- /**
- * @access private
- */
- const STATE_QUOTE_CHAR = 'quote_char';
- /**
- * @access private
- */
- const STATE_CHUNKED = 'chunked';
- /**
- * @access private
- */
- const STATE_EMIT = 'emit';
- /**
- * @access private
- */
- const STATE_ERROR = false;
+ private const STATE_HTTP_VERSION = 'http_version';
+
+ private const STATE_STATUS = 'status';
+
+ private const STATE_REASON = 'reason';
+
+ private const STATE_NEW_LINE = 'new_line';
+
+ private const STATE_BODY = 'body';
+
+ private const STATE_NAME = 'name';
+
+ private const STATE_VALUE = 'value';
+
+ private const STATE_VALUE_CHAR = 'value_char';
+
+ private const STATE_QUOTE = 'quote';
+
+ private const STATE_QUOTE_ESCAPED = 'quote_escaped';
+
+ private const STATE_QUOTE_CHAR = 'quote_char';
+
+ private const STATE_CHUNKED = 'chunked';
+
+ private const STATE_EMIT = 'emit';
+
+ private const STATE_ERROR = false;
/**
* Current state of the state machine
@@ -495,9 +468,12 @@ class Parser
}
$chunk_length = strlen($matches[0]);
- $decoded .= $part = substr($encoded, $chunk_length, $length);
+ $decoded .= substr($encoded, $chunk_length, $length);
$encoded = substr($encoded, $chunk_length + $length + 2);
+ // BC for PHP < 8.0: substr() can return bool instead of string
+ $encoded = ($encoded === false) ? '' : $encoded;
+
if (trim($encoded) === '0' || empty($encoded)) {
$this->state = self::STATE_EMIT;
$this->body = $decoded;
diff --git a/vendor/simplepie/simplepie/src/IRI.php b/vendor/simplepie/simplepie/src/IRI.php
index 09e8488f5..ce4c2c211 100644
--- a/vendor/simplepie/simplepie/src/IRI.php
+++ b/vendor/simplepie/simplepie/src/IRI.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -152,7 +154,7 @@ class IRI
if (method_exists($this, 'set_' . $name)) {
call_user_func([$this, 'set_' . $name], $value);
} elseif (
- $name === 'iauthority'
+ $name === 'iauthority'
|| $name === 'iuserinfo'
|| $name === 'ihost'
|| $name === 'ipath'
@@ -373,10 +375,10 @@ class IRI
// C: if the input buffer begins with a prefix of "/../" or "/..", where ".." is a complete path segment, then replace that prefix with "/" in the input buffer and remove the last segment and its preceding "/" (if any) from the output buffer; otherwise,
elseif (strpos($input, '/../') === 0) {
$input = substr($input, 3);
- $output = substr_replace($output, '', strrpos($output, '/'));
+ $output = substr_replace($output, '', intval(strrpos($output, '/')));
} elseif ($input === '/..') {
$input = '/';
- $output = substr_replace($output, '', strrpos($output, '/'));
+ $output = substr_replace($output, '', intval(strrpos($output, '/')));
}
// D: if the input buffer consists only of "." or "..", then remove that from the input buffer; otherwise,
elseif ($input === '.' || $input === '..') {
@@ -420,6 +422,7 @@ class IRI
$strlen = strlen($string);
while (($position += strspn($string, $extra_chars, $position)) < $strlen) {
$value = ord($string[$position]);
+ $character = 0;
// Start position
$start = $position;
@@ -489,13 +492,13 @@ class IRI
|| $character >= 0xFDD0 && $character <= 0xFDEF
|| (
// Everything else not in ucschar
- $character > 0xD7FF && $character < 0xF900
+ $character > 0xD7FF && $character < 0xF900
|| $character < 0xA0
|| $character > 0xEFFFD
)
&& (
// Everything not in iprivate, if it applies
- !$iprivate
+ !$iprivate
|| $character < 0xE000
|| $character > 0x10FFFD
)
@@ -538,6 +541,12 @@ class IRI
$string = '';
$remaining = 0;
+ // these variables will be initialized in the loop but PHPStan is not able to detect it currently
+ $start = 0;
+ $character = 0;
+ $length = 0;
+ $valid = true;
+
// Loop over each and every byte, and set $value to its value
for ($i = 1, $len = count($bytes); $i < $len; $i++) {
$value = hexdec($bytes[$i]);
@@ -717,14 +726,17 @@ class IRI
if ($iri === null) {
return true;
} elseif (isset($cache[$iri])) {
- list($this->scheme,
- $this->iuserinfo,
- $this->ihost,
- $this->port,
- $this->ipath,
- $this->iquery,
- $this->ifragment,
- $return) = $cache[$iri];
+ [
+ $this->scheme,
+ $this->iuserinfo,
+ $this->ihost,
+ $this->port,
+ $this->ipath,
+ $this->iquery,
+ $this->ifragment,
+ $return
+ ] = $cache[$iri];
+
return $return;
}
@@ -739,14 +751,17 @@ class IRI
&& $this->set_query($parsed['query'])
&& $this->set_fragment($parsed['fragment']);
- $cache[$iri] = [$this->scheme,
- $this->iuserinfo,
- $this->ihost,
- $this->port,
- $this->ipath,
- $this->iquery,
- $this->ifragment,
- $return];
+ $cache[$iri] = [
+ $this->scheme,
+ $this->iuserinfo,
+ $this->ihost,
+ $this->port,
+ $this->ipath,
+ $this->iquery,
+ $this->ifragment,
+ $return
+ ];
+
return $return;
}
@@ -794,10 +809,12 @@ class IRI
$this->port = null;
return true;
} elseif (isset($cache[$authority])) {
- list($this->iuserinfo,
- $this->ihost,
- $this->port,
- $return) = $cache[$authority];
+ [
+ $this->iuserinfo,
+ $this->ihost,
+ $this->port,
+ $return
+ ] = $cache[$authority];
return $return;
}
@@ -809,7 +826,7 @@ class IRI
} else {
$iuserinfo = null;
}
- if (($port_start = strpos($remaining, ':', strpos($remaining, ']'))) !== false) {
+ if (($port_start = strpos($remaining, ':', intval(strpos($remaining, ']')))) !== false) {
if (($port = substr($remaining, $port_start + 1)) === false) {
$port = null;
}
@@ -822,10 +839,12 @@ class IRI
$this->set_host($remaining) &&
$this->set_port($port);
- $cache[$authority] = [$this->iuserinfo,
- $this->ihost,
- $this->port,
- $return];
+ $cache[$authority] = [
+ $this->iuserinfo,
+ $this->ihost,
+ $this->port,
+ $return
+ ];
return $return;
}
diff --git a/vendor/simplepie/simplepie/src/Item.php b/vendor/simplepie/simplepie/src/Item.php
index 61fd35fa0..f25b50d04 100644
--- a/vendor/simplepie/simplepie/src/Item.php
+++ b/vendor/simplepie/simplepie/src/Item.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -53,7 +55,7 @@ namespace SimplePie;
* @package \SimplePie\SimplePie
* @subpackage API
*/
-class Item
+class Item implements RegistryAware
{
/**
* Parent feed
@@ -102,7 +104,7 @@ class Item
* @since 1.3
* @param \SimplePie\Registry $registry
*/
- public function set_registry(\SimplePie\Registry $registry)
+ public function set_registry(\SimplePie\Registry $registry)/* : void */
{
$this->registry = $registry;
}
@@ -253,9 +255,9 @@ class Item
{
if (!isset($this->data['title'])) {
if ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'title')) {
- $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'title')) {
- $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_10, 'title')) {
$this->data['title'] = $this->sanitize($return[0]['data'], \SimplePie\SimplePie::CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
} elseif ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_090, 'title')) {
@@ -291,10 +293,10 @@ class Item
public function get_description($description_only = false)
{
if (($tags = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'summary')) &&
- ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
+ ($return = $this->sanitize($tags[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
return $return;
} elseif (($tags = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'summary')) &&
- ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
+ ($return = $this->sanitize($tags[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
return $return;
} elseif (($tags = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_10, 'description')) &&
($return = $this->sanitize($tags[0]['data'], \SimplePie\SimplePie::CONSTRUCT_MAYBE_HTML, $this->get_base($tags[0])))) {
@@ -341,10 +343,10 @@ class Item
public function get_content($content_only = false)
{
if (($tags = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'content')) &&
- ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_content_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
+ ($return = $this->sanitize($tags[0]['data'], $this->registry->call(Misc::class, 'atom_10_content_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
return $return;
} elseif (($tags = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'content')) &&
- ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
+ ($return = $this->sanitize($tags[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$tags[0]['attribs']]), $this->get_base($tags[0])))) {
return $return;
} elseif (($tags = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_10_MODULES_CONTENT, 'encoded')) &&
($return = $this->sanitize($tags[0]['data'], \SimplePie\SimplePie::CONSTRUCT_HTML, $this->get_base($tags[0])))) {
@@ -368,7 +370,13 @@ class Item
{
if (!isset($this->data['thumbnail'])) {
if ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'thumbnail')) {
- $this->data['thumbnail'] = $return[0]['attribs'][''];
+ $thumbnail = $return[0]['attribs'][''];
+ if (empty($thumbnail['url'])) {
+ $this->data['thumbnail'] = null;
+ } else {
+ $thumbnail['url'] = $this->sanitize($thumbnail['url'], \SimplePie\SimplePie::CONSTRUCT_IRI, $this->get_base($return[0]));
+ $this->data['thumbnail'] = $thumbnail;
+ }
} else {
$this->data['thumbnail'] = null;
}
@@ -419,7 +427,7 @@ class Item
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, $label, $type]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, $label, $type]);
}
foreach ((array) $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_20, $type) as $category) {
// This is really the label, but keep this as the term also for BC.
@@ -430,15 +438,15 @@ class Item
} else {
$scheme = null;
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, null, $type]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, null, $type]);
}
$type = 'subject';
foreach ((array) $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_DC_11, $type) as $category) {
- $categories[] = $this->registry->create('Category', [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null, $type]);
+ $categories[] = $this->registry->create(Category::class, [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null, $type]);
}
foreach ((array) $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_DC_10, $type) as $category) {
- $categories[] = $this->registry->create('Category', [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null, $type]);
+ $categories[] = $this->registry->create(Category::class, [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null, $type]);
}
if (!empty($categories)) {
@@ -507,7 +515,7 @@ class Item
$email = $this->sanitize($contributor['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_10]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $uri !== null) {
- $contributors[] = $this->registry->create('Author', [$name, $uri, $email]);
+ $contributors[] = $this->registry->create(Author::class, [$name, $uri, $email]);
}
}
foreach ((array) $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'contributor') as $contributor) {
@@ -524,7 +532,7 @@ class Item
$email = $this->sanitize($contributor['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_03]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $url !== null) {
- $contributors[] = $this->registry->create('Author', [$name, $url, $email]);
+ $contributors[] = $this->registry->create(Author::class, [$name, $url, $email]);
}
}
@@ -560,7 +568,7 @@ class Item
$email = $this->sanitize($author['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_10]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $uri !== null) {
- $authors[] = $this->registry->create('Author', [$name, $uri, $email]);
+ $authors[] = $this->registry->create(Author::class, [$name, $uri, $email]);
}
}
if ($author = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'author')) {
@@ -577,20 +585,20 @@ class Item
$email = $this->sanitize($author[0]['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_03]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $url !== null) {
- $authors[] = $this->registry->create('Author', [$name, $url, $email]);
+ $authors[] = $this->registry->create(Author::class, [$name, $url, $email]);
}
}
if ($author = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_20, 'author')) {
- $authors[] = $this->registry->create('Author', [null, null, $this->sanitize($author[0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT)]);
+ $authors[] = $this->registry->create(Author::class, [null, null, $this->sanitize($author[0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT)]);
}
foreach ((array) $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_DC_11, 'creator') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_DC_10, 'creator') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ITUNES, 'author') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
if (!empty($authors)) {
@@ -615,7 +623,7 @@ class Item
public function get_copyright()
{
if ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'rights')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_DC_11, 'rights')) {
return $this->sanitize($return[0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
} elseif ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_DC_10, 'rights')) {
@@ -661,8 +669,8 @@ class Item
}
if (!empty($this->data['date']['raw'])) {
- $parser = $this->registry->call('Parse_Date', 'get');
- $this->data['date']['parsed'] = $parser->parse($this->data['date']['raw']);
+ $parser = $this->registry->call(Parse\Date::class, 'get');
+ $this->data['date']['parsed'] = $parser->parse($this->data['date']['raw']) ?: null;
} else {
$this->data['date'] = null;
}
@@ -703,8 +711,8 @@ class Item
}
if (!empty($this->data['updated']['raw'])) {
- $parser = $this->registry->call('Parse_Date', 'get');
- $this->data['updated']['parsed'] = $parser->parse($this->data['updated']['raw']);
+ $parser = $this->registry->call(Parse\Date::class, 'get');
+ $this->data['updated']['parsed'] = $parser->parse($this->data['updated']['raw']) ?: null;
} else {
$this->data['updated'] = null;
}
@@ -867,7 +875,7 @@ class Item
$keys = array_keys($this->data['links']);
foreach ($keys as $key) {
- if ($this->registry->call('Misc', 'is_isegment_nz_nc', [$key])) {
+ if ($this->registry->call(Misc::class, 'is_isegment_nz_nc', [$key])) {
if (isset($this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key])) {
$this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]);
$this->data['links'][$key] =& $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key];
@@ -967,7 +975,7 @@ class Item
if (isset($caption['data'])) {
$caption_text = $this->sanitize($caption['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $captions_parent[] = $this->registry->create('Caption', [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
+ $captions_parent[] = $this->registry->create(Caption::class, [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
}
} elseif ($captions = $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'text')) {
foreach ($captions as $caption) {
@@ -991,7 +999,7 @@ class Item
if (isset($caption['data'])) {
$caption_text = $this->sanitize($caption['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $captions_parent[] = $this->registry->create('Caption', [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
+ $captions_parent[] = $this->registry->create(Caption::class, [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
}
}
if (is_array($captions_parent)) {
@@ -1014,7 +1022,7 @@ class Item
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories_parent[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories_parent[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
foreach ((array) $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'category') as $category) {
$term = null;
@@ -1031,7 +1039,7 @@ class Item
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories_parent[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories_parent[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
foreach ((array) $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_ITUNES, 'category') as $category) {
$term = null;
@@ -1040,14 +1048,14 @@ class Item
if (isset($category['attribs']['']['text'])) {
$label = $this->sanitize($category['attribs']['']['text'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories_parent[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories_parent[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
if (isset($category['child'][\SimplePie\SimplePie::NAMESPACE_ITUNES]['category'])) {
foreach ((array) $category['child'][\SimplePie\SimplePie::NAMESPACE_ITUNES]['category'] as $subcategory) {
if (isset($subcategory['attribs']['']['text'])) {
$label = $this->sanitize($subcategory['attribs']['']['text'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories_parent[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories_parent[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
}
}
@@ -1065,7 +1073,7 @@ class Item
if (isset($copyright[0]['data'])) {
$copyright_label = $this->sanitize($copyright[0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $copyrights_parent = $this->registry->create('Copyright', [$copyright_url, $copyright_label]);
+ $copyrights_parent = $this->registry->create(Copyright::class, [$copyright_url, $copyright_label]);
} elseif ($copyright = $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'copyright')) {
$copyright_url = null;
$copyright_label = null;
@@ -1075,7 +1083,7 @@ class Item
if (isset($copyright[0]['data'])) {
$copyright_label = $this->sanitize($copyright[0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $copyrights_parent = $this->registry->create('Copyright', [$copyright_url, $copyright_label]);
+ $copyrights_parent = $this->registry->create(Copyright::class, [$copyright_url, $copyright_label]);
}
// CREDITS
@@ -1095,7 +1103,7 @@ class Item
if (isset($credit['data'])) {
$credit_name = $this->sanitize($credit['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $credits_parent[] = $this->registry->create('Credit', [$credit_role, $credit_scheme, $credit_name]);
+ $credits_parent[] = $this->registry->create(Credit::class, [$credit_role, $credit_scheme, $credit_name]);
}
} elseif ($credits = $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'credit')) {
foreach ($credits as $credit) {
@@ -1113,7 +1121,7 @@ class Item
if (isset($credit['data'])) {
$credit_name = $this->sanitize($credit['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $credits_parent[] = $this->registry->create('Credit', [$credit_role, $credit_scheme, $credit_name]);
+ $credits_parent[] = $this->registry->create(Credit::class, [$credit_role, $credit_scheme, $credit_name]);
}
}
if (is_array($credits_parent)) {
@@ -1250,7 +1258,7 @@ class Item
if (isset($rating['data'])) {
$rating_value = $this->sanitize($rating['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $ratings_parent[] = $this->registry->create('Rating', [$rating_scheme, $rating_value]);
+ $ratings_parent[] = $this->registry->create(Rating::class, [$rating_scheme, $rating_value]);
}
} elseif ($ratings = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ITUNES, 'explicit')) {
foreach ($ratings as $rating) {
@@ -1259,7 +1267,7 @@ class Item
if (isset($rating['data'])) {
$rating_value = $this->sanitize($rating['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $ratings_parent[] = $this->registry->create('Rating', [$rating_scheme, $rating_value]);
+ $ratings_parent[] = $this->registry->create(Rating::class, [$rating_scheme, $rating_value]);
}
} elseif ($ratings = $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'rating')) {
foreach ($ratings as $rating) {
@@ -1273,7 +1281,7 @@ class Item
if (isset($rating['data'])) {
$rating_value = $this->sanitize($rating['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $ratings_parent[] = $this->registry->create('Rating', [$rating_scheme, $rating_value]);
+ $ratings_parent[] = $this->registry->create(Rating::class, [$rating_scheme, $rating_value]);
}
} elseif ($ratings = $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_ITUNES, 'explicit')) {
foreach ($ratings as $rating) {
@@ -1282,7 +1290,7 @@ class Item
if (isset($rating['data'])) {
$rating_value = $this->sanitize($rating['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $ratings_parent[] = $this->registry->create('Rating', [$rating_scheme, $rating_value]);
+ $ratings_parent[] = $this->registry->create(Rating::class, [$rating_scheme, $rating_value]);
}
}
if (is_array($ratings_parent)) {
@@ -1304,7 +1312,7 @@ class Item
if (isset($restriction['data'])) {
$restriction_value = $this->sanitize($restriction['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $restrictions_parent[] = $this->registry->create('Restriction', [$restriction_relationship, $restriction_type, $restriction_value]);
+ $restrictions_parent[] = $this->registry->create(Restriction::class, [$restriction_relationship, $restriction_type, $restriction_value]);
}
} elseif ($restrictions = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ITUNES, 'block')) {
foreach ($restrictions as $restriction) {
@@ -1314,7 +1322,7 @@ class Item
if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes') {
$restriction_relationship = 'deny';
}
- $restrictions_parent[] = $this->registry->create('Restriction', [$restriction_relationship, $restriction_type, $restriction_value]);
+ $restrictions_parent[] = $this->registry->create(Restriction::class, [$restriction_relationship, $restriction_type, $restriction_value]);
}
} elseif ($restrictions = $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'restriction')) {
foreach ($restrictions as $restriction) {
@@ -1330,7 +1338,7 @@ class Item
if (isset($restriction['data'])) {
$restriction_value = $this->sanitize($restriction['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $restrictions_parent[] = $this->registry->create('Restriction', [$restriction_relationship, $restriction_type, $restriction_value]);
+ $restrictions_parent[] = $this->registry->create(Restriction::class, [$restriction_relationship, $restriction_type, $restriction_value]);
}
} elseif ($restrictions = $parent->get_channel_tags(\SimplePie\SimplePie::NAMESPACE_ITUNES, 'block')) {
foreach ($restrictions as $restriction) {
@@ -1340,7 +1348,7 @@ class Item
if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes') {
$restriction_relationship = 'deny';
}
- $restrictions_parent[] = $this->registry->create('Restriction', [$restriction_relationship, $restriction_type, $restriction_value]);
+ $restrictions_parent[] = $this->registry->create(Restriction::class, [$restriction_relationship, $restriction_type, $restriction_value]);
}
}
if (is_array($restrictions_parent)) {
@@ -1510,7 +1518,7 @@ class Item
if (isset($caption['data'])) {
$caption_text = $this->sanitize($caption['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $captions[] = $this->registry->create('Caption', [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
+ $captions[] = $this->registry->create(Caption::class, [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
}
if (is_array($captions)) {
$captions = array_values(array_unique($captions));
@@ -1537,7 +1545,7 @@ class Item
if (isset($caption['data'])) {
$caption_text = $this->sanitize($caption['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $captions[] = $this->registry->create('Caption', [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
+ $captions[] = $this->registry->create(Caption::class, [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
}
if (is_array($captions)) {
$captions = array_values(array_unique($captions));
@@ -1563,7 +1571,7 @@ class Item
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
}
if (isset($group['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['category'])) {
@@ -1582,7 +1590,7 @@ class Item
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
}
if (is_array($categories) && is_array($categories_parent)) {
@@ -1603,7 +1611,7 @@ class Item
if (isset($content['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['copyright'][0]['data'])) {
$copyright_label = $this->sanitize($content['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['copyright'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $copyrights = $this->registry->create('Copyright', [$copyright_url, $copyright_label]);
+ $copyrights = $this->registry->create(Copyright::class, [$copyright_url, $copyright_label]);
} elseif (isset($group['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['copyright'])) {
$copyright_url = null;
$copyright_label = null;
@@ -1613,7 +1621,7 @@ class Item
if (isset($group['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['copyright'][0]['data'])) {
$copyright_label = $this->sanitize($group['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['copyright'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $copyrights = $this->registry->create('Copyright', [$copyright_url, $copyright_label]);
+ $copyrights = $this->registry->create(Copyright::class, [$copyright_url, $copyright_label]);
} else {
$copyrights = $copyrights_parent;
}
@@ -1635,7 +1643,7 @@ class Item
if (isset($credit['data'])) {
$credit_name = $this->sanitize($credit['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $credits[] = $this->registry->create('Credit', [$credit_role, $credit_scheme, $credit_name]);
+ $credits[] = $this->registry->create(Credit::class, [$credit_role, $credit_scheme, $credit_name]);
}
if (is_array($credits)) {
$credits = array_values(array_unique($credits));
@@ -1656,7 +1664,7 @@ class Item
if (isset($credit['data'])) {
$credit_name = $this->sanitize($credit['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $credits[] = $this->registry->create('Credit', [$credit_role, $credit_scheme, $credit_name]);
+ $credits[] = $this->registry->create(Credit::class, [$credit_role, $credit_scheme, $credit_name]);
}
if (is_array($credits)) {
$credits = array_values(array_unique($credits));
@@ -1762,7 +1770,7 @@ class Item
if (isset($rating['data'])) {
$rating_value = $this->sanitize($rating['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $ratings[] = $this->registry->create('Rating', [$rating_scheme, $rating_value]);
+ $ratings[] = $this->registry->create(Rating::class, [$rating_scheme, $rating_value]);
}
if (is_array($ratings)) {
$ratings = array_values(array_unique($ratings));
@@ -1779,7 +1787,7 @@ class Item
if (isset($rating['data'])) {
$rating_value = $this->sanitize($rating['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $ratings[] = $this->registry->create('Rating', [$rating_scheme, $rating_value]);
+ $ratings[] = $this->registry->create(Rating::class, [$rating_scheme, $rating_value]);
}
if (is_array($ratings)) {
$ratings = array_values(array_unique($ratings));
@@ -1803,7 +1811,7 @@ class Item
if (isset($restriction['data'])) {
$restriction_value = $this->sanitize($restriction['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $restrictions[] = $this->registry->create('Restriction', [$restriction_relationship, $restriction_type, $restriction_value]);
+ $restrictions[] = $this->registry->create(Restriction::class, [$restriction_relationship, $restriction_type, $restriction_value]);
}
if (is_array($restrictions)) {
$restrictions = array_values(array_unique($restrictions));
@@ -1822,7 +1830,7 @@ class Item
if (isset($restriction['data'])) {
$restriction_value = $this->sanitize($restriction['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $restrictions[] = $this->registry->create('Restriction', [$restriction_relationship, $restriction_type, $restriction_value]);
+ $restrictions[] = $this->registry->create(Restriction::class, [$restriction_relationship, $restriction_type, $restriction_value]);
}
if (is_array($restrictions)) {
$restrictions = array_values(array_unique($restrictions));
@@ -1859,7 +1867,7 @@ class Item
$title = $title_parent;
}
- $this->data['enclosures'][] = $this->registry->create('Enclosure', [$url, $type, $length, null, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width]);
+ $this->data['enclosures'][] = $this->registry->create(Enclosure::class, [$url, $type, $length, null, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width]);
}
}
}
@@ -1966,7 +1974,7 @@ class Item
if (isset($caption['data'])) {
$caption_text = $this->sanitize($caption['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $captions[] = $this->registry->create('Caption', [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
+ $captions[] = $this->registry->create(Caption::class, [$caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text]);
}
if (is_array($captions)) {
$captions = array_values(array_unique($captions));
@@ -1992,7 +2000,7 @@ class Item
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
}
if (is_array($categories) && is_array($categories_parent)) {
@@ -2015,7 +2023,7 @@ class Item
if (isset($content['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['copyright'][0]['data'])) {
$copyright_label = $this->sanitize($content['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['copyright'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $copyrights = $this->registry->create('Copyright', [$copyright_url, $copyright_label]);
+ $copyrights = $this->registry->create(Copyright::class, [$copyright_url, $copyright_label]);
} else {
$copyrights = $copyrights_parent;
}
@@ -2037,7 +2045,7 @@ class Item
if (isset($credit['data'])) {
$credit_name = $this->sanitize($credit['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $credits[] = $this->registry->create('Credit', [$credit_role, $credit_scheme, $credit_name]);
+ $credits[] = $this->registry->create(Credit::class, [$credit_role, $credit_scheme, $credit_name]);
}
if (is_array($credits)) {
$credits = array_values(array_unique($credits));
@@ -2113,7 +2121,7 @@ class Item
if (isset($rating['data'])) {
$rating_value = $this->sanitize($rating['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $ratings[] = $this->registry->create('Rating', [$rating_scheme, $rating_value]);
+ $ratings[] = $this->registry->create(Rating::class, [$rating_scheme, $rating_value]);
}
if (is_array($ratings)) {
$ratings = array_values(array_unique($ratings));
@@ -2137,7 +2145,7 @@ class Item
if (isset($restriction['data'])) {
$restriction_value = $this->sanitize($restriction['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $restrictions[] = $this->registry->create('Restriction', [$restriction_relationship, $restriction_type, $restriction_value]);
+ $restrictions[] = $this->registry->create(Restriction::class, [$restriction_relationship, $restriction_type, $restriction_value]);
}
if (is_array($restrictions)) {
$restrictions = array_values(array_unique($restrictions));
@@ -2167,7 +2175,7 @@ class Item
$title = $title_parent;
}
- $this->data['enclosures'][] = $this->registry->create('Enclosure', [$url, $type, $length, null, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width]);
+ $this->data['enclosures'][] = $this->registry->create(Enclosure::class, [$url, $type, $length, null, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width]);
}
}
}
@@ -2204,7 +2212,7 @@ class Item
}
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] = $this->registry->create('Enclosure', [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title, $width]);
+ $this->data['enclosures'][] = $this->registry->create(Enclosure::class, [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title, $width]);
}
}
@@ -2235,12 +2243,12 @@ class Item
}
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] = $this->registry->create('Enclosure', [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width]);
+ $this->data['enclosures'][] = $this->registry->create(Enclosure::class, [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width]);
}
}
- if ($enclosure = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_20, 'enclosure')) {
- if (isset($enclosure[0]['attribs']['']['url'])) {
+ foreach ($this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_RSS_20, 'enclosure') ?? [] as $enclosure) {
+ if (isset($enclosure['attribs']['']['url'])) {
// Attributes
$bitrate = null;
$channels = null;
@@ -2257,23 +2265,23 @@ class Item
$url = null;
$width = null;
- $url = $this->sanitize($enclosure[0]['attribs']['']['url'], \SimplePie\SimplePie::CONSTRUCT_IRI, $this->get_base($enclosure[0]));
+ $url = $this->sanitize($enclosure['attribs']['']['url'], \SimplePie\SimplePie::CONSTRUCT_IRI, $this->get_base($enclosure));
$url = $this->feed->sanitize->https_url($url);
- if (isset($enclosure[0]['attribs']['']['type'])) {
- $type = $this->sanitize($enclosure[0]['attribs']['']['type'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
+ if (isset($enclosure['attribs']['']['type'])) {
+ $type = $this->sanitize($enclosure['attribs']['']['type'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- if (isset($enclosure[0]['attribs']['']['length'])) {
- $length = intval($enclosure[0]['attribs']['']['length']);
+ if (isset($enclosure['attribs']['']['length'])) {
+ $length = intval($enclosure['attribs']['']['length']);
}
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] = $this->registry->create('Enclosure', [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width]);
+ $this->data['enclosures'][] = $this->registry->create(Enclosure::class, [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width]);
}
}
if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width)) {
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] = $this->registry->create('Enclosure', [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width]);
+ $this->data['enclosures'][] = $this->registry->create(Enclosure::class, [$url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width]);
}
$this->data['enclosures'] = array_values(array_unique($this->data['enclosures']));
@@ -2342,7 +2350,7 @@ class Item
public function get_source()
{
if ($return = $this->get_item_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'source')) {
- return $this->registry->create('Source', [$this, $return[0]]);
+ return $this->registry->create(Source::class, [$this, $return[0]]);
}
return null;
diff --git a/vendor/simplepie/simplepie/src/Locator.php b/vendor/simplepie/simplepie/src/Locator.php
index 2eebf10df..1dc005b47 100644
--- a/vendor/simplepie/simplepie/src/Locator.php
+++ b/vendor/simplepie/simplepie/src/Locator.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -51,7 +53,7 @@ namespace SimplePie;
*
* @package SimplePie
*/
-class Locator
+class Locator implements RegistryAware
{
public $useragent;
public $timeout;
@@ -93,7 +95,7 @@ class Locator
}
}
- public function set_registry(\SimplePie\Registry $registry)
+ public function set_registry(\SimplePie\Registry $registry)/* : void */
{
$this->registry = $registry;
}
@@ -105,7 +107,7 @@ class Locator
}
if ($this->file->method & \SimplePie\SimplePie::FILE_SOURCE_REMOTE) {
- $sniffer = $this->registry->create('Content_Type_Sniffer', [$this->file]);
+ $sniffer = $this->registry->create(Content\Type\Sniffer::class, [$this->file]);
if ($sniffer->get_type() !== 'text/html') {
return null;
}
@@ -142,7 +144,7 @@ class Locator
public function is_feed($file, $check_html = false)
{
if ($file->method & \SimplePie\SimplePie::FILE_SOURCE_REMOTE) {
- $sniffer = $this->registry->create('Content_Type_Sniffer', [$file]);
+ $sniffer = $this->registry->create(Content\Type\Sniffer::class, [$file]);
$sniffed = $sniffer->get_type();
$mime_types = ['application/rss+xml', 'application/rdf+xml',
'text/rdf', 'application/atom+xml', 'text/xml',
@@ -169,7 +171,7 @@ class Locator
$elements = $this->dom->getElementsByTagName('base');
foreach ($elements as $element) {
if ($element->hasAttribute('href')) {
- $base = $this->registry->call('Misc', 'absolutize_url', [trim($element->getAttribute('href')), $this->http_base]);
+ $base = $this->registry->call(Misc::class, 'absolutize_url', [trim($element->getAttribute('href')), $this->http_base]);
if ($base === false) {
continue;
}
@@ -207,24 +209,24 @@ class Locator
break;
}
if ($link->hasAttribute('href') && $link->hasAttribute('rel')) {
- $rel = array_unique($this->registry->call('Misc', 'space_separated_tokens', [strtolower($link->getAttribute('rel'))]));
+ $rel = array_unique($this->registry->call(Misc::class, 'space_separated_tokens', [strtolower($link->getAttribute('rel'))]));
$line = method_exists($link, 'getLineNo') ? $link->getLineNo() : 1;
if ($this->base_location < $line) {
- $href = $this->registry->call('Misc', 'absolutize_url', [trim($link->getAttribute('href')), $this->base]);
+ $href = $this->registry->call(Misc::class, 'absolutize_url', [trim($link->getAttribute('href')), $this->base]);
} else {
- $href = $this->registry->call('Misc', 'absolutize_url', [trim($link->getAttribute('href')), $this->http_base]);
+ $href = $this->registry->call(Misc::class, 'absolutize_url', [trim($link->getAttribute('href')), $this->http_base]);
}
if ($href === false) {
continue;
}
- if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !in_array('stylesheet', $rel) && $link->hasAttribute('type') && in_array(strtolower($this->registry->call('Misc', 'parse_mime', [$link->getAttribute('type')])), ['text/html', 'application/rss+xml', 'application/atom+xml'])) && !isset($feeds[$href])) {
+ if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !in_array('stylesheet', $rel) && $link->hasAttribute('type') && in_array(strtolower($this->registry->call(Misc::class, 'parse_mime', [$link->getAttribute('type')])), ['text/html', 'application/rss+xml', 'application/atom+xml'])) && !isset($feeds[$href])) {
$this->checked_feeds++;
$headers = [
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
];
- $feed = $this->registry->create('File', [$href, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
+ $feed = $this->registry->create(File::class, [$href, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
if ($feed->success && ($feed->method & \SimplePie\SimplePie::FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed, true)) {
$feeds[$href] = $feed;
}
@@ -246,18 +248,18 @@ class Locator
foreach ($links as $link) {
if ($link->hasAttribute('href')) {
$href = trim($link->getAttribute('href'));
- $parsed = $this->registry->call('Misc', 'parse_url', [$href]);
+ $parsed = $this->registry->call(Misc::class, 'parse_url', [$href]);
if ($parsed['scheme'] === '' || preg_match('/^(https?|feed)?$/i', $parsed['scheme'])) {
if (method_exists($link, 'getLineNo') && $this->base_location < $link->getLineNo()) {
- $href = $this->registry->call('Misc', 'absolutize_url', [trim($link->getAttribute('href')), $this->base]);
+ $href = $this->registry->call(Misc::class, 'absolutize_url', [trim($link->getAttribute('href')), $this->base]);
} else {
- $href = $this->registry->call('Misc', 'absolutize_url', [trim($link->getAttribute('href')), $this->http_base]);
+ $href = $this->registry->call(Misc::class, 'absolutize_url', [trim($link->getAttribute('href')), $this->http_base]);
}
if ($href === false) {
continue;
}
- $current = $this->registry->call('Misc', 'parse_url', [$this->file->url]);
+ $current = $this->registry->call(Misc::class, 'parse_url', [$this->file->url]);
if ($parsed['authority'] === '' || $parsed['authority'] === $current['authority']) {
$this->local[] = $href;
@@ -290,26 +292,22 @@ class Locator
$query = '//a[@rel and @href] | //link[@rel and @href]';
foreach ($xpath->query($query) as $link) {
$href = trim($link->getAttribute('href'));
- $parsed = $this->registry->call('Misc', 'parse_url', [$href]);
+ $parsed = $this->registry->call(Misc::class, 'parse_url', [$href]);
if ($parsed['scheme'] === '' ||
preg_match('/^https?$/i', $parsed['scheme'])) {
if (method_exists($link, 'getLineNo') &&
$this->base_location < $link->getLineNo()) {
- $href =
- $this->registry->call(
- 'Misc',
- 'absolutize_url',
- [trim($link->getAttribute('href')),
- $this->base]
- );
+ $href = $this->registry->call(
+ Misc::class,
+ 'absolutize_url',
+ [trim($link->getAttribute('href')), $this->base]
+ );
} else {
- $href =
- $this->registry->call(
- 'Misc',
- 'absolutize_url',
- [trim($link->getAttribute('href')),
- $this->http_base]
- );
+ $href = $this->registry->call(
+ Misc::class,
+ 'absolutize_url',
+ [trim($link->getAttribute('href')), $this->http_base]
+ );
}
if ($href === false) {
return null;
@@ -335,7 +333,7 @@ class Locator
$headers = [
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
];
- $feed = $this->registry->create('File', [$value, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
+ $feed = $this->registry->create(File::class, [$value, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
if ($feed->success && ($feed->method & \SimplePie\SimplePie::FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) {
return [$feed];
} else {
@@ -357,7 +355,7 @@ class Locator
$headers = [
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
];
- $feed = $this->registry->create('File', [$value, $this->timeout, 5, null, $this->useragent, $this->force_fsockopen, $this->curl_options]);
+ $feed = $this->registry->create(File::class, [$value, $this->timeout, 5, null, $this->useragent, $this->force_fsockopen, $this->curl_options]);
if ($feed->success && ($feed->method & \SimplePie\SimplePie::FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) {
return [$feed];
} else {
diff --git a/vendor/simplepie/simplepie/src/Misc.php b/vendor/simplepie/simplepie/src/Misc.php
index b40a1b8ef..87d7f6e2c 100644
--- a/vendor/simplepie/simplepie/src/Misc.php
+++ b/vendor/simplepie/simplepie/src/Misc.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -43,6 +45,8 @@
namespace SimplePie;
+use SimplePie\XML\Declaration\Parser;
+
/**
* Miscellaneous utilities
*
@@ -89,14 +93,14 @@ class Misc
/**
* Get a HTML/XML element from a HTML string
*
- * @deprecated Use DOMDocument instead (parsing HTML with regex is bad!)
+ * @deprecated since SimplePie 1.3, use DOMDocument instead (parsing HTML with regex is bad!)
* @param string $realname Element name (including namespace prefix if applicable)
* @param string $string HTML document
* @return array
*/
public static function get_element($realname, $string)
{
- // trigger_error(sprintf('Using method "' . __METHOD__ . '" is deprecated since SimplePie 1.7, use "DOMDocument" instead.'), \E_USER_DEPRECATED);
+ // trigger_error(sprintf('Using method "' . __METHOD__ . '" is deprecated since SimplePie 1.3, use "DOMDocument" instead.'), \E_USER_DEPRECATED);
$return = [];
$name = preg_quote($realname, '/');
@@ -142,7 +146,7 @@ class Misc
public static function error($message, $level, $file, $line)
{
- if ((ini_get('error_reporting') & $level) > 0) {
+ if ((error_reporting() & $level) > 0) {
switch ($level) {
case E_USER_ERROR:
$note = 'PHP Error';
@@ -199,6 +203,9 @@ class Misc
return $url;
}
+ /**
+ * @deprecated since SimplePie 1.8.0, use PHP native array_replace_recursive() instead.
+ */
public static function array_merge_recursive($array1, $array2)
{
foreach ($array2 as $key => $value) {
@@ -1724,13 +1731,13 @@ class Misc
/**
* Decode HTML entities
*
- * @deprecated Use DOMDocument instead
+ * @deprecated since SimplePie 1.3, use DOMDocument instead
* @param string $data Input data
* @return string Output data
*/
public static function entities_decode($data)
{
- // trigger_error(sprintf('Using method "' . __METHOD__ . '" is deprecated since SimplePie 1.7, use "DOMDocument" instead.'), \E_USER_DEPRECATED);
+ // trigger_error(sprintf('Using method "' . __METHOD__ . '" is deprecated since SimplePie 1.3, use "DOMDocument" instead.'), \E_USER_DEPRECATED);
$decoder = new \SimplePie_Decode_HTML_Entities($data);
return $decoder->parse();
@@ -1796,7 +1803,7 @@ class Misc
public static function atom_03_construct_type($attribs)
{
- if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64')) {
+ if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode'])) === 'base64') {
$mode = \SimplePie\SimplePie::CONSTRUCT_BASE64;
} else {
$mode = \SimplePie\SimplePie::CONSTRUCT_NONE;
@@ -1933,7 +1940,7 @@ class Misc
foreach ($str as $section) {
if (strpos($section, '=') !== false) {
- list($name, $value) = explode('=', $section, 2);
+ [$name, $value] = explode('=', $section, 2);
$return[urldecode($name)][] = urldecode($value);
} else {
$return[urldecode($section)][] = null;
@@ -1976,7 +1983,7 @@ class Misc
// UTF-32 Big Endian Without BOM
elseif (substr($data, 0, 20) === "\x00\x00\x00\x3C\x00\x00\x00\x3F\x00\x00\x00\x78\x00\x00\x00\x6D\x00\x00\x00\x6C") {
if ($pos = strpos($data, "\x00\x00\x00\x3F\x00\x00\x00\x3E")) {
- $parser = $registry->create('XML_Declaration_Parser', [Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8')]);
+ $parser = $registry->create(Parser::class, [Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8')]);
if ($parser->parse()) {
$encoding[] = $parser->encoding;
}
@@ -1986,7 +1993,7 @@ class Misc
// UTF-32 Little Endian Without BOM
elseif (substr($data, 0, 20) === "\x3C\x00\x00\x00\x3F\x00\x00\x00\x78\x00\x00\x00\x6D\x00\x00\x00\x6C\x00\x00\x00") {
if ($pos = strpos($data, "\x3F\x00\x00\x00\x3E\x00\x00\x00")) {
- $parser = $registry->create('XML_Declaration_Parser', [Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8')]);
+ $parser = $registry->create(Parser::class, [Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8')]);
if ($parser->parse()) {
$encoding[] = $parser->encoding;
}
@@ -1996,7 +2003,7 @@ class Misc
// UTF-16 Big Endian Without BOM
elseif (substr($data, 0, 10) === "\x00\x3C\x00\x3F\x00\x78\x00\x6D\x00\x6C") {
if ($pos = strpos($data, "\x00\x3F\x00\x3E")) {
- $parser = $registry->create('XML_Declaration_Parser', [Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8')]);
+ $parser = $registry->create(Parser::class, [Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8')]);
if ($parser->parse()) {
$encoding[] = $parser->encoding;
}
@@ -2006,7 +2013,7 @@ class Misc
// UTF-16 Little Endian Without BOM
elseif (substr($data, 0, 10) === "\x3C\x00\x3F\x00\x78\x00\x6D\x00\x6C\x00") {
if ($pos = strpos($data, "\x3F\x00\x3E\x00")) {
- $parser = $registry->create('XML_Declaration_Parser', [Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8')]);
+ $parser = $registry->create(Parser::class, [Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8')]);
if ($parser->parse()) {
$encoding[] = $parser->encoding;
}
@@ -2016,7 +2023,7 @@ class Misc
// US-ASCII (or superset)
elseif (substr($data, 0, 5) === "\x3C\x3F\x78\x6D\x6C") {
if ($pos = strpos($data, "\x3F\x3E")) {
- $parser = $registry->create('XML_Declaration_Parser', [substr($data, 5, $pos - 5)]);
+ $parser = $registry->create(Parser::class, [substr($data, 5, $pos - 5)]);
if ($parser->parse()) {
$encoding[] = $parser->encoding;
}
@@ -2076,7 +2083,7 @@ END;
return static::$SIMPLEPIE_BUILD;
}
- $root = dirname(dirname(__FILE__));
+ $root = dirname(__FILE__, 2);
if (file_exists($root . '/.git/index')) {
static::$SIMPLEPIE_BUILD = filemtime($root . '/.git/index');
diff --git a/vendor/simplepie/simplepie/src/Net/IPv6.php b/vendor/simplepie/simplepie/src/Net/IPv6.php
index 8f192cbfb..da25f8353 100644
--- a/vendor/simplepie/simplepie/src/Net/IPv6.php
+++ b/vendor/simplepie/simplepie/src/Net/IPv6.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -81,7 +83,7 @@ class IPv6
$c1 = -1;
$c2 = -1;
if (substr_count($ip, '::') === 1) {
- list($ip1, $ip2) = explode('::', $ip);
+ [$ip1, $ip2] = explode('::', $ip);
if ($ip1 === '') {
$c1 = -1;
} else {
@@ -197,7 +199,7 @@ class IPv6
public static function check_ipv6($ip)
{
$ip = self::uncompress($ip);
- list($ipv6, $ipv4) = self::split_v6_v4($ip);
+ [$ipv6, $ipv4] = self::split_v6_v4($ip);
$ipv6 = explode(':', $ipv6);
$ipv4 = explode('.', $ipv4);
if (count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4) {
diff --git a/vendor/simplepie/simplepie/src/Parse/Date.php b/vendor/simplepie/simplepie/src/Parse/Date.php
index 91f082b97..4792bc5e6 100644
--- a/vendor/simplepie/simplepie/src/Parse/Date.php
+++ b/vendor/simplepie/simplepie/src/Parse/Date.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -658,7 +660,7 @@ class Date
*
* @final
* @access public
- * @param callback $callback
+ * @param callable $callback
*/
public function add_callback($callback)
{
@@ -679,54 +681,66 @@ class Date
*/
public function date_w3cdtf($date)
{
- static $pcre;
- if (!$pcre) {
- $year = '([0-9]{4})';
- $month = $day = $hour = $minute = $second = '([0-9]{2})';
- $decimal = '([0-9]*)';
- $zone = '(?:(Z)|([+\-])([0-9]{1,2}):?([0-9]{1,2}))';
- $pcre = '/^' . $year . '(?:-?' . $month . '(?:-?' . $day . '(?:[Tt\x09\x20]+' . $hour . '(?::?' . $minute . '(?::?' . $second . '(?:.' . $decimal . ')?)?)?' . $zone . ')?)?)?$/';
- }
+ $pcre = <<<'PCRE'
+ /
+ ^
+ (?P<year>[0-9]{4})
+ (?:
+ -?
+ (?P<month>[0-9]{2})
+ (?:
+ -?
+ (?P<day>[0-9]{2})
+ (?:
+ [Tt\x09\x20]+
+ (?P<hour>[0-9]{2})
+ (?:
+ :?
+ (?P<minute>[0-9]{2})
+ (?:
+ :?
+ (?P<second>[0-9]{2})
+ (?:
+ .
+ (?P<second_fraction>[0-9]*)
+ )?
+ )?
+ )?
+ (?:
+ (?P<zulu>Z)
+ | (?P<tz_sign>[+\-])
+ (?P<tz_hour>[0-9]{1,2})
+ :?
+ (?P<tz_minute>[0-9]{1,2})
+ )
+ )?
+ )?
+ )?
+ $
+ /x
+PCRE;
if (preg_match($pcre, $date, $match)) {
- /*
- Capturing subpatterns:
- 1: Year
- 2: Month
- 3: Day
- 4: Hour
- 5: Minute
- 6: Second
- 7: Decimal fraction of a second
- 8: Zulu
- 9: Timezone ±
- 10: Timezone hours
- 11: Timezone minutes
- */
-
- // Fill in empty matches
- for ($i = count($match); $i <= 3; $i++) {
- $match[$i] = '1';
- }
-
- for ($i = count($match); $i <= 7; $i++) {
- $match[$i] = '0';
- }
+ // Fill in empty matches and convert to proper types.
+ $year = (int) $match['year'];
+ $month = isset($match['month']) ? (int) $match['month'] : 1;
+ $day = isset($match['day']) ? (int) $match['day'] : 1;
+ $hour = isset($match['hour']) ? (int) $match['hour'] : 0;
+ $minute = isset($match['minute']) ? (int) $match['minute'] : 0;
+ $second = isset($match['second']) ? (int) $match['second'] : 0;
+ $second_fraction = isset($match['second_fraction']) ? ((int) $match['second_fraction']) / (10 ** strlen($match['second_fraction'])) : 0;
+ $tz_sign = ($match['tz_sign'] ?? '') === '-' ? -1 : 1;
+ $tz_hour = isset($match['tz_hour']) ? (int) $match['tz_hour'] : 0;
+ $tz_minute = isset($match['tz_minute']) ? (int) $match['tz_minute'] : 0;
// Numeric timezone
- if (isset($match[9]) && $match[9] !== '') {
- $timezone = $match[10] * 3600;
- $timezone += $match[11] * 60;
- if ($match[9] === '-') {
- $timezone = 0 - $timezone;
- }
- } else {
- $timezone = 0;
- }
+ $timezone = $tz_hour * 3600;
+ $timezone += $tz_minute * 60;
+ $timezone *= $tz_sign;
// Convert the number of seconds to an integer, taking decimals into account
- $second = round((int)$match[6] + (int)$match[7] / (10 ** strlen($match[7])));
+ $second = (int) round($second + $second_fraction);
- return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
+ return gmmktime($hour, $minute, $second, $month, $day, $year) - $timezone;
}
return false;
@@ -855,7 +869,7 @@ class Date
$second = 0;
}
- return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone;
+ return gmmktime(intval($match[5]), intval($match[6]), intval($second), intval($month), intval($match[2]), intval($match[4])) - $timezone;
}
return false;
@@ -949,7 +963,7 @@ class Date
*/
$month = $this->month[strtolower($match[2])];
- return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]);
+ return gmmktime((int) $match[4], (int) $match[5], (int) $match[6], $month, (int) $match[3], (int) $match[7]);
}
return false;
diff --git a/vendor/simplepie/simplepie/src/Parser.php b/vendor/simplepie/simplepie/src/Parser.php
index 25c379ef6..4987825e6 100644
--- a/vendor/simplepie/simplepie/src/Parser.php
+++ b/vendor/simplepie/simplepie/src/Parser.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -43,6 +45,8 @@
namespace SimplePie;
+use SimplePie\XML\Declaration\Parser as DeclarationParser;
+
/**
* Parses XML into something sane
*
@@ -52,7 +56,7 @@ namespace SimplePie;
* @package SimplePie
* @subpackage Parsing
*/
-class Parser
+class Parser implements RegistryAware
{
public $error_code;
public $error_string;
@@ -71,7 +75,7 @@ class Parser
public $encoding;
protected $registry;
- public function set_registry(\SimplePie\Registry $registry)
+ public function set_registry(\SimplePie\Registry $registry)/* : void */
{
$this->registry = $registry;
}
@@ -122,7 +126,7 @@ class Parser
}
if (substr($data, 0, 5) === '<?xml' && strspn(substr($data, 5, 1), "\x09\x0A\x0D\x20") && ($pos = strpos($data, '?>')) !== false) {
- $declaration = $this->registry->create('XML_Declaration_Parser', [substr($data, 5, $pos - 5)]);
+ $declaration = $this->registry->create(DeclarationParser::class, [substr($data, 5, $pos - 5)]);
if ($declaration->parse()) {
$data = substr($data, $pos + 2);
$data = '<?xml version="' . $declaration->version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' ."\n". $this->declare_html_entities() . $data;
@@ -183,7 +187,6 @@ class Parser
$xml->xml($data);
while (@$xml->read()) {
switch ($xml->nodeType) {
-
case constant('XMLReader::END_ELEMENT'):
if ($xml->namespaceURI !== '') {
$tagName = $xml->namespaceURI . $this->separator . $xml->localName;
@@ -263,16 +266,16 @@ class Parser
public function tag_open($parser, $tag, $attributes)
{
- list($this->namespace[], $this->element[]) = $this->split_ns($tag);
+ [$this->namespace[], $this->element[]] = $this->split_ns($tag);
$attribs = [];
foreach ($attributes as $name => $value) {
- list($attrib_namespace, $attribute) = $this->split_ns($name);
+ [$attrib_namespace, $attribute] = $this->split_ns($name);
$attribs[$attrib_namespace][$attribute] = $value;
}
if (isset($attribs[\SimplePie\SimplePie::NAMESPACE_XML]['base'])) {
- $base = $this->registry->call('Misc', 'absolutize_url', [$attribs[\SimplePie\SimplePie::NAMESPACE_XML]['base'], end($this->xml_base)]);
+ $base = $this->registry->call(Misc::class, 'absolutize_url', [$attribs[\SimplePie\SimplePie::NAMESPACE_XML]['base'], end($this->xml_base)]);
if ($base !== false) {
$this->xml_base[] = $base;
$this->xml_base_explicit[] = true;
@@ -394,7 +397,7 @@ class Parser
return '<a class="h-card" href="'.$link.'">'.$person_tag.$name.'</a>';
}
}
- return isset($data['value']) ? $data['value'] : '';
+ return $data['value'] ?? '';
}
private function parse_microformats(&$data, $url)
@@ -477,8 +480,7 @@ class Parser
// author is a special case, it can be plain text or an h-card array.
// If it's plain text it can also be a url that should be followed to
// get the actual h-card.
- $author = isset($entry['properties']['author'][0]) ?
- $entry['properties']['author'][0] : $feed_author;
+ $author = $entry['properties']['author'][0] ?? $feed_author;
if (!is_string($author)) {
$author = $this->parse_hcard($author);
} elseif (strpos($author, 'http') === 0) {
diff --git a/vendor/simplepie/simplepie/src/Rating.php b/vendor/simplepie/simplepie/src/Rating.php
index 70e018ad7..f4f303d99 100644
--- a/vendor/simplepie/simplepie/src/Rating.php
+++ b/vendor/simplepie/simplepie/src/Rating.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Registry.php b/vendor/simplepie/simplepie/src/Registry.php
index 1db2a619e..8e2ea13e3 100644
--- a/vendor/simplepie/simplepie/src/Registry.php
+++ b/vendor/simplepie/simplepie/src/Registry.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -43,6 +45,10 @@
namespace SimplePie;
+use SimplePie\Content\Type\Sniffer;
+use SimplePie\Parse\Date;
+use SimplePie\XML\Declaration\Parser as DeclarationParser;
+
/**
* Handles creating objects and calling methods
*
@@ -57,9 +63,53 @@ class Registry
*
* Overriding classes *must* subclass these.
*
- * @var array
+ * @var array<class-string, class-string>
*/
protected $default = [
+ Cache::class => Cache::class,
+ Locator::class => Locator::class,
+ Parser::class => Parser::class,
+ File::class => File::class,
+ Sanitize::class => Sanitize::class,
+ Item::class => Item::class,
+ Author::class => Author::class,
+ Category::class => Category::class,
+ Enclosure::class => Enclosure::class,
+ Caption::class => Caption::class,
+ Copyright::class => Copyright::class,
+ Credit::class => Credit::class,
+ Rating::class => Rating::class,
+ Restriction::class => Restriction::class,
+ Sniffer::class => Sniffer::class,
+ Source::class => Source::class,
+ Misc::class => Misc::class,
+ DeclarationParser::class => DeclarationParser::class,
+ Date::class => Date::class,
+ ];
+
+ /**
+ * Class mapping
+ *
+ * @see register()
+ * @var array
+ */
+ protected $classes = [];
+
+ /**
+ * Legacy classes
+ *
+ * @see register()
+ * @var array<class-string>
+ */
+ protected $legacy = [];
+
+ /**
+ * Legacy types
+ *
+ * @see register()
+ * @var array<string, class-string>
+ */
+ private $legacyTypes = [
'Cache' => Cache::class,
'Locator' => Locator::class,
'Parser' => Parser::class,
@@ -74,30 +124,14 @@ class Registry
'Credit' => Credit::class,
'Rating' => Rating::class,
'Restriction' => Restriction::class,
- 'Content_Type_Sniffer' => Content\Type\Sniffer::class,
+ 'Content_Type_Sniffer' => Sniffer::class,
'Source' => Source::class,
'Misc' => Misc::class,
- 'XML_Declaration_Parser' => XML\Declaration\Parser::class,
- 'Parse_Date' => Parse\Date::class,
+ 'XML_Declaration_Parser' => DeclarationParser::class,
+ 'Parse_Date' => Date::class,
];
/**
- * Class mapping
- *
- * @see register()
- * @var array
- */
- protected $classes = [];
-
- /**
- * Legacy classes
- *
- * @see register()
- * @var array
- */
- protected $legacy = [];
-
- /**
* Constructor
*
* No-op
@@ -110,13 +144,30 @@ class Registry
* Register a class
*
* @param string $type See {@see $default} for names
- * @param string $class Class name, must subclass the corresponding default
+ * @param class-string $class Class name, must subclass the corresponding default
* @param bool $legacy Whether to enable legacy support for this class
* @return bool Successfulness
*/
public function register($type, $class, $legacy = false)
{
- if (!@is_subclass_of($class, $this->default[$type])) {
+ if (array_key_exists($type, $this->legacyTypes)) {
+ // trigger_error(sprintf('"%s"(): Using argument #1 ($type) with value "%s" is deprecated since SimplePie 1.8.0, use class-string "%s" instead.', __METHOD__, $type, $this->legacyTypes[$type]), \E_USER_DEPRECATED);
+
+ $type = $this->legacyTypes[$type];
+ }
+
+ if (! array_key_exists($type, $this->default)) {
+ return false;
+ }
+
+ if (!class_exists($class)) {
+ return false;
+ }
+
+ /** @var string */
+ $base_class = $this->default[$type];
+
+ if (!is_subclass_of($class, $base_class)) {
return false;
}
@@ -134,43 +185,43 @@ class Registry
*
* Where possible, use {@see create()} or {@see call()} instead
*
- * @param string $type
- * @return string|null
+ * @template T
+ * @param class-string<T> $type
+ * @return class-string<T>|null
*/
public function get_class($type)
{
- if (!empty($this->classes[$type])) {
- return $this->classes[$type];
+ if (array_key_exists($type, $this->legacyTypes)) {
+ // trigger_error(sprintf('"%s"(): Using argument #1 ($type) with value "%s" is deprecated since SimplePie 1.8.0, use class-string "%s" instead.', __METHOD__, $type, $this->legacyTypes[$type]), \E_USER_DEPRECATED);
+
+ $type = $this->legacyTypes[$type];
}
- if (!empty($this->default[$type])) {
- return $this->default[$type];
+
+ if (! array_key_exists($type, $this->default)) {
+ return null;
+ }
+
+ $class = $this->default[$type];
+
+ if (array_key_exists($type, $this->classes)) {
+ $class = $this->classes[$type];
}
- return null;
+ return $class;
}
/**
* Create a new instance of a given type
*
- * @param string $type
+ * @template T class-string $type
+ * @param class-string<T> $type
* @param array $parameters Parameters to pass to the constructor
- * @return object Instance of class
+ * @return T Instance of class
*/
public function &create($type, $parameters = [])
{
$class = $this->get_class($type);
- if (in_array($class, $this->legacy)) {
- switch ($type) {
- case 'locator':
- // Legacy: file, timeout, useragent, file_class, max_checked_feeds, content_type_sniffer_class
- // Specified: file, timeout, useragent, max_checked_feeds
- $replacement = [$this->get_class('file'), $parameters[3], $this->get_class('content_type_sniffer')];
- array_splice($parameters, 3, 1, $replacement);
- break;
- }
- }
-
if (!method_exists($class, '__construct')) {
$instance = new $class();
} else {
@@ -178,7 +229,10 @@ class Registry
$instance = $reflector->newInstanceArgs($parameters);
}
- if (method_exists($instance, 'set_registry')) {
+ if ($instance instanceof RegistryAware) {
+ $instance->set_registry($this);
+ } elseif (method_exists($instance, 'set_registry')) {
+ trigger_error(sprintf('Using the method "set_registry()" without implementing "%s" is deprecated since SimplePie 1.8.0, implement "%s" in "%s".', RegistryAware::class, RegistryAware::class, $class), \E_USER_DEPRECATED);
$instance->set_registry($this);
}
return $instance;
@@ -187,7 +241,7 @@ class Registry
/**
* Call a static method for a type
*
- * @param string $type
+ * @param class-string $type
* @param string $method
* @param array $parameters
* @return mixed
@@ -198,7 +252,7 @@ class Registry
if (in_array($class, $this->legacy)) {
switch ($type) {
- case 'Cache':
+ case Cache::class:
// For backwards compatibility with old non-static
// Cache::create() methods in PHP < 8.0.
// No longer supported as of PHP 8.0.
diff --git a/vendor/simplepie/simplepie/src/RegistryAware.php b/vendor/simplepie/simplepie/src/RegistryAware.php
new file mode 100644
index 000000000..9d60bdd0f
--- /dev/null
+++ b/vendor/simplepie/simplepie/src/RegistryAware.php
@@ -0,0 +1,65 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package SimplePie
+ * @copyright 2004-2022 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+
+namespace SimplePie;
+
+/**
+ * Handles the injection of Registry into other class
+ *
+ * {@see \SimplePie\SimplePie::get_registry()}
+ *
+ * @package SimplePie
+ */
+interface RegistryAware
+{
+ /**
+ * Set the Registry into the class
+ *
+ * @param Registry $registry
+ *
+ * @return void
+ */
+ public function set_registry(Registry $registry)/* : void */;
+}
diff --git a/vendor/simplepie/simplepie/src/Restriction.php b/vendor/simplepie/simplepie/src/Restriction.php
index bd7a0e951..42b456a1c 100644
--- a/vendor/simplepie/simplepie/src/Restriction.php
+++ b/vendor/simplepie/simplepie/src/Restriction.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
diff --git a/vendor/simplepie/simplepie/src/Sanitize.php b/vendor/simplepie/simplepie/src/Sanitize.php
index 55103461e..1f15bb967 100644
--- a/vendor/simplepie/simplepie/src/Sanitize.php
+++ b/vendor/simplepie/simplepie/src/Sanitize.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -43,6 +45,13 @@
namespace SimplePie;
+use InvalidArgumentException;
+use SimplePie\Cache\Base;
+use SimplePie\Cache\BaseDataCache;
+use SimplePie\Cache\CallableNameFilter;
+use SimplePie\Cache\DataCache;
+use SimplePie\Cache\NameFilter;
+
/**
* Used for data cleanup and post-processing
*
@@ -52,7 +61,7 @@ namespace SimplePie;
* @package SimplePie
* @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags
*/
-class Sanitize
+class Sanitize implements RegistryAware
{
// Private vars
public $base;
@@ -70,6 +79,11 @@ class Sanitize
public $enable_cache = true;
public $cache_location = './cache';
public $cache_name_function = 'md5';
+
+ /**
+ * @var NameFilter
+ */
+ private $cache_namefilter;
public $timeout = 10;
public $useragent = '';
public $force_fsockopen = false;
@@ -77,6 +91,16 @@ class Sanitize
public $registry;
/**
+ * @var DataCache|null
+ */
+ private $cache = null;
+
+ /**
+ * @var int Cache duration (in seconds)
+ */
+ private $cache_duration = 3600;
+
+ /**
* List of domains for which to force HTTPS.
* @see \SimplePie\Sanitize::set_https_domains()
* Array is a tree split at DNS levels. Example:
@@ -104,12 +128,12 @@ class Sanitize
}
}
- public function set_registry(\SimplePie\Registry $registry)
+ public function set_registry(\SimplePie\Registry $registry)/* : void */
{
$this->registry = $registry;
}
- public function pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie\Cache')
+ public function pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie\Cache', DataCache $cache = null)
{
if (isset($enable_cache)) {
$this->enable_cache = (bool) $enable_cache;
@@ -119,8 +143,26 @@ class Sanitize
$this->cache_location = (string) $cache_location;
}
- if ($cache_name_function) {
+ if (! is_string($cache_name_function) && ! is_object($cache_name_function) && ! $cache_name_function instanceof NameFilter) {
+ throw new InvalidArgumentException(sprintf(
+ '%s(): Argument #3 ($cache_name_function) must be of type %s',
+ __METHOD__,
+ NameFilter::class
+ ), 1);
+ }
+
+ // BC: $cache_name_function could be a callable as string
+ if (is_string($cache_name_function)) {
+ // trigger_error(sprintf('Providing $cache_name_function as string in "%s()" is deprecated since SimplePie 1.8.0, provide as "%s" instead.', __METHOD__, NameFilter::class), \E_USER_DEPRECATED);
$this->cache_name_function = (string) $cache_name_function;
+
+ $cache_name_function = new CallableNameFilter($cache_name_function);
+ }
+
+ $this->cache_namefilter = $cache_name_function;
+
+ if ($cache !== null) {
+ $this->cache = $cache;
}
}
@@ -374,19 +416,20 @@ class Sanitize
// If image handling (caching, etc.) is enabled, cache and rewrite all the image tags.
if (isset($this->image_handler) && ((string) $this->image_handler) !== '' && $this->enable_cache) {
$images = $document->getElementsByTagName('img');
+
foreach ($images as $img) {
if ($img->hasAttribute('src')) {
- $image_url = call_user_func($this->cache_name_function, $img->getAttribute('src'));
- $cache = $this->registry->call('Cache', 'get_handler', [$this->cache_location, $image_url, 'spi']);
+ $image_url = $this->cache_namefilter->filter($img->getAttribute('src'));
+ $cache = $this->get_cache($image_url);
- if ($cache->load()) {
+ if ($cache->get_data($image_url, false)) {
$img->setAttribute('src', $this->image_handler . $image_url);
} else {
- $file = $this->registry->create('File', [$img->getAttribute('src'), $this->timeout, 5, ['X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']], $this->useragent, $this->force_fsockopen]);
+ $file = $this->registry->create(File::class, [$img->getAttribute('src'), $this->timeout, 5, ['X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']], $this->useragent, $this->force_fsockopen]);
$headers = $file->headers;
if ($file->success && ($file->method & \SimplePie\SimplePie::FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300))) {
- if ($cache->save(['headers' => $file->headers, 'body' => $file->body])) {
+ if ($cache->set_data($image_url, ['headers' => $file->headers, 'body' => $file->body], $this->cache_duration)) {
$img->setAttribute('src', $this->image_handler . $image_url);
} else {
trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
@@ -413,7 +456,7 @@ class Sanitize
}
if ($type & \SimplePie\SimplePie::CONSTRUCT_IRI) {
- $absolute = $this->registry->call('Misc', 'absolutize_url', [$data, $base]);
+ $absolute = $this->registry->call(Misc::class, 'absolutize_url', [$data, $base]);
if ($absolute !== false) {
$data = $absolute;
}
@@ -424,7 +467,7 @@ class Sanitize
}
if ($this->output_encoding !== 'UTF-8') {
- $data = $this->registry->call('Misc', 'change_encoding', [$data, 'UTF-8', $this->output_encoding]);
+ $data = $this->registry->call(Misc::class, 'change_encoding', [$data, 'UTF-8', $this->output_encoding]);
}
}
return $data;
@@ -462,7 +505,7 @@ class Sanitize
foreach ($elements as $element) {
foreach ($attributes as $attribute) {
if ($element->hasAttribute($attribute)) {
- $value = $this->registry->call('Misc', 'absolutize_url', [$element->getAttribute($attribute), $this->base]);
+ $value = $this->registry->call(Misc::class, 'absolutize_url', [$element->getAttribute($attribute), $this->base]);
if ($value !== false) {
$value = $this->https_url($value);
$element->setAttribute($attribute, $value);
@@ -586,6 +629,29 @@ class Sanitize
}
}
}
+
+ /**
+ * Get a DataCache
+ *
+ * @param string $image_url Only needed for BC, can be removed in SimplePie 2.0.0
+ *
+ * @return DataCache
+ */
+ private function get_cache($image_url = '')
+ {
+ if ($this->cache === null) {
+ // @trigger_error(sprintf('Not providing as PSR-16 cache implementation is deprecated since SimplePie 1.8.0, please use "SimplePie\SimplePie::set_cache()".'), \E_USER_DEPRECATED);
+ $cache = $this->registry->call(Cache::class, 'get_handler', [
+ $this->cache_location,
+ $image_url,
+ Base::TYPE_IMAGE
+ ]);
+
+ return new BaseDataCache($cache);
+ }
+
+ return $this->cache;
+ }
}
class_alias('SimplePie\Sanitize', 'SimplePie_Sanitize');
diff --git a/vendor/simplepie/simplepie/src/SimplePie.php b/vendor/simplepie/simplepie/src/SimplePie.php
index 22daa17aa..1dfa39fad 100644
--- a/vendor/simplepie/simplepie/src/SimplePie.php
+++ b/vendor/simplepie/simplepie/src/SimplePie.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -43,6 +45,16 @@
namespace SimplePie;
+use InvalidArgumentException;
+use Psr\SimpleCache\CacheInterface;
+use SimplePie\Cache\Base;
+use SimplePie\Cache\BaseDataCache;
+use SimplePie\Cache\CallableNameFilter;
+use SimplePie\Cache\DataCache;
+use SimplePie\Cache\NameFilter;
+use SimplePie\Cache\Psr16;
+use SimplePie\Content\Type\Sniffer;
+
/**
* SimplePie
*
@@ -54,350 +66,350 @@ class SimplePie
/**
* SimplePie Name
*/
- const NAME = 'SimplePie';
+ public const NAME = 'SimplePie';
/**
* SimplePie Version
*/
- const VERSION = '1.7.0';
+ public const VERSION = '1.8.0';
/**
* SimplePie Website URL
*/
- const URL = 'http://simplepie.org';
+ public const URL = 'http://simplepie.org';
/**
* SimplePie Linkback
*/
- const LINKBACK = '<a href="' . self::URL . '" title="' . self::NAME . ' ' . self::VERSION . '">' . self::NAME . '</a>';
+ public const LINKBACK = '<a href="' . self::URL . '" title="' . self::NAME . ' ' . self::VERSION . '">' . self::NAME . '</a>';
/**
* No Autodiscovery
* @see SimplePie::set_autodiscovery_level()
*/
- const LOCATOR_NONE = 0;
+ public const LOCATOR_NONE = 0;
/**
* Feed Link Element Autodiscovery
* @see SimplePie::set_autodiscovery_level()
*/
- const LOCATOR_AUTODISCOVERY = 1;
+ public const LOCATOR_AUTODISCOVERY = 1;
/**
* Local Feed Extension Autodiscovery
* @see SimplePie::set_autodiscovery_level()
*/
- const LOCATOR_LOCAL_EXTENSION = 2;
+ public const LOCATOR_LOCAL_EXTENSION = 2;
/**
* Local Feed Body Autodiscovery
* @see SimplePie::set_autodiscovery_level()
*/
- const LOCATOR_LOCAL_BODY = 4;
+ public const LOCATOR_LOCAL_BODY = 4;
/**
* Remote Feed Extension Autodiscovery
* @see SimplePie::set_autodiscovery_level()
*/
- const LOCATOR_REMOTE_EXTENSION = 8;
+ public const LOCATOR_REMOTE_EXTENSION = 8;
/**
* Remote Feed Body Autodiscovery
* @see SimplePie::set_autodiscovery_level()
*/
- const LOCATOR_REMOTE_BODY = 16;
+ public const LOCATOR_REMOTE_BODY = 16;
/**
* All Feed Autodiscovery
* @see SimplePie::set_autodiscovery_level()
*/
- const LOCATOR_ALL = 31;
+ public const LOCATOR_ALL = 31;
/**
* No known feed type
*/
- const TYPE_NONE = 0;
+ public const TYPE_NONE = 0;
/**
* RSS 0.90
*/
- const TYPE_RSS_090 = 1;
+ public const TYPE_RSS_090 = 1;
/**
* RSS 0.91 (Netscape)
*/
- const TYPE_RSS_091_NETSCAPE = 2;
+ public const TYPE_RSS_091_NETSCAPE = 2;
/**
* RSS 0.91 (Userland)
*/
- const TYPE_RSS_091_USERLAND = 4;
+ public const TYPE_RSS_091_USERLAND = 4;
/**
* RSS 0.91 (both Netscape and Userland)
*/
- const TYPE_RSS_091 = 6;
+ public const TYPE_RSS_091 = 6;
/**
* RSS 0.92
*/
- const TYPE_RSS_092 = 8;
+ public const TYPE_RSS_092 = 8;
/**
* RSS 0.93
*/
- const TYPE_RSS_093 = 16;
+ public const TYPE_RSS_093 = 16;
/**
* RSS 0.94
*/
- const TYPE_RSS_094 = 32;
+ public const TYPE_RSS_094 = 32;
/**
* RSS 1.0
*/
- const TYPE_RSS_10 = 64;
+ public const TYPE_RSS_10 = 64;
/**
* RSS 2.0
*/
- const TYPE_RSS_20 = 128;
+ public const TYPE_RSS_20 = 128;
/**
* RDF-based RSS
*/
- const TYPE_RSS_RDF = 65;
+ public const TYPE_RSS_RDF = 65;
/**
* Non-RDF-based RSS (truly intended as syndication format)
*/
- const TYPE_RSS_SYNDICATION = 190;
+ public const TYPE_RSS_SYNDICATION = 190;
/**
* All RSS
*/
- const TYPE_RSS_ALL = 255;
+ public const TYPE_RSS_ALL = 255;
/**
* Atom 0.3
*/
- const TYPE_ATOM_03 = 256;
+ public const TYPE_ATOM_03 = 256;
/**
* Atom 1.0
*/
- const TYPE_ATOM_10 = 512;
+ public const TYPE_ATOM_10 = 512;
/**
* All Atom
*/
- const TYPE_ATOM_ALL = 768;
+ public const TYPE_ATOM_ALL = 768;
/**
* All feed types
*/
- const TYPE_ALL = 1023;
+ public const TYPE_ALL = 1023;
/**
* No construct
*/
- const CONSTRUCT_NONE = 0;
+ public const CONSTRUCT_NONE = 0;
/**
* Text construct
*/
- const CONSTRUCT_TEXT = 1;
+ public const CONSTRUCT_TEXT = 1;
/**
* HTML construct
*/
- const CONSTRUCT_HTML = 2;
+ public const CONSTRUCT_HTML = 2;
/**
* XHTML construct
*/
- const CONSTRUCT_XHTML = 4;
+ public const CONSTRUCT_XHTML = 4;
/**
* base64-encoded construct
*/
- const CONSTRUCT_BASE64 = 8;
+ public const CONSTRUCT_BASE64 = 8;
/**
* IRI construct
*/
- const CONSTRUCT_IRI = 16;
+ public const CONSTRUCT_IRI = 16;
/**
* A construct that might be HTML
*/
- const CONSTRUCT_MAYBE_HTML = 32;
+ public const CONSTRUCT_MAYBE_HTML = 32;
/**
* All constructs
*/
- const CONSTRUCT_ALL = 63;
+ public const CONSTRUCT_ALL = 63;
/**
* Don't change case
*/
- const SAME_CASE = 1;
+ public const SAME_CASE = 1;
/**
* Change to lowercase
*/
- const LOWERCASE = 2;
+ public const LOWERCASE = 2;
/**
* Change to uppercase
*/
- const UPPERCASE = 4;
+ public const UPPERCASE = 4;
/**
* PCRE for HTML attributes
*/
- const PCRE_HTML_ATTRIBUTE = '((?:[\x09\x0A\x0B\x0C\x0D\x20]+[^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?)*)[\x09\x0A\x0B\x0C\x0D\x20]*';
+ public const PCRE_HTML_ATTRIBUTE = '((?:[\x09\x0A\x0B\x0C\x0D\x20]+[^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?)*)[\x09\x0A\x0B\x0C\x0D\x20]*';
/**
* PCRE for XML attributes
*/
- const PCRE_XML_ATTRIBUTE = '((?:\s+(?:(?:[^\s:]+:)?[^\s:]+)\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'))*)\s*';
+ public const PCRE_XML_ATTRIBUTE = '((?:\s+(?:(?:[^\s:]+:)?[^\s:]+)\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'))*)\s*';
/**
* XML Namespace
*/
- const NAMESPACE_XML = 'http://www.w3.org/XML/1998/namespace';
+ public const NAMESPACE_XML = 'http://www.w3.org/XML/1998/namespace';
/**
* Atom 1.0 Namespace
*/
- const NAMESPACE_ATOM_10 = 'http://www.w3.org/2005/Atom';
+ public const NAMESPACE_ATOM_10 = 'http://www.w3.org/2005/Atom';
/**
* Atom 0.3 Namespace
*/
- const NAMESPACE_ATOM_03 = 'http://purl.org/atom/ns#';
+ public const NAMESPACE_ATOM_03 = 'http://purl.org/atom/ns#';
/**
* RDF Namespace
*/
- const NAMESPACE_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
+ public const NAMESPACE_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
/**
* RSS 0.90 Namespace
*/
- const NAMESPACE_RSS_090 = 'http://my.netscape.com/rdf/simple/0.9/';
+ public const NAMESPACE_RSS_090 = 'http://my.netscape.com/rdf/simple/0.9/';
/**
* RSS 1.0 Namespace
*/
- const NAMESPACE_RSS_10 = 'http://purl.org/rss/1.0/';
+ public const NAMESPACE_RSS_10 = 'http://purl.org/rss/1.0/';
/**
* RSS 1.0 Content Module Namespace
*/
- const NAMESPACE_RSS_10_MODULES_CONTENT = 'http://purl.org/rss/1.0/modules/content/';
+ public const NAMESPACE_RSS_10_MODULES_CONTENT = 'http://purl.org/rss/1.0/modules/content/';
/**
* RSS 2.0 Namespace
* (Stupid, I know, but I'm certain it will confuse people less with support.)
*/
- const NAMESPACE_RSS_20 = '';
+ public const NAMESPACE_RSS_20 = '';
/**
* DC 1.0 Namespace
*/
- const NAMESPACE_DC_10 = 'http://purl.org/dc/elements/1.0/';
+ public const NAMESPACE_DC_10 = 'http://purl.org/dc/elements/1.0/';
/**
* DC 1.1 Namespace
*/
- const NAMESPACE_DC_11 = 'http://purl.org/dc/elements/1.1/';
+ public const NAMESPACE_DC_11 = 'http://purl.org/dc/elements/1.1/';
/**
* W3C Basic Geo (WGS84 lat/long) Vocabulary Namespace
*/
- const NAMESPACE_W3C_BASIC_GEO = 'http://www.w3.org/2003/01/geo/wgs84_pos#';
+ public const NAMESPACE_W3C_BASIC_GEO = 'http://www.w3.org/2003/01/geo/wgs84_pos#';
/**
* GeoRSS Namespace
*/
- const NAMESPACE_GEORSS = 'http://www.georss.org/georss';
+ public const NAMESPACE_GEORSS = 'http://www.georss.org/georss';
/**
* Media RSS Namespace
*/
- const NAMESPACE_MEDIARSS = 'http://search.yahoo.com/mrss/';
+ public const NAMESPACE_MEDIARSS = 'http://search.yahoo.com/mrss/';
/**
* Wrong Media RSS Namespace. Caused by a long-standing typo in the spec.
*/
- const NAMESPACE_MEDIARSS_WRONG = 'http://search.yahoo.com/mrss';
+ public const NAMESPACE_MEDIARSS_WRONG = 'http://search.yahoo.com/mrss';
/**
* Wrong Media RSS Namespace #2. New namespace introduced in Media RSS 1.5.
*/
- const NAMESPACE_MEDIARSS_WRONG2 = 'http://video.search.yahoo.com/mrss';
+ public const NAMESPACE_MEDIARSS_WRONG2 = 'http://video.search.yahoo.com/mrss';
/**
* Wrong Media RSS Namespace #3. A possible typo of the Media RSS 1.5 namespace.
*/
- const NAMESPACE_MEDIARSS_WRONG3 = 'http://video.search.yahoo.com/mrss/';
+ public const NAMESPACE_MEDIARSS_WRONG3 = 'http://video.search.yahoo.com/mrss/';
/**
* Wrong Media RSS Namespace #4. New spec location after the RSS Advisory Board takes it over, but not a valid namespace.
*/
- const NAMESPACE_MEDIARSS_WRONG4 = 'http://www.rssboard.org/media-rss';
+ public const NAMESPACE_MEDIARSS_WRONG4 = 'http://www.rssboard.org/media-rss';
/**
* Wrong Media RSS Namespace #5. A possible typo of the RSS Advisory Board URL.
*/
- const NAMESPACE_MEDIARSS_WRONG5 = 'http://www.rssboard.org/media-rss/';
+ public const NAMESPACE_MEDIARSS_WRONG5 = 'http://www.rssboard.org/media-rss/';
/**
* iTunes RSS Namespace
*/
- const NAMESPACE_ITUNES = 'http://www.itunes.com/dtds/podcast-1.0.dtd';
+ public const NAMESPACE_ITUNES = 'http://www.itunes.com/dtds/podcast-1.0.dtd';
/**
* XHTML Namespace
*/
- const NAMESPACE_XHTML = 'http://www.w3.org/1999/xhtml';
+ public const NAMESPACE_XHTML = 'http://www.w3.org/1999/xhtml';
/**
* IANA Link Relations Registry
*/
- const IANA_LINK_RELATIONS_REGISTRY = 'http://www.iana.org/assignments/relation/';
+ public const IANA_LINK_RELATIONS_REGISTRY = 'http://www.iana.org/assignments/relation/';
/**
* No file source
*/
- const FILE_SOURCE_NONE = 0;
+ public const FILE_SOURCE_NONE = 0;
/**
* Remote file source
*/
- const FILE_SOURCE_REMOTE = 1;
+ public const FILE_SOURCE_REMOTE = 1;
/**
* Local file source
*/
- const FILE_SOURCE_LOCAL = 2;
+ public const FILE_SOURCE_LOCAL = 2;
/**
* fsockopen() file source
*/
- const FILE_SOURCE_FSOCKOPEN = 4;
+ public const FILE_SOURCE_FSOCKOPEN = 4;
/**
* cURL file source
*/
- const FILE_SOURCE_CURL = 8;
+ public const FILE_SOURCE_CURL = 8;
/**
* file_get_contents() file source
*/
- const FILE_SOURCE_FILE_GET_CONTENTS = 16;
+ public const FILE_SOURCE_FILE_GET_CONTENTS = 16;
/**
* @var array Raw data
@@ -495,7 +507,19 @@ class SimplePie
* @see SimplePie::enable_cache()
* @access private
*/
- public $cache = true;
+ private $enable_cache = true;
+
+ /**
+ * @var DataCache|null
+ * @see SimplePie::set_cache()
+ */
+ private $cache = null;
+
+ /**
+ * @var NameFilter
+ * @see SimplePie::set_cache_namefilter()
+ */
+ private $cache_namefilter;
/**
* @var bool Force SimplePie to fallback to expired cache, if enabled,
@@ -666,20 +690,21 @@ class SimplePie
*/
public function __construct()
{
- if (version_compare(PHP_VERSION, '5.6', '<')) {
- trigger_error('Please upgrade to PHP 5.6 or newer.');
+ if (version_compare(PHP_VERSION, '7.2', '<')) {
+ trigger_error('Please upgrade to PHP 7.2 or newer.');
die();
}
$this->set_useragent();
+ $this->set_cache_namefilter(new CallableNameFilter($this->cache_name_function));
+
// Other objects, instances created here so we can set options on them
$this->sanitize = new \SimplePie\Sanitize();
$this->registry = new \SimplePie\Registry();
if (func_num_args() > 0) {
- $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
- trigger_error('Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_duration() directly.', $level);
+ trigger_error('Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_duration() directly.', \E_USER_DEPRECATED);
$args = func_get_args();
switch (count($args)) {
@@ -759,10 +784,10 @@ class SimplePie
$this->multifeed_url = [];
if (is_array($url)) {
foreach ($url as $value) {
- $this->multifeed_url[] = $this->registry->call('Misc', 'fix_protocol', [$value, 1]);
+ $this->multifeed_url[] = $this->registry->call(Misc::class, 'fix_protocol', [$value, 1]);
}
} else {
- $this->feed_url = $this->registry->call('Misc', 'fix_protocol', [$url, 1]);
+ $this->feed_url = $this->registry->call(Misc::class, 'fix_protocol', [$url, 1]);
$this->permanent_url = $this->feed_url;
}
}
@@ -851,7 +876,19 @@ class SimplePie
*/
public function enable_cache($enable = true)
{
- $this->cache = (bool) $enable;
+ $this->enable_cache = (bool) $enable;
+ }
+
+ /**
+ * Set a PSR-16 implementation as cache
+ *
+ * @param CacheInterface $psr16cache The PSR-16 cache implementation
+ *
+ * @return void
+ */
+ public function set_cache(CacheInterface $cache)
+ {
+ $this->cache = new Psr16($cache);
}
/**
@@ -861,12 +898,15 @@ class SimplePie
* This tells SimplePie to ignore any file errors and fall back to cache
* instead. This only works if caching is enabled and cached content
* still exists.
-
+ *
+ * @deprecated since SimplePie 1.8.0, expired cache will not be used anymore.
+ *
* @param bool $enable Force use of cache on fail.
*/
public function force_cache_fallback($enable = false)
{
- $this->force_cache_fallback= (bool) $enable;
+ // @trigger_error(sprintf('SimplePie\SimplePie::force_cache_fallback() is deprecated since SimplePie 1.8.0, expired cache will not be used anymore.'), \E_USER_DEPRECATED);
+ $this->force_cache_fallback = (bool) $enable;
}
/**
@@ -894,15 +934,19 @@ class SimplePie
/**
* Set the file system location where the cached files should be stored
*
+ * @deprecated since SimplePie 1.8.0, use \SimplePie\SimplePie::set_cache() instead.
+ *
* @param string $location The file system location.
*/
public function set_cache_location($location = './cache')
{
+ // @trigger_error(sprintf('SimplePie\SimplePie::set_cache_location() is deprecated since SimplePie 1.8.0, please use "SimplePie\SimplePie::set_cache()" instead.'), \E_USER_DEPRECATED);
$this->cache_location = (string) $location;
}
/**
* Return the filename (i.e. hash, without path and without extension) of the file to cache a given URL.
+ *
* @param string $url The URL of the feed to be cached.
* @return string A filename (i.e. hash, without path and without extension).
*/
@@ -926,7 +970,8 @@ class SimplePie
ksort($options);
$url .= '#' . urlencode(var_export($options, true));
}
- return call_user_func($this->cache_name_function, $url);
+
+ return $this->cache_namefilter->filter($url);
}
/**
@@ -978,149 +1023,269 @@ class SimplePie
*
* Use this to override SimplePie's default classes
* @see \SimplePie\Registry
- * @return \SimplePie\Registry
+ *
+ * @return Registry
*/
public function &get_registry()
{
return $this->registry;
}
- /**#@+
- * Useful when you are overloading or extending SimplePie's default classes.
+ /**
+ * Set which class SimplePie uses for caching
+ *
+ * @deprecated since SimplePie 1.3, use {@see set_cache()} instead
*
- * @deprecated Use {@see get_registry()} instead
- * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation
* @param string $class Name of custom class
+ *
* @return boolean True on success, false otherwise
*/
- /**
- * Set which class SimplePie uses for caching
- */
- public function set_cache_class($class = 'SimplePie\Cache')
+ public function set_cache_class($class = Cache::class)
{
- return $this->registry->register('Cache', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::set_cache()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Cache::class, $class, true);
}
/**
* Set which class SimplePie uses for auto-discovery
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_locator_class($class = 'SimplePie\Locator')
+ public function set_locator_class($class = Locator::class)
{
- return $this->registry->register('Locator', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Locator::class, $class, true);
}
/**
* Set which class SimplePie uses for XML parsing
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_parser_class($class = 'SimplePie\Parser')
+ public function set_parser_class($class = Parser::class)
{
- return $this->registry->register('Parser', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Parser::class, $class, true);
}
/**
* Set which class SimplePie uses for remote file fetching
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_file_class($class = 'SimplePie\File')
+ public function set_file_class($class = File::class)
{
- return $this->registry->register('File', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(File::class, $class, true);
}
/**
* Set which class SimplePie uses for data sanitization
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_sanitize_class($class = 'SimplePie\Sanitize')
+ public function set_sanitize_class($class = Sanitize::class)
{
- return $this->registry->register('Sanitize', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Sanitize::class, $class, true);
}
/**
* Set which class SimplePie uses for handling feed items
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_item_class($class = 'SimplePie\Item')
+ public function set_item_class($class = Item::class)
{
- return $this->registry->register('Item', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Item::class, $class, true);
}
/**
* Set which class SimplePie uses for handling author data
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_author_class($class = 'SimplePie\Author')
+ public function set_author_class($class = Author::class)
{
- return $this->registry->register('Author', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Author::class, $class, true);
}
/**
* Set which class SimplePie uses for handling category data
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_category_class($class = 'SimplePie\Category')
+ public function set_category_class($class = Category::class)
{
- return $this->registry->register('Category', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Category::class, $class, true);
}
/**
* Set which class SimplePie uses for feed enclosures
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_enclosure_class($class = 'SimplePie\Enclosure')
+ public function set_enclosure_class($class = Enclosure::class)
{
- return $this->registry->register('Enclosure', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Enclosure::class, $class, true);
}
/**
* Set which class SimplePie uses for `<media:text>` captions
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_caption_class($class = 'SimplePie\Caption')
+ public function set_caption_class($class = Caption::class)
{
- return $this->registry->register('Caption', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Caption::class, $class, true);
}
/**
* Set which class SimplePie uses for `<media:copyright>`
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_copyright_class($class = 'SimplePie\Copyright')
+ public function set_copyright_class($class = Copyright::class)
{
- return $this->registry->register('Copyright', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Copyright::class, $class, true);
}
/**
* Set which class SimplePie uses for `<media:credit>`
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_credit_class($class = 'SimplePie\Credit')
+ public function set_credit_class($class = Credit::class)
{
- return $this->registry->register('Credit', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Credit::class, $class, true);
}
/**
* Set which class SimplePie uses for `<media:rating>`
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_rating_class($class = 'SimplePie\Rating')
+ public function set_rating_class($class = Rating::class)
{
- return $this->registry->register('Rating', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Rating::class, $class, true);
}
/**
* Set which class SimplePie uses for `<media:restriction>`
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_restriction_class($class = 'SimplePie\Restriction')
+ public function set_restriction_class($class = Restriction::class)
{
- return $this->registry->register('Restriction', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Restriction::class, $class, true);
}
/**
* Set which class SimplePie uses for content-type sniffing
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_content_type_sniffer_class($class = 'SimplePie\Content\Type\Sniffer')
+ public function set_content_type_sniffer_class($class = Sniffer::class)
{
- return $this->registry->register('Content_Type_Sniffer', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Sniffer::class, $class, true);
}
/**
* Set which class SimplePie uses item sources
+ *
+ * @deprecated since SimplePie 1.3, use {@see get_registry()} instead
+ *
+ * @param string $class Name of custom class
+ *
+ * @return boolean True on success, false otherwise
*/
- public function set_source_class($class = 'SimplePie\Source')
+ public function set_source_class($class = Source::class)
{
- return $this->registry->register('Source', $class, true);
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.3, please use "SimplePie\SimplePie::get_registry()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->registry->register(Source::class, $class, true);
}
- /**#@-*/
/**
* Set the user agent string
@@ -1137,14 +1302,32 @@ class SimplePie
}
/**
+ * Set a namefilter to modify the cache filename with
+ *
+ * @param NameFilter $filter
+ *
+ * @return void
+ */
+ public function set_cache_namefilter(NameFilter $filter): void
+ {
+ $this->cache_namefilter = $filter;
+ }
+
+ /**
* Set callback function to create cache filename with
*
+ * @deprecated since SimplePie 1.8.0, use {@see set_cache_namefilter()} instead
+ *
* @param mixed $function Callback function
*/
public function set_cache_name_function($function = 'md5')
{
+ // trigger_error(sprintf('"%s()" is deprecated since SimplePie 1.8.0, please use "SimplePie\SimplePie::set_cache_namefilter()" instead.', __METHOD__), \E_USER_DEPRECATED);
+
if (is_callable($function)) {
$this->cache_name_function = $function;
+
+ $this->set_cache_namefilter(new CallableNameFilter($this->cache_name_function));
}
}
@@ -1352,8 +1535,8 @@ class SimplePie
// The default sanitize class gets set in the constructor, check if it has
// changed.
- if ($this->registry->get_class('Sanitize') !== 'SimplePie\Sanitize') {
- $this->sanitize = $this->registry->create('Sanitize');
+ if ($this->registry->get_class(Sanitize::class) !== 'SimplePie\Sanitize') {
+ $this->sanitize = $this->registry->create(Sanitize::class);
}
if (method_exists($this->sanitize, 'set_registry')) {
$this->sanitize->set_registry($this->registry);
@@ -1361,8 +1544,14 @@ class SimplePie
// Pass whatever was set with config options over to the sanitizer.
// Pass the classes in for legacy support; new classes should use the registry instead
- $this->sanitize->pass_cache_data($this->cache, $this->cache_location, $this->cache_name_function, $this->registry->get_class('Cache'));
- $this->sanitize->pass_file_data($this->registry->get_class('File'), $this->timeout, $this->useragent, $this->force_fsockopen, $this->curl_options);
+ $this->sanitize->pass_cache_data(
+ $this->enable_cache,
+ $this->cache_location,
+ $this->cache_namefilter,
+ $this->registry->get_class(Cache::class),
+ $this->cache
+ );
+ $this->sanitize->pass_file_data($this->registry->get_class(File::class), $this->timeout, $this->useragent, $this->force_fsockopen, $this->curl_options);
if (!empty($this->multifeed_url)) {
$i = 0;
@@ -1391,12 +1580,11 @@ class SimplePie
$cache = false;
if ($this->feed_url !== null) {
- $parsed_feed_url = $this->registry->call('Misc', 'parse_url', [$this->feed_url]);
+ $parsed_feed_url = $this->registry->call(Misc::class, 'parse_url', [$this->feed_url]);
// Decide whether to enable caching
- if ($this->cache && $parsed_feed_url['scheme'] !== '') {
- $filename = $this->get_cache_filename($this->feed_url);
- $cache = $this->registry->call('Cache', 'get_handler', [$this->cache_location, $filename, 'spc']);
+ if ($this->enable_cache && $parsed_feed_url['scheme'] !== '') {
+ $cache = $this->get_cache($this->feed_url);
}
// Fetch the data via \SimplePie\File into $this->raw_data
@@ -1406,13 +1594,13 @@ class SimplePie
return false;
}
- list($headers, $sniffed) = $fetched;
+ [$headers, $sniffed] = $fetched;
}
// Empty response check
if (empty($this->raw_data)) {
$this->error = "A feed could not be found at `$this->feed_url`. Empty body.";
- $this->registry->call('Misc', 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
+ $this->registry->call(Misc::class, 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
return false;
}
@@ -1433,7 +1621,7 @@ class SimplePie
if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) {
$encodings[] = strtoupper($charset[1]);
}
- $encodings = array_merge($encodings, $this->registry->call('Misc', 'xml_encoding', [$this->raw_data, &$this->registry]));
+ $encodings = array_merge($encodings, $this->registry->call(Misc::class, 'xml_encoding', [$this->raw_data, &$this->registry]));
$encodings[] = 'UTF-8';
} elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml') {
if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) {
@@ -1448,7 +1636,7 @@ class SimplePie
}
// Fallback to XML 1.0 Appendix F.1/UTF-8/ISO-8859-1
- $encodings = array_merge($encodings, $this->registry->call('Misc', 'xml_encoding', [$this->raw_data, &$this->registry]));
+ $encodings = array_merge($encodings, $this->registry->call(Misc::class, 'xml_encoding', [$this->raw_data, &$this->registry]));
$encodings[] = 'UTF-8';
$encodings[] = 'ISO-8859-1';
@@ -1458,16 +1646,16 @@ class SimplePie
// Loop through each possible encoding, till we return something, or run out of possibilities
foreach ($encodings as $encoding) {
// Change the encoding to UTF-8 (as we always use UTF-8 internally)
- if ($utf8_data = $this->registry->call('Misc', 'change_encoding', [$this->raw_data, $encoding, 'UTF-8'])) {
+ if ($utf8_data = $this->registry->call(Misc::class, 'change_encoding', [$this->raw_data, $encoding, 'UTF-8'])) {
// Create new parser
- $parser = $this->registry->create('Parser');
+ $parser = $this->registry->create(Parser::class);
// If it's parsed fine
if ($parser->parse($utf8_data, 'UTF-8', $this->permanent_url)) {
$this->data = $parser->get_data();
if (!($this->get_type() & ~self::TYPE_NONE)) {
$this->error = "A feed could not be found at `$this->feed_url`. This does not appear to be a valid RSS or Atom feed.";
- $this->registry->call('Misc', 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
+ $this->registry->call(Misc::class, 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
return false;
}
@@ -1477,7 +1665,8 @@ class SimplePie
$this->data['build'] = \SimplePie\Misc::get_build();
// Cache the file if caching is enabled
- if ($cache && !$cache->save($this)) {
+ $this->data['cache_expiration_time'] = $this->cache_duration + time();
+ if ($cache && ! $cache->set_data($this->get_cache_filename($this->feed_url), $this->data, $this->cache_duration)) {
trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
}
return true;
@@ -1508,7 +1697,7 @@ class SimplePie
}
}
- $this->registry->call('Misc', 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
+ $this->registry->call(Misc::class, 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
return false;
}
@@ -1517,19 +1706,35 @@ class SimplePie
* Fetch the data via \SimplePie\File
*
* If the data is already cached, attempt to fetch it from there instead
- * @param \SimplePie\Cache\Base|false $cache Cache handler, or false to not load from the cache
+ * @param Base|DataCache|false $cache Cache handler, or false to not load from the cache
* @return array|true Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type
*/
protected function fetch_data(&$cache)
{
+ if (is_object($cache) && $cache instanceof Base) {
+ // @trigger_error(sprintf('Providing $cache as "\SimplePie\Cache\Base" in %s() is deprecated since SimplePie 1.8.0, please provide "\SimplePie\Cache\DataCache" implementation instead.', __METHOD__), \E_USER_DEPRECATED);
+ $cache = new BaseDataCache($cache);
+ }
+
+ if ($cache !== false && ! $cache instanceof DataCache) {
+ throw new InvalidArgumentException(sprintf(
+ '%s(): Argument #1 ($cache) must be of type %s|false',
+ __METHOD__,
+ DataCache::class
+ ), 1);
+ }
+
+ $cacheKey = $this->get_cache_filename($this->feed_url);
+
// If it's enabled, use the cache
if ($cache) {
// Load the Cache
- $this->data = $cache->load();
+ $this->data = $cache->get_data($cacheKey, []);
+
if (!empty($this->data)) {
// If the cache is for an outdated build of SimplePie
if (!isset($this->data['build']) || $this->data['build'] !== \SimplePie\Misc::get_build()) {
- $cache->unlink();
+ $cache->delete_data($cacheKey);
$this->data = [];
}
// If we've hit a collision just rerun it with caching disabled
@@ -1539,20 +1744,21 @@ class SimplePie
}
// If we've got a non feed_url stored (if the page isn't actually a feed, or is a redirect) use that URL.
elseif (isset($this->data['feed_url'])) {
- // If the autodiscovery cache is still valid use it.
- if ($cache->mtime() + $this->autodiscovery_cache_duration > time()) {
- // Do not need to do feed autodiscovery yet.
- if ($this->data['feed_url'] !== $this->data['url']) {
- $this->set_feed_url($this->data['feed_url']);
- return $this->init();
- }
+ // Do not need to do feed autodiscovery yet.
+ if ($this->data['feed_url'] !== $this->data['url']) {
+ $this->set_feed_url($this->data['feed_url']);
+ $this->data['url'] = $this->data['feed_url'];
+
+ $cache->set_data($this->get_cache_filename($this->feed_url), $this->data, $this->autodiscovery_cache_duration);
- $cache->unlink();
- $this->data = [];
+ return $this->init();
}
+
+ $cache->delete_data($this->get_cache_filename($this->feed_url));
+ $this->data = [];
}
// Check if the cache has been updated
- elseif ($cache->mtime() + $this->cache_duration < time()) {
+ elseif (isset($this->data['cache_expiration_time']) && $this->data['cache_expiration_time'] > time()) {
// Want to know if we tried to send last-modified and/or etag headers
// when requesting this file. (Note that it's up to the file to
// support this, but we don't always send the headers either.)
@@ -1568,7 +1774,7 @@ class SimplePie
$headers['if-none-match'] = $this->data['headers']['etag'];
}
- $file = $this->registry->create('File', [$this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
+ $file = $this->registry->create(File::class, [$this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
$this->status_code = $file->status_code;
if ($file->success) {
@@ -1576,13 +1782,13 @@ class SimplePie
// Set raw_data to false here too, to signify that the cache
// is still valid.
$this->raw_data = false;
- $cache->touch();
+ $cache->set_data($cacheKey, $this->data, $this->cache_duration);
return true;
}
} else {
$this->check_modified = false;
if ($this->force_cache_fallback) {
- $cache->touch();
+ $cache->set_data($cacheKey, $this->data, $this->cache_duration);
return true;
}
@@ -1596,12 +1802,12 @@ class SimplePie
return true;
}
}
- // If the cache is empty, delete it
+ // If the cache is empty
else {
- $cache->unlink();
$this->data = [];
}
}
+
// If we don't already have the file (it'll only exist if we've opened it to check if the cache has been modified), open it.
if (!isset($file)) {
if ($this->file instanceof \SimplePie\File && $this->file->url === $this->feed_url) {
@@ -1610,7 +1816,7 @@ class SimplePie
$headers = [
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
];
- $file = $this->registry->create('File', [$this->feed_url, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
+ $file = $this->registry->create(File::class, [$this->feed_url, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
}
}
$this->status_code = $file->status_code;
@@ -1623,7 +1829,7 @@ class SimplePie
if (!$this->force_feed) {
// Check if the supplied URL is a feed, if it isn't, look for it.
- $locate = $this->registry->create('Locator', [&$file, $this->timeout, $this->useragent, $this->max_checked_feeds, $this->force_fsockopen, $this->curl_options]);
+ $locate = $this->registry->create(Locator::class, [&$file, $this->timeout, $this->useragent, $this->max_checked_feeds, $this->force_fsockopen, $this->curl_options]);
if (!$locate->is_feed($file)) {
$copyStatusCode = $file->status_code;
@@ -1665,7 +1871,7 @@ class SimplePie
// been called that object is untouched
unset($file);
$this->error = "A feed could not be found at `$this->feed_url`; the status code is `$copyStatusCode` and content-type is `$copyContentType`";
- $this->registry->call('Misc', 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
+ $this->registry->call(Misc::class, 'error', [$this->error, E_USER_NOTICE, __FILE__, __LINE__]);
return false;
}
}
@@ -1674,15 +1880,21 @@ class SimplePie
unset($file);
// This is usually because DOMDocument doesn't exist
$this->error = $e->getMessage();
- $this->registry->call('Misc', 'error', [$this->error, E_USER_NOTICE, $e->getFile(), $e->getLine()]);
+ $this->registry->call(Misc::class, 'error', [$this->error, E_USER_NOTICE, $e->getFile(), $e->getLine()]);
return false;
}
+
if ($cache) {
- $this->data = ['url' => $this->feed_url, 'feed_url' => $file->url, 'build' => \SimplePie\Misc::get_build()];
- if (!$cache->save($this)) {
+ $this->data = [
+ 'url' => $this->feed_url,
+ 'feed_url' => $file->url,
+ 'build' => \SimplePie\Misc::get_build(),
+ 'cache_expiration_time' => $this->cache_duration + time(),
+ ];
+
+ if (!$cache->set_data($cacheKey, $this->data, $this->cache_duration)) {
trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
}
- $cache = $this->registry->call('Cache', 'get_handler', [$this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc']);
}
}
$this->feed_url = $file->url;
@@ -1692,7 +1904,7 @@ class SimplePie
$this->raw_data = $file->body;
$this->permanent_url = $file->permanent_url;
$headers = $file->headers;
- $sniffer = $this->registry->create('Content_Type_Sniffer', [&$file]);
+ $sniffer = $this->registry->create(Sniffer::class, [&$file]);
$sniffed = $sniffer->get_type();
return [$headers, $sniffed];
@@ -2096,7 +2308,7 @@ class SimplePie
} catch (\SimplePie\Exception $e) {
if (!$this->enable_exceptions) {
$this->error = $e->getMessage();
- $this->registry->call('Misc', 'error', [$this->error, E_USER_WARNING, $e->getFile(), $e->getLine()]);
+ $this->registry->call(Misc::class, 'error', [$this->error, E_USER_WARNING, $e->getFile(), $e->getLine()]);
return '';
}
@@ -2115,9 +2327,9 @@ class SimplePie
public function get_title()
{
if ($return = $this->get_channel_tags(self::NAMESPACE_ATOM_10, 'title')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_ATOM_03, 'title')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_RSS_10, 'title')) {
return $this->sanitize($return[0]['data'], self::CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_RSS_090, 'title')) {
@@ -2175,7 +2387,7 @@ class SimplePie
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], self::CONSTRUCT_TEXT);
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
foreach ((array) $this->get_channel_tags(self::NAMESPACE_RSS_20, 'category') as $category) {
// This is really the label, but keep this as the term also for BC.
@@ -2186,13 +2398,13 @@ class SimplePie
} else {
$scheme = null;
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, null]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, null]);
}
foreach ((array) $this->get_channel_tags(self::NAMESPACE_DC_11, 'subject') as $category) {
- $categories[] = $this->registry->create('Category', [$this->sanitize($category['data'], self::CONSTRUCT_TEXT), null, null]);
+ $categories[] = $this->registry->create(Category::class, [$this->sanitize($category['data'], self::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_channel_tags(self::NAMESPACE_DC_10, 'subject') as $category) {
- $categories[] = $this->registry->create('Category', [$this->sanitize($category['data'], self::CONSTRUCT_TEXT), null, null]);
+ $categories[] = $this->registry->create(Category::class, [$this->sanitize($category['data'], self::CONSTRUCT_TEXT), null, null]);
}
if (!empty($categories)) {
@@ -2244,7 +2456,7 @@ class SimplePie
$email = $this->sanitize($author['child'][self::NAMESPACE_ATOM_10]['email'][0]['data'], self::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $uri !== null) {
- $authors[] = $this->registry->create('Author', [$name, $uri, $email]);
+ $authors[] = $this->registry->create(Author::class, [$name, $uri, $email]);
}
}
if ($author = $this->get_channel_tags(self::NAMESPACE_ATOM_03, 'author')) {
@@ -2261,17 +2473,17 @@ class SimplePie
$email = $this->sanitize($author[0]['child'][self::NAMESPACE_ATOM_03]['email'][0]['data'], self::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $url !== null) {
- $authors[] = $this->registry->create('Author', [$name, $url, $email]);
+ $authors[] = $this->registry->create(Author::class, [$name, $url, $email]);
}
}
foreach ((array) $this->get_channel_tags(self::NAMESPACE_DC_11, 'creator') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], self::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], self::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_channel_tags(self::NAMESPACE_DC_10, 'creator') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], self::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], self::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_channel_tags(self::NAMESPACE_ITUNES, 'author') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], self::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], self::CONSTRUCT_TEXT), null, null]);
}
if (!empty($authors)) {
@@ -2323,7 +2535,7 @@ class SimplePie
$email = $this->sanitize($contributor['child'][self::NAMESPACE_ATOM_10]['email'][0]['data'], self::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $uri !== null) {
- $contributors[] = $this->registry->create('Author', [$name, $uri, $email]);
+ $contributors[] = $this->registry->create(Author::class, [$name, $uri, $email]);
}
}
foreach ((array) $this->get_channel_tags(self::NAMESPACE_ATOM_03, 'contributor') as $contributor) {
@@ -2340,7 +2552,7 @@ class SimplePie
$email = $this->sanitize($contributor['child'][self::NAMESPACE_ATOM_03]['email'][0]['data'], self::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $url !== null) {
- $contributors[] = $this->registry->create('Author', [$name, $url, $email]);
+ $contributors[] = $this->registry->create(Author::class, [$name, $url, $email]);
}
}
@@ -2426,7 +2638,7 @@ class SimplePie
$keys = array_keys($this->data['links']);
foreach ($keys as $key) {
- if ($this->registry->call('Misc', 'is_isegment_nz_nc', [$key])) {
+ if ($this->registry->call(Misc::class, 'is_isegment_nz_nc', [$key])) {
if (isset($this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key])) {
$this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key]);
$this->data['links'][$key] =& $this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key];
@@ -2476,9 +2688,9 @@ class SimplePie
public function get_description()
{
if ($return = $this->get_channel_tags(self::NAMESPACE_ATOM_10, 'subtitle')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_ATOM_03, 'tagline')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_RSS_10, 'description')) {
return $this->sanitize($return[0]['data'], self::CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_RSS_090, 'description')) {
@@ -2509,9 +2721,9 @@ class SimplePie
public function get_copyright()
{
if ($return = $this->get_channel_tags(self::NAMESPACE_ATOM_10, 'rights')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_ATOM_03, 'copyright')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_RSS_20, 'copyright')) {
return $this->sanitize($return[0]['data'], self::CONSTRUCT_TEXT);
} elseif ($return = $this->get_channel_tags(self::NAMESPACE_DC_11, 'rights')) {
@@ -2686,17 +2898,17 @@ class SimplePie
*
* RSS 2.0 feeds are allowed to have a "feed logo" width.
*
- * Uses `<image><width>` or defaults to 88.0 if no width is specified and
+ * Uses `<image><width>` or defaults to 88 if no width is specified and
* the feed is an RSS 2.0 feed.
*
- * @return int|float|null
+ * @return int|null
*/
public function get_image_width()
{
if ($return = $this->get_image_tags(self::NAMESPACE_RSS_20, 'width')) {
- return round($return[0]['data']);
+ return intval($return[0]['data']);
} elseif ($this->get_type() & self::TYPE_RSS_SYNDICATION && $this->get_image_tags(self::NAMESPACE_RSS_20, 'url')) {
- return 88.0;
+ return 88;
}
return null;
@@ -2707,17 +2919,17 @@ class SimplePie
*
* RSS 2.0 feeds are allowed to have a "feed logo" height.
*
- * Uses `<image><height>` or defaults to 31.0 if no height is specified and
+ * Uses `<image><height>` or defaults to 31 if no height is specified and
* the feed is an RSS 2.0 feed.
*
- * @return int|float|null
+ * @return int|null
*/
public function get_image_height()
{
if ($return = $this->get_image_tags(self::NAMESPACE_RSS_20, 'height')) {
- return round($return[0]['data']);
+ return intval($return[0]['data']);
} elseif ($this->get_type() & self::TYPE_RSS_SYNDICATION && $this->get_image_tags(self::NAMESPACE_RSS_20, 'url')) {
- return 31.0;
+ return 31;
}
return null;
@@ -2792,31 +3004,31 @@ class SimplePie
if ($items = $this->get_feed_tags(self::NAMESPACE_ATOM_10, 'entry')) {
$keys = array_keys($items);
foreach ($keys as $key) {
- $this->data['items'][] = $this->registry->create('Item', [$this, $items[$key]]);
+ $this->data['items'][] = $this->registry->create(Item::class, [$this, $items[$key]]);
}
}
if ($items = $this->get_feed_tags(self::NAMESPACE_ATOM_03, 'entry')) {
$keys = array_keys($items);
foreach ($keys as $key) {
- $this->data['items'][] = $this->registry->create('Item', [$this, $items[$key]]);
+ $this->data['items'][] = $this->registry->create(Item::class, [$this, $items[$key]]);
}
}
if ($items = $this->get_feed_tags(self::NAMESPACE_RSS_10, 'item')) {
$keys = array_keys($items);
foreach ($keys as $key) {
- $this->data['items'][] = $this->registry->create('Item', [$this, $items[$key]]);
+ $this->data['items'][] = $this->registry->create(Item::class, [$this, $items[$key]]);
}
}
if ($items = $this->get_feed_tags(self::NAMESPACE_RSS_090, 'item')) {
$keys = array_keys($items);
foreach ($keys as $key) {
- $this->data['items'][] = $this->registry->create('Item', [$this, $items[$key]]);
+ $this->data['items'][] = $this->registry->create(Item::class, [$this, $items[$key]]);
}
}
if ($items = $this->get_channel_tags(self::NAMESPACE_RSS_20, 'item')) {
$keys = array_keys($items);
foreach ($keys as $key) {
- $this->data['items'][] = $this->registry->create('Item', [$this, $items[$key]]);
+ $this->data['items'][] = $this->registry->create(Item::class, [$this, $items[$key]]);
}
}
}
@@ -2849,8 +3061,7 @@ class SimplePie
*/
public function set_favicon_handler($page = false, $qs = 'i')
{
- $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
- trigger_error('Favicon handling has been removed, please use your own handling', $level);
+ trigger_error('Favicon handling has been removed, please use your own handling', \E_USER_DEPRECATED);
return false;
}
@@ -2861,8 +3072,7 @@ class SimplePie
*/
public function get_favicon()
{
- $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
- trigger_error('Favicon handling has been removed, please use your own handling', $level);
+ trigger_error('Favicon handling has been removed, please use your own handling', \E_USER_DEPRECATED);
if (($url = $this->get_link()) !== null) {
return 'https://www.google.com/s2/favicons?domain=' . urlencode($url);
@@ -2881,13 +3091,11 @@ class SimplePie
public function __call($method, $args)
{
if (strpos($method, 'subscribe_') === 0) {
- $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
- trigger_error('subscribe_*() has been deprecated, implement the callback yourself', $level);
+ trigger_error('subscribe_*() has been deprecated, implement the callback yourself', \E_USER_DEPRECATED);
return '';
}
if ($method === 'enable_xml_dump') {
- $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
- trigger_error('enable_xml_dump() has been deprecated, use get_raw_data() instead', $level);
+ trigger_error('enable_xml_dump() has been deprecated, use get_raw_data() instead', \E_USER_DEPRECATED);
return false;
}
@@ -2992,6 +3200,29 @@ class SimplePie
}
}
}
+
+ /**
+ * Get a DataCache
+ *
+ * @param string $feed_url Only needed for BC, can be removed in SimplePie 2.0.0
+ *
+ * @return DataCache
+ */
+ private function get_cache($feed_url = '')
+ {
+ if ($this->cache === null) {
+ // @trigger_error(sprintf('Not providing as PSR-16 cache implementation is deprecated since SimplePie 1.8.0, please use "SimplePie\SimplePie::set_cache()".'), \E_USER_DEPRECATED);
+ $cache = $this->registry->call(Cache::class, 'get_handler', [
+ $this->cache_location,
+ $this->get_cache_filename($feed_url),
+ Base::TYPE_FEED
+ ]);
+
+ return new BaseDataCache($cache);
+ }
+
+ return $this->cache;
+ }
}
class_alias('SimplePie\SimplePie', 'SimplePie');
diff --git a/vendor/simplepie/simplepie/src/Source.php b/vendor/simplepie/simplepie/src/Source.php
index d4e50bc4d..c7ed11600 100644
--- a/vendor/simplepie/simplepie/src/Source.php
+++ b/vendor/simplepie/simplepie/src/Source.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -53,7 +55,7 @@ namespace SimplePie;
* @package SimplePie
* @subpackage API
*/
-class Source
+class Source implements RegistryAware
{
public $item;
public $data = [];
@@ -65,7 +67,7 @@ class Source
$this->data = $data;
}
- public function set_registry(\SimplePie\Registry $registry)
+ public function set_registry(\SimplePie\Registry $registry)/* : void */
{
$this->registry = $registry;
}
@@ -102,9 +104,9 @@ class Source
public function get_title()
{
if ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'title')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'title')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_RSS_10, 'title')) {
return $this->sanitize($return[0]['data'], \SimplePie\SimplePie::CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_RSS_090, 'title')) {
@@ -147,7 +149,7 @@ class Source
if (isset($category['attribs']['']['label'])) {
$label = $this->sanitize($category['attribs']['']['label'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, $label]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, $label]);
}
foreach ((array) $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_RSS_20, 'category') as $category) {
// This is really the label, but keep this as the term also for BC.
@@ -158,13 +160,13 @@ class Source
} else {
$scheme = null;
}
- $categories[] = $this->registry->create('Category', [$term, $scheme, null]);
+ $categories[] = $this->registry->create(Category::class, [$term, $scheme, null]);
}
foreach ((array) $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_DC_11, 'subject') as $category) {
- $categories[] = $this->registry->create('Category', [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $categories[] = $this->registry->create(Category::class, [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_DC_10, 'subject') as $category) {
- $categories[] = $this->registry->create('Category', [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $categories[] = $this->registry->create(Category::class, [$this->sanitize($category['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
if (!empty($categories)) {
@@ -201,7 +203,7 @@ class Source
$email = $this->sanitize($author['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_10]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $uri !== null) {
- $authors[] = $this->registry->create('Author', [$name, $uri, $email]);
+ $authors[] = $this->registry->create(Author::class, [$name, $uri, $email]);
}
}
if ($author = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'author')) {
@@ -218,17 +220,17 @@ class Source
$email = $this->sanitize($author[0]['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_03]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $url !== null) {
- $authors[] = $this->registry->create('Author', [$name, $url, $email]);
+ $authors[] = $this->registry->create(Author::class, [$name, $url, $email]);
}
}
foreach ((array) $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_DC_11, 'creator') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_DC_10, 'creator') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
foreach ((array) $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ITUNES, 'author') as $author) {
- $authors[] = $this->registry->create('Author', [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
+ $authors[] = $this->registry->create(Author::class, [$this->sanitize($author['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT), null, null]);
}
if (!empty($authors)) {
@@ -265,7 +267,7 @@ class Source
$email = $this->sanitize($contributor['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_10]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $uri !== null) {
- $contributors[] = $this->registry->create('Author', [$name, $uri, $email]);
+ $contributors[] = $this->registry->create(Author::class, [$name, $uri, $email]);
}
}
foreach ((array) $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'contributor') as $contributor) {
@@ -282,7 +284,7 @@ class Source
$email = $this->sanitize($contributor['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_03]['email'][0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
}
if ($name !== null || $email !== null || $url !== null) {
- $contributors[] = $this->registry->create('Author', [$name, $url, $email]);
+ $contributors[] = $this->registry->create(Author::class, [$name, $url, $email]);
}
}
@@ -343,7 +345,7 @@ class Source
$keys = array_keys($this->data['links']);
foreach ($keys as $key) {
- if ($this->registry->call('Misc', 'is_isegment_nz_nc', [$key])) {
+ if ($this->registry->call(Misc::class, 'is_isegment_nz_nc', [$key])) {
if (isset($this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key])) {
$this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]);
$this->data['links'][$key] =& $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key];
@@ -367,9 +369,9 @@ class Source
public function get_description()
{
if ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'subtitle')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'tagline')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_RSS_10, 'description')) {
return $this->sanitize($return[0]['data'], \SimplePie\SimplePie::CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_RSS_090, 'description')) {
@@ -392,9 +394,9 @@ class Source
public function get_copyright()
{
if ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_10, 'rights')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_10_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_ATOM_03, 'copyright')) {
- return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
+ return $this->sanitize($return[0]['data'], $this->registry->call(Misc::class, 'atom_03_construct_type', [$return[0]['attribs']]), $this->get_base($return[0]));
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_RSS_20, 'copyright')) {
return $this->sanitize($return[0]['data'], \SimplePie\SimplePie::CONSTRUCT_TEXT);
} elseif ($return = $this->get_source_tags(\SimplePie\SimplePie::NAMESPACE_DC_11, 'rights')) {
diff --git a/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php b/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php
index 44d9416d2..5062e683f 100644
--- a/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php
+++ b/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SimplePie
*
@@ -75,54 +77,29 @@ class Parser
*/
public $standalone = false;
- /**
- * @access private
- */
- const STATE_BEFORE_VERSION_NAME = 'before_version_name';
- /**
- * @access private
- */
- const STATE_VERSION_NAME = 'version_name';
- /**
- * @access private
- */
- const STATE_VERSION_EQUALS = 'version_equals';
- /**
- * @access private
- */
- const STATE_VERSION_VALUE = 'version_value';
- /**
- * @access private
- */
- const STATE_ENCODING_NAME = 'encoding_name';
- /**
- * @access private
- */
- const STATE_EMIT = 'emit';
- /**
- * @access private
- */
- const STATE_ENCODING_EQUALS = 'encoding_equals';
- /**
- * @access private
- */
- const STATE_STANDALONE_NAME = 'standalone_name';
- /**
- * @access private
- */
- const STATE_ENCODING_VALUE = 'encoding_value';
- /**
- * @access private
- */
- const STATE_STANDALONE_EQUALS = 'standalone_equals';
- /**
- * @access private
- */
- const STATE_STANDALONE_VALUE = 'standalone_value';
- /**
- * @access private
- */
- const STATE_ERROR = false;
+ private const STATE_BEFORE_VERSION_NAME = 'before_version_name';
+
+ private const STATE_VERSION_NAME = 'version_name';
+
+ private const STATE_VERSION_EQUALS = 'version_equals';
+
+ private const STATE_VERSION_VALUE = 'version_value';
+
+ private const STATE_ENCODING_NAME = 'encoding_name';
+
+ private const STATE_EMIT = 'emit';
+
+ private const STATE_ENCODING_EQUALS = 'encoding_equals';
+
+ private const STATE_STANDALONE_NAME = 'standalone_name';
+
+ private const STATE_ENCODING_VALUE = 'encoding_value';
+
+ private const STATE_STANDALONE_EQUALS = 'standalone_equals';
+
+ private const STATE_STANDALONE_VALUE = 'standalone_value';
+
+ private const STATE_ERROR = false;
/**
* Current state of the state machine