Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8 support #1236

Closed
10 of 12 tasks
jtojnar opened this issue Dec 17, 2020 · 2 comments
Closed
10 of 12 tasks

PHP 8 support #1236

jtojnar opened this issue Dec 17, 2020 · 2 comments
Labels
Milestone

Comments

@jtojnar
Copy link
Member

jtojnar commented Dec 17, 2020

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

@jtojnar jtojnar added the bug label Dec 17, 2020
@jtojnar jtojnar added this to the 2.19 milestone Dec 17, 2020
jtojnar added a commit that referenced this issue Jan 10, 2021
Fixes favicons with PHP 8, see #1236
@GutHib
Copy link

GutHib commented Feb 1, 2021

Thanks! Appreciating your work and looking forward to the update. :)

@jtojnar
Copy link
Member Author

jtojnar commented May 23, 2021

Since upstream has not been responding, I have forked transcoder and published our fixes there: https://github.com/fossar/transcoder

That should cover all critical incompatibilities I have seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@jtojnar @GutHib and others