Skip to content

PHP 8 support #1236

@jtojnar

Description

@jtojnar

PHP 8 introduced many breaking changes, revealing many issues both in selfoss and the libraries we use. I have added basic integration test but that is very incomplete so more manual testing is needed.

  • Integration test fails. Fixed by 71ff3b5.

  • Updating a single source, Twitter list without optional parameters and feed that returns HTML file for favicon.ico fails. Fixed by 7a03939.

  • Dice triggers E_DEPRECATIONPHP 8 Deprecation Level-2/Dice#192 – 🤷‍♀️ working around this by silencing deprecation warnings (71ff3b5).

  • Favicons not working – Fix handle validation on PHP 8 smottt/WideImage#18

  • rss feed https://dolphin-emu.org/blog/feeds/ crashes in simplepie: that is likely ddos protection

    DOMDocument::loadHTML(): Argument #1 ($source) must not be empty {"exception":"[object] (ValueError(code: 0): DOMDocument::loadHTML(): Argument #1 ($source) must not be empty at /var/www/selfoss/vendor/simplepie/simplepie/library/SimplePie/Locator.php:83)
    [stacktrace]
    #0 /var/www/selfoss/vendor/simplepie/simplepie/library/SimplePie/Locator.php(83): DOMDocument->loadHTML('')
    #1 [internal function]: SimplePie_Locator->__construct(Object(helpers\\SimplePieFileGuzzle), 10, 'Selfoss/2.19-SN...', 10, false, Array)
    #2 /var/www/selfoss/vendor/simplepie/simplepie/library/SimplePie/Registry.php(183): ReflectionClass->newInstanceArgs(Array)
    #3 /var/www/selfoss/vendor/simplepie/simplepie/library/SimplePie.php(1644): SimplePie_Registry->create('Locator', Array)
    #4 /var/www/selfoss/vendor/simplepie/simplepie/library/SimplePie.php(1381): SimplePie->fetch_data(Object(SimplePie_Cache_File))
    #5 /var/www/selfoss/src/helpers/FeedReader.php(47): SimplePie->init()
    #6 /var/www/selfoss/src/spouts/rss/feed.php(59): helpers\\FeedReader->load('https://dolphin...')
    ss\\feed->load(Array)rc/helpers/ContentLoader.php(129): spouts\
    #8 /var/www/selfoss/src/helpers/ContentLoader.php(67): helpers\\ContentLoader->fetch(Array)
    #9 /var/www/selfoss/src/controllers/Sources/Update.php(37): helpers\\ContentLoader->update()
    #10 /var/www/selfoss/vendor/bcosca/fatfree-core/base.php(1960): controllers\\Sources\\Update->updateAll(Object(Base), Array, 'controllers\\\\Sou...')
    #11 /var/www/selfoss/vendor/bcosca/fatfree-core/base.php(1759): Base->call(Array, Array, Array)
    #12 /var/www/selfoss/index.php(57): Base->run()
    #13 /var/www/selfoss/run.php(28): require('/var/www/selfos...')
    #14 {main}
  • Error handler fails in CLI mode – Undefined index: trace in base.php on line 1379 f3-factory/fatfree-core#323

  • helpers\Storage\FileStorage triggers E_WARNING on permission error from file_put_contents: 07121f1

  • fix ContentLoader warnings not being supressed 142b47e

  • Many internal functions throw an Error now – Dolphin feed fails with Argument must not be empty in SimplePie #1237. Fixed in 73c60f1

  • Error handler removed when mbstring is used Pair error handler restoration properly ddeboer/transcoder#5

  • Running cliupdate.php fails cliupdate need to set $_SERVER[SERVER_PORT] #1238

  • Number of small undefined array keys: d56a871, 533c833, 9e7b6c5, c68b3a3, e6d78a2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions