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

Allow php 8.2 #36375

Merged
merged 5 commits into from
Feb 2, 2023
Merged

Allow php 8.2 #36375

merged 5 commits into from
Feb 2, 2023

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Jan 26, 2023

Summary

PHP 8.2 is now tested enough to be allowed to be used with master.
There should be no big problems with it, apart from the mailer, until the migration to symfony mailer is finished.

Checklist

@come-nc come-nc added the 2. developing Work in progress label Jan 26, 2023
@come-nc come-nc added this to the Nextcloud 26 milestone Jan 26, 2023
@come-nc come-nc self-assigned this Jan 26, 2023
@come-nc come-nc mentioned this pull request Jan 26, 2023
19 tasks
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 26, 2023
@come-nc come-nc requested review from PVince81, a team, ArtificialOwl and blizzz and removed request for a team January 26, 2023 09:51
@ChristophWurst
Copy link
Member

PHP 8.2 is now tested enough to be allowed to be used with master.

I've been running it locally for over a week with a modified version check. There are a few deprecation logs here and there but so far I have not found any breakage 👍

@ChristophWurst ChristophWurst added the pending documentation This pull request needs an associated documentation update label Jan 26, 2023
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@come-nc
Copy link
Contributor Author

come-nc commented Jan 26, 2023

PHP 8.2 is now tested enough to be allowed to be used with master.

I've been running it locally for over a week with a modified version check. There are a few deprecation logs here and there but so far I have not found any breakage +1

Please do open issues or PR for these deprecation warnings though :-P

Our CI is not catching them it seems, oci on 8.2 is passing while on my test PR it’s not: https://github.com/nextcloud/server/actions/runs/4013641040/jobs/6893223191
I think it’s the ini development thing, I’ll try adding it here.

@ChristophWurst
Copy link
Member

Please do open issues or PR for these deprecation warnings though :-P

You were too fast. Earlier I checked my logs for dynamic property warnings and you took care of them already in the meantime.

The remainders are

"Creation of dynamic property ScssPhp\\ScssPhp\\Block::$name is deprecated at /nextcloud/3rdparty/scssphp/scssphp/src/Parser.php#854"
"Creation of dynamic property ScssPhp\\ScssPhp\\Compiler\\Environment::$parentStore is deprecated at /nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#5039"
"Creation of dynamic property ScssPhp\\ScssPhp\\Compiler\\Environment::$selectors is deprecated at /nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#1872"

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo, once merged I shall bump all CIs of apps again

@blizzz blizzz mentioned this pull request Feb 1, 2023
@come-nc
Copy link
Contributor Author

come-nc commented Feb 2, 2023

/rebase

@nickvergessen
Copy link
Member

There were 22 errors:

1) Test\Files\Cache\ScannerTest::testBackgroundScan
trim(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Storage/Common.php:762
/home/runner/work/server/server/lib/private/Files/Cache/Scanner.php:327
/home/runner/work/server/server/lib/private/Files/Cache/Scanner.php:529
/home/runner/work/server/server/lib/private/Files/Cache/Scanner.php:541
/home/runner/work/server/server/lib/private/Files/Cache/Scanner.php:528
/home/runner/work/server/server/tests/lib/Files/Cache/ScannerTest.php:163

2) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #0 ('/source.txt', '/target.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

3) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #1 ('/source.txt', '/target with space.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

4) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #2 ('/source with space.txt', '/target.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

5) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #3 ('/source with space.txt', '/target with space.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

6) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #4 ('/source.txt', '/tärgét.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

7) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #5 ('/sòurcē.txt', '/target.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

8) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #6 ('/sòurcē.txt', '/tärgét.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

9) Test\Files\ObjectStore\ObjectStoreStorageTest::testMove with data set #7 ('/single ' quote.txt', '/tar'get.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:95

10) Test\Files\ObjectStore\ObjectStoreStorageTest::testRenameDirectory
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:113

11) Test\Files\ObjectStore\ObjectStoreStorageTest::testRenameOverWriteDirectory
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:144

12) Test\Files\ObjectStore\ObjectStoreStorageTest::testRenameOverWriteDirectoryOverFile
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php:162

13) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #0 ('/source.txt', '/target.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

14) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #1 ('/source.txt', '/target with space.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

15) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #2 ('/source with space.txt', '/target.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

16) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #3 ('/source with space.txt', '/target with space.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

17) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #4 ('/source.txt', '/tärgét.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

18) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #5 ('/sòurcē.txt', '/target.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

19) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #6 ('/sòurcē.txt', '/tärgét.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

20) Test\Files\ObjectStore\ObjectStoreStorageTest::testMoveOverwrite with data set #7 ('/single ' quote.txt', '/tar'get.txt')
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:273

21) Test\Files\ObjectStore\ObjectStoreStorageTest::testRenameOverWriteFile
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:476

22) Test\Files\ObjectStore\ObjectStoreStorageTest::testPartFile
md5(): Passing null to parameter #1 ($string) of type string is deprecated

/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:448
/home/runner/work/server/server/lib/private/Files/Cache/Cache.php:364
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:413
/home/runner/work/server/server/lib/private/Files/ObjectStore/ObjectStoreStorage.php:388
/home/runner/work/server/server/tests/lib/Files/Storage/Storage.php:647

@nickvergessen
Copy link
Member

Some debugging was done in #36496

come-nc and others added 5 commits February 2, 2023 12:05
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This is the only test suite testing 8.1, so adding 8.2 as well

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Otherwise Oracle returns NULL for empty strings and PHP 8.2
throws on null in string functions like trim() and md5()

Signed-off-by: Joas Schilling <coding@schilljs.com>
@blizzz blizzz merged commit 970f393 into master Feb 2, 2023
@blizzz blizzz deleted the enh/allow-php-8.2 branch February 2, 2023 12:47
@DaphneMuller
Copy link

hello @come-nc
Thank you so much for your work on this pull request! This ticket seems to have the tag 'pending documentation'.
Is there any chance you could clarify what documentation is missing? Is this for admins or for app developers?

@come-nc come-nc added 4. to release Ready to be released and/or waiting for tests to finish and removed pending documentation This pull request needs an associated documentation update 3. to review Waiting for reviews labels Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants