-
Notifications
You must be signed in to change notification settings - Fork 190
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
Fix/php8.1 depreciation #1861
Fix/php8.1 depreciation #1861
Conversation
2c32fb8
to
77d9a39
Compare
Codecov Report
@@ Coverage Diff @@
## master #1861 +/- ##
============================================
- Coverage 91.62% 91.49% -0.14%
- Complexity 778 793 +15
============================================
Files 65 65
Lines 2724 2776 +52
============================================
+ Hits 2496 2540 +44
- Misses 228 236 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
41ea5aa
to
5dffb7a
Compare
While doing some research I found that phpstan can also scan for deprecation declarations. |
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
f3a012a
to
42886b7
Compare
I think now I fixed every php deprecation warning I found regarding null as input for a function that expexts string doesn't make the code prettier but ok. |
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
be4cf4e
to
8d1d53c
Compare
I'm thinking that the json that we export should maybe only contain strings and just convert null into empty strings. |
In my opinion |
Okay then we keep it this way :) |
add phpstan deprecation rules Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com> Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
753ae93
to
24f07c6
Compare
You apparently overwrote some changes while force-pushing .. the latest suggested changes in OPMLExporter.php and Item.php are missing in the merged commit. |
Oh unlucky I guess my rebase was not correct :( |
Changed - Ported the admin settings to vue (#2353) Fixed - Fix PHP 8.1 deprecations (#1861) - Document api item types (#1861) - Fix deprecation warnings from Nextcloud server (#1869) - Fix when marking all items as read, all items of the user are used in the sql query (#1873) - Fix adding feed via the web-ui that was just deleted causing an error (#1872) Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Changed - Ported the admin settings to vue (#2353) Fixed - Fix PHP 8.1 deprecations (#1861) - Document api item types (#1861) - Fix deprecation warnings from Nextcloud server (#1869) - Fix when marking all items as read, all items of the user are used in the sql query (#1873) - Fix adding feed via the web-ui that was just deleted causing an error (#1872) Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
This is supposed to fix all the deprication warnings of php 8.1 that I can find. It seems like mainly to be that you can't pass null to a method that expects a string. Old behaviour of these methods was to interpret null as
""
which then is usually also the output.This will change the api behavior same like the change for the author did. Even though it was never declared I think it is fair to put this into news 19.0.0 as major change.
To fix the docs gap I also checked which attributes of an item are exposed via the api sorted alphabetically and added default + type info. Most types default will probably be null. But I didn't want to put that because I wasn't sure.