From 11d2946904a58a04b9c1e859c013cd96d893e5da Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 25 Jun 2019 16:54:38 +0200 Subject: [PATCH 1/2] Add openload.co to media detection --- phpunit.xml.dist | 1 - src/Readability.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 154e969..e45540e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,7 +7,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="vendor/autoload.php" > diff --git a/src/Readability.php b/src/Readability.php index 4a855ca..ff262be 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -95,7 +95,7 @@ class Readability implements LoggerAwareInterface 'negative' => '/bottom|stat|info|discuss|e[\-]?mail|comment|reply|log.{2}(n|ed)|sign|single|combx|com-|contact|_nav|link|media|promo|\bad-|related|scroll|shoutbox|sidebar|sponsor|shopping|teaser|recommend/i', 'divToPElements' => '/<(?:blockquote|header|section|code|div|article|footer|aside|img|p|pre|dl|ol|ul)/mi', 'killBreaks' => '/(([ \r\n\s]| ?)*)+/', - 'media' => '!//(?:[^\.\?/]+\.)?(?:youtu(?:be)?|giphy|soundcloud|dailymotion|vimeo|pornhub|xvideos|twitvid|rutube|viddler)\.(?:com|be|org|net)/!i', + 'media' => '!//(?:[^\.\?/]+\.)?(?:youtu(?:be)?|giphy|soundcloud|dailymotion|vimeo|pornhub|xvideos|twitvid|rutube|openload\.co|viddler)\.(?:com|be|org|net)/!i', 'skipFootnoteLink' => '/^\s*(\[?[a-z0-9]{1,2}\]?|^|edit|citation needed)\s*$/i', ]; public $tidy_config = [ From bb75b4f0899540c4ca1fe456212e7ce3cdb73eaf Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 25 Jun 2019 17:06:49 +0200 Subject: [PATCH 2/2] Fix PHPStan --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 334ba3a..27190e1 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,4 +5,4 @@ includes: parameters: # https://github.com/phpstan/phpstan/issues/694#issuecomment-350724288 autoload_files: - - vendor/bin/.phpunit/phpunit-6.5/vendor/autoload.php + - vendor/bin/.phpunit/phpunit-7.4/vendor/autoload.php