-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Support PHP8.1 #29287
Comments
cc @come-nc since you asked :) |
I checked the 3rdparty repo and no dep is actively blocking php8.1 right now (overrode the version number to test this) |
Hello. I know at least that the use of LDAP resources will be a problem since there are calls to is_resource on ldap_* results in nextcloud code, and those are turned into objects instead in PHP 8.1. I’d be happy to start a PR to work on that if you want, and at least make sure the unittest suite for user_ldap works on 8.1. I can try to work on the rest of the test suite but I know less about it. It seems PHPCompatibility is not uptodate for 8.1 yet but at least they provide a nice list of things to look for: PHPCompatibility/PHPCompatibility#1299 |
There is this error for PHP 8.0 already:
Not sure if this is known already, so noting it here before I forget. |
thanks for the ping @ChristophWurst given the amount of time and people I'd not rush this for 23.0.0 also given the fact that apps might just break because they have php8.1 issues and that covers ours as well as community apps. So this seems to be to short notice for app devs and likely is also to risky for us and the v23 timeline given that we already reach beta status. |
Needed for 8.1 support:
|
Does anyone know the reason for d690f90 ? |
I suggest we revert ans see what happens :) |
There is a PHP error triggered by the call at https://github.com/nextcloud/server/blob/master/lib/private/Files/Cache/Propagator.php#L89 , because the second parameter is not given and it defaults to |
|
@LukasReschke will give you a lesson about it |
The tests for Archive run into this problem: https://stackoverflow.com/questions/64698935/using-ziparchive-with-php-8-and-temporary-files
But I get a misterious warning at the end of the tests:
No idea if the actual code is concerned. |
In several cases there are PHP warnings in the tests because the Mock returns null instead of string or int. |
opis/closure#107 (comment) (and related opis/closure#102 ) sounds like bad news. |
doctrine/dbal#4906 (comment) This is good news on the other hand :-) |
queryBuilder::getFirstResult in doctrine now always returns an int, which defaults to 0 instead of null. Should I just remove the null from the dataset for this test? |
That has already been addressed in #29344 |
sabre/dav will need to be updated to a newer release when one is published with PHP 8.1 support. There are already PRs fixing 8.1 support for both sabre/dav and sabre/vobject it seems. |
@skjnldsv reading through the latest comments I think we definitely stick with maxPhpVerison = 8.0 for 23 - what do you think? |
@AndyScherzinger Sounds reasonable, seeing how much both Nextcloud code and the dependencies code is impacted. (And I’m still working on core, I did not tackle the apps yet…) |
Version 3.5.0 should support 8.1: https://github.com/silexphp/Pimple/blob/main/CHANGELOG |
hi guys and girls. is there any plans to help people stuck on nc22 upgrade to nc24? (IE an easier upgrade path) |
I haven't tried this but if you can get older php binary somehow in the system (phpenv, etc), maybe try running |
@jclsn @elyograg @jamiew0w @C0rn3j et al Maybe this workaround will help for Ubuntu 22.04 and Nextcloud 22/23/24, at least our tests worked fine and clean. Ondrej (now) provides php 8.0 packages for Jammy 22.04 (https://launchpad.net/~ondrej/+archive/ubuntu/php) HowTo add php8.0 under Ubuntu 22.04
sudo apt update
apt-get install php8.0 php8.0-cli php8.0-fpm .....
sudo update-alternatives --config php P.S: Probably you need to change/restart the fastcgi_pass unix:/run/php/php-fpm.sock; in your apache/nginx configuration to point out to /var/run/php/php8.0-fpm.sock P.S2: You can also delete all php-8.1 system packages if no more system dependencies exist, but IMHO is better having both versions available in the system. @AndyScherzinger @pooh22 First of all a big thank you and real acknowledge to the NC team, great job!. It is plain to see the big effort you made this past months. Said so, IMHO, this issue could be addressed more politely from the developer team. (some ;) Claims are nicely motivated and explained and replies like "So I keep my fingers crossed looking at 8.2 of PHP that we won't run into the same scenario and all the used libraries will support it right from the start but there is no guarantee." do not provide trustworthiness in this project. I know and understand that this is a community initiative lead by NC staff, so the community (we would like to believe we belong to) must actively contribute and not only complain about "my own needs". This is why we share this "howto" in order to help address this problem. Sorry for the looong post ;) Thank you! |
Got bitten by this by a fedora 36 upgrade. Downgardig to php 8.0, this saved my day: |
Thanks @notandxor! It's also possible to install php 8.0 as a separate version and use it for upgrading only, i.e., without downgrading php system-wide. Workaround for Fedora 36 - enabling remi and installing php 8.0 in parallel with php 8.1
Once php 8.0 is installed, do manual upgrade with php80. I applied
I upgraded 22.2.5 => 22.2.8 => 23.0.5 with php80 and after that upgraded nc to 24.0.1 using default php from the fedora repository. So far 24.0.1 has been working fine with php 8.1. |
I've kept my
Note that Arch Linux doesn't support partial upgrades, so this was expected to happen at some point. I just hoped that I didn't have to hold on the PHP system packages for ~7 months, and now the system itself is starting to fall apart. How am I supposed to tackle this when the upgrade to NC 24 comes to my instance, since As a lesson for next time, could you guys start testing NC against the upcoming version of PHP before the new version is rolled out to all the systems out there, instead of being caught by surprise every time, and rush to get a fix after the first issues have already been open? |
@blacklight you should not have needed to hold back PHP versions, as Arch patched their Nextcloud 23 to support PHP 8.1 months ago beginning in January archlinux/svntogit-community@c78893c Also mentioned at the start of https://wiki.archlinux.org/title/Nextcloud |
@blacklight Had my PHP on hold to for a while, but upgraded to v24.0.0 a week or two ago, released the hold and upgraded everything. It all works very good again now, and think actually NC got a bit faster (feels snappier anyway). Just updated to 24.0.1 yesterday, still running good. I don't use NC package from repo thou because of my structure on my web server and stuff. |
I don't have the NC package installed via pacman. I installed it directly in my Apache directory because of quirks/customizations with my server. And the upgrade to NC 24 hasn't yet come in my mailbox. And when it comes, it's likely to break because of the mismatch between expected/available dependencies of PHP. What shall I do in this case? A few options:
|
@blacklight You should be able to upgrade thru the UI (or shell), v24.0.0 has been there for a while now (and also v24.0.1, at least for the stable release). I did my upgrade a couple of weeks ago. Can confirm that it works with latest PHP in arch repo. I upgraded NC first, then released the packages and did pacman -Syyu on everything. |
On Arch, php7 is still part of the official repos. I keep both of them
installed just in case. Not the most minimalistic, but they tend to upgrade
php really quickly, so it's a good idea to have it installed just in case.
…On Wed, May 25, 2022 at 5:56 AM Michael ***@***.***> wrote:
@blacklight <https://github.com/BlackLight> You should be able to upgrade
true the UI (or shell), v24.0.0 has been there for a while now (and also
v24.0.1). I did my upgrade a couple of weeks ago. Can confirm that it works
with latest PHP in arch repo. I upgraded NC first, then released the
packages and did pacman -Syyu on everything.
—
Reply to this email directly, view it on GitHub
<#29287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHWYSCB5AZJ5YNL35J7JH3VLX2N7ANCNFSM5GF5B4XQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@blacklight if the updater doesn't offer v24 yet, just switch to the beta channel, than it will pop-up, upgrade to 24, then switch back to stable. This way you can work around the staged roll-out. @rdlab-upc regarding the trustworthiness I feel the need to reply to that and clearify this a bit more. Also thank you for your detailed comment and guidance for others. We do our best to prevent such situations, see i.e. nextcloud/groupware#40 where we try to catch such things early on. Like I stated Nextcloud like many software systems nowadays depend on 3rd party libraries to implement their functionality i.e. horde and sabreDAV. So when the 3rd party libraries aren't yet compatible then also Nextcloud is stuck with the defined PHP versions. Because of that we do document the versions Nextcloud is compatible with. Sometimes you are lucky and can work around incompatibilities in libraries, sometimes you can't. So there is nothing you as a dev can do about this. |
@AndyScherzinger thanks for the instructions. I have eventually managed to upgrade manually (downloaded the latest zip to the Apache dir and ran |
My pleasure @blacklight and happy to hear you arrived on 24 safely 👍 |
Several errors:
3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php#144:
apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Headers/Element.php#145:
|
@VVD please raise this at https://github.com/nextcloud/mail/issues including the version infos server/mail-app
|
Can't find files |
https://github.com/nextcloud/3rdparty / https://packagist.org/packages/swiftmailer/swiftmailer
https://github.com/bytestream/Mime, addressed in bytestream/Mime#3 and pulled via nextcloud/mail#6647. Unreleased. |
Thanks for information.
Found commit with PHP8.1 support: swiftmailer/swiftmailer@ee8a1d9
Already fixed, but when we can see it in our installation? What are the plans? |
During upgrade from 24.0.2 to 24.0.3 I got error:
Patch:
|
(nextcloud/server#29287) This version of Nextcloud is not compatible with PHP>=8.2. You are currently running 8.2.0alpha1. Reported by: Kevin Day (kevin@your.org)
Support issue is closed as fixed: nextcloud/server#29287
@ChristophWurst (cc @AndyScherzinger ) What about the existing fixes swiftmailer/swiftmailer@ee8a1d9 that were not yet integrated into https://github.com/nextcloud/3rdparty/tree/master/swiftmailer/swiftmailer ? |
Could you open that as a separate ticket please @creopard? Then one of the server engineers can have a look. |
According to https://php.watch/news/2021/03/php81-release-date PHP8.1 will be released by end of next month. That will mean the release happens somewhere around the release of Nextcloud 23 and we can assume that the early adopters will soon update their systems and find out Nextcloud 23 doesn't support 8.1. Ref
server/lib/versioncheck.php
Lines 36 to 42 in 8226231
As far as I know php8.1 is "just" a minor release but some libs/code have to be adjusted. We'll have to decide whether to look into this for 23, 23.1 or 24.
Potential breaking changes
cc @AndyScherzinger @juliushaertl @nickvergessen @skjnldsv
The text was updated successfully, but these errors were encountered: