0

I am trying to use the readability library for the link and it is giving the error:

Error processing text: Could not parse text.

Below are my local machine details:

PHP Version: 7.4.21

Readability Version "fivefilters/readability.php": "dev-master"

On my remote machine, the same URL gives an error.

Remote Digital Ocean Machine has PHP 8.1.2 is installed:

Deprecated: Return type of fivefilters\Readability\Nodes\NodeTrait::getAttribute($attributeName) should either be compatible with DOMElement::getAttribute(string $qualifiedName): string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/xx/vendor/fivefilters/readability.php/src/Nodes/NodeTrait.php on line 170

Deprecated: Return type of fivefilters\Readability\Nodes\NodeTrait::hasAttribute($attributeName) should either be compatible with DOMElement::hasAttribute(string $qualifiedName): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/xx/vendor/fivefilters/readability.php/src/Nodes/NodeTrait.php on line 188

I have opened the issue but am not sure when it will be resolved.

My main concern right now is to suppress Depreciated message at least for now.

Volatil3
  • 14,253
  • 38
  • 134
  • 263
  • That class is not created by you, so what you can do is report and wait, or fork repository and fix it yourself, or use other class instead. – vee Sep 12 '22 at 16:00

0 Answers0