feediron / ttrss_plugin-feediron

Evolution of ttrss_plugin-af_feedmod
https://discourse.tt-rss.org/t/plugin-update-feediron-v1-2-0/2018
MIT License
212 stars 34 forks source link

PHP8-support as TT-RSS moved to PHP8 recently #166

Closed meyca closed 3 years ago

meyca commented 3 years ago

Expected Behavior

With TT-RSS default setup having moved to PHP8, I would expect the Plugin to also support PHP8.

Current Behavior

Currently there are "Undefined array key" warnings in the TT-RSS logs.

Steps to Reproduce

Use latest docker-compose TT-RSS setup from https://git.tt-rss.org/fox/ttrss-docker-compose/src/branch/master and install feediron into ./plugins.local

Once feeds are updated log warnings are likely to occur.

Failure Information (for bugs)

example logs:

plugins/af_readability/vendor/andreskrey/Readability/Readability.php:199
usort():** Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero
plugins.local/feediron/init.php:575 
Undefined array key "modify"
dugite-code commented 3 years ago

For readability I just have to update the pinned version, and it looks like is_array has been deprecated

humm turns out that's the isArray() I'll have to look into that one a bit more

dugite-code commented 3 years ago

So readability.php hasn't received a new release recently however I think I've fixed the is_array issue in feediron, I just haven't been able to test it yet.

https://github.com/feediron/ttrss_plugin-feediron/tree/php8_dev

Note: I've opened an issue upstream

dugite-code commented 3 years ago

Ok I've done a bit of testing, I'm only seeing intermitant warnings with Readbility myself after all. It still looks to be outputting the expected result, at least in my case.

As for the Undefined array key warnings, PHP 8 apparently switched this from a Notice event to a Warning event. Everything really should still work fine. I'm going to make all the array tests more explicit to avoid this warning

dugite-code commented 3 years ago

I have merged a number of php8 fixes into master