- Remove HHVM
HHVM recently announced ending PHP support:
https://hhvm.com/blog/2018/09/12/end-of-php-support-future-of-hack.html
"HHVM v3.30 will be the last release series where HHVM aims to support
PHP. [...] Ultimately, we recommend that projects either migrate
entirely to the Hack language, or entirely to PHP7 and the PHP runtime."
RSS-Bridge never "officially" supported HHVM, so support can be removed.
- Use composer for all versions
PHP 5.6 is using PEAR, while all other versions use Composer to manage
packages and dependencies. This commit removes PEAR for PHP 5.6 in favor
of Composer. This also simplifies the script.
- Add PHP compatibility tests
Uses https://github.com/PHPCompatibility/PHPCompatibility
RSS-Bridge supports PHP 5.6 or higher. This commit adds tests to check
compatibility and detect breaking changes.
"phpcompatibility.xml" contains the ruleset.
Notice: Technically RSS-Bridge requires PHP 5.6.1, but for some reason
PHPCompatibility doesn't accept "5.6.1" for "testVersion". This is why
INI_SCANNER_TYPED is excluded from tests.
- Rearrange tests
PHP 5.6:
- Coding style (phpcs.xml)
- PHP compatibility (phpcompatibility.xml)
PHP 7.0:
- Coding style (phpcs.xml)
- Unit tests (phpunit.xml) - using stable release of PHPUnit
PHP nightly:
- Coding style (phpcs.xml)
- Unit tests (phpunit.xml) - using latest version of PHPUnit
- PHP compatibility - no exceptions for PHP 5.6+
- Documentation added to improve maintainability
This commit adds filters to remove embedded videos and view counts from
all posts. This doesn't remove the preview image for videos, which are
embedded separately.
Hidden elements are used for error conditions and generally made
visible using JavaScript. Since RSS-Bridge doesn't support JS, these
error messages are shown in the final feed. For example:
"It looks like you may be having problems playing this video. If so,
please try restarting your browser."
This commit removes all hidden elements to prevent error messages being
added to the feed.
- "It looks like you may be having problems playing this video. If so,
please try restarting your browser."
FB includes origin information (i.e. "YOUTUBE.COM") as well as
descriptions with embedded media (images and video).
These details are currently being removed by the bridge.
This commit changes implementation to only remove origin information
and keep the media description in place. The media description consists
of two elements - title and description. The title provided by FB is
included in an anchor, which gets replaced by a paragraph with the
same contents to improve readability.
References #912
- PATH_LIB_BRIDGES defines the path to bridges
- PATH_LIB_FORMATS defines the path to formats
- PATH_LIB_CACHES defines the path to caches
Include constants in RssBridge.php for consistency
Move CACHE_DIR from index.php to /lib/RssBridge.php and change name
to PATH_CACHE.
PATH_CACHE is one of the core paths of RSS-Bridge and should therefore
be defined in the core file RssBridge.php.
- Remove file documentation and license remark (defined in repository
scope - see README / UNLICENSE)
- Remove example usage (if necessary should be included in the Wiki)
"The require_once statement is identical to require except PHP will
check if the file has already been included, and if so, not include
(require) it again."
-- http://php.net/manual/en/function.require-once.php
Vendor files (simple_html_dom.php and urljoin.php) are included in the
repository and therefore shipped with all releases. If one of the files
is missing, either the repository or the release is incomplete.
PHP will generate error messages if either of the files is missing, so
there is no need to check availability manually unless it is done for
all files (which doesn't make sense because they are part of the
repository).