Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented Nov 23, 2021

The goal is to have all tests passing without (PHP) warning on all applications from this repository.

@come-nc
Copy link
Contributor Author

come-nc commented Nov 23, 2021

First batch: #29432

@come-nc come-nc self-assigned this Nov 23, 2021
@come-nc come-nc added 2. developing Work in progress php Pull requests that update Php code labels Nov 23, 2021
@come-nc come-nc force-pushed the fix/support-php-8.1-2 branch from 5e8e34d to 354fd6f Compare December 2, 2021 15:32
@come-nc
Copy link
Contributor Author

come-nc commented Dec 2, 2021

Warnings still showing when running core test suite with PHP 8.1:

PHP Deprecated:  Function libxml_disable_entity_loader() is deprecated in /home/mcmic/dev/nextcloud/server/lib/private/Updater/ChangesCheck.php on line 141
PHP Deprecated:  Function libxml_disable_entity_loader() is deprecated in /home/mcmic/dev/nextcloud/server/lib/private/Updater/ChangesCheck.php on line 143
PHP Deprecated:  Function libxml_disable_entity_loader() is deprecated in /home/mcmic/dev/nextcloud/server/lib/private/Updater/VersionCheck.php on line 100
PHP Deprecated:  Function libxml_disable_entity_loader() is deprecated in /home/mcmic/dev/nextcloud/server/lib/private/Updater/VersionCheck.php on line 98

Should be looked into.

PHP Deprecated:  implode(): Passing null to parameter #1 ($separator) of type array|string is deprecated in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Property/Text.php on line 153
PHP Deprecated:  Return type of Sabre\VObject\Recur\EventIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/EventIterator.php on line 201
PHP Deprecated:  Return type of Sabre\VObject\Recur\EventIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/EventIterator.php on line 288
PHP Deprecated:  Return type of Sabre\VObject\Recur\EventIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/EventIterator.php on line 335
PHP Deprecated:  Return type of Sabre\VObject\Recur\EventIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/EventIterator.php on line 312
PHP Deprecated:  Return type of Sabre\VObject\Recur\EventIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/EventIterator.php on line 300
PHP Deprecated:  Return type of Sabre\VObject\Recur\RRuleIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/RRuleIterator.php on line 41
PHP Deprecated:  Return type of Sabre\VObject\Recur\RRuleIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/RRuleIterator.php on line 55
PHP Deprecated:  Return type of Sabre\VObject\Recur\RRuleIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/RRuleIterator.php on line 91
PHP Deprecated:  Return type of Sabre\VObject\Recur\RRuleIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/RRuleIterator.php on line 82
PHP Deprecated:  Return type of Sabre\VObject\Recur\RRuleIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/sabre/vobject/lib/Recur/RRuleIterator.php on line 67

Should be looked into, the sabre/dav bump was supposed to fix all warnings.

PHP Deprecated:  Opis\Closure\SerializableClosure implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/mcmic/dev/nextcloud/server/3rdparty/opis/closure/src/SerializableClosure.php on line 18
PHP Deprecated:  Return type of Opis\Closure\ReflectionClosure::isStatic() should either be compatible with ReflectionFunctionAbstract::isStatic(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/opis/closure/src/ReflectionClosure.php on line 49

Complicated, see #29287 (comment)

PHP Deprecated:  preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Parser.php on line 1190
PHP Deprecated:  preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Parser.php on line 1462
PHP Deprecated:  preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Parser.php on line 1543
PHP Deprecated:  preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Parser.php on line 3306
PHP Deprecated:  Return type of ScssPhp\ScssPhp\Node\Number::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Node/Number.php on line 146
PHP Deprecated:  Return type of ScssPhp\ScssPhp\Node\Number::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Node/Number.php on line 171
PHP Deprecated:  Return type of ScssPhp\ScssPhp\Node\Number::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Node/Number.php on line 197
PHP Deprecated:  Return type of ScssPhp\ScssPhp\Node\Number::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Node/Number.php on line 205
PHP Deprecated:  substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/mcmic/dev/nextcloud/server/3rdparty/scssphp/scssphp/src/Compiler.php on line 474

Expected, see #30034

PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/mcmic/dev/nextcloud/server/lib/private/Files/Mount/MountPoint.php on line 192

Should be looked into.

PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /home/mcmic/dev/nextcloud/server/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php on line 144

Expected, see #29731

PHP Deprecated:  ZipArchive::open(): Using empty file as ZipArchive is deprecated in /home/mcmic/dev/nextcloud/server/lib/private/Archive/ZIP.php on line 50

Should be looked into. Fixing this causes other problems.

@CarlSchwan
Copy link
Member

Another nice round of cleaning :) And I agree that some of the remaining warning are looking a bit scary :/ libxml_disable_entity_loader should have been fixed with sabre-io/xml#204

@come-nc come-nc marked this pull request as draft December 6, 2021 09:29
@come-nc come-nc force-pushed the fix/support-php-8.1-2 branch from 354fd6f to 50d6728 Compare December 6, 2021 14:34
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  files_trashbin and theming apps

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…locks

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
No reason to allow 8.1.0 and not 8.1.1.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
It is not allowed anymore to open an empty file as a new zip archive.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the fix/support-php-8.1-2 branch from 50d6728 to c3a1a66 Compare December 16, 2021 09:36
@come-nc
Copy link
Contributor Author

come-nc commented Dec 16, 2021

So, the only warnings remainning are from vobject (will/should fixed by #30128), opis/closure (I do not understand the situation), and swiftmailer (see #29731).

For me this is good to merge, these problems can be tackled separately.

@come-nc come-nc marked this pull request as ready for review December 16, 2021 09:44
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 16, 2021
@come-nc come-nc added this to the Nextcloud 24 milestone Dec 16, 2021
@come-nc come-nc requested review from a team, CarlSchwan, PVince81 and icewind1991 and removed request for a team December 16, 2021 09:45
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍 see comment.

is this the last batch for core ?

@come-nc
Copy link
Contributor Author

come-nc commented Dec 16, 2021

is this the last batch for core ?

As far as I know, apart from the 3 remaining problems listed above.

@paulocoghi
Copy link

Just to confirm, do you believe the support for PHP8.1 will land on NC 24?

@come-nc come-nc merged commit 9a37ca9 into master Dec 16, 2021
@come-nc come-nc deleted the fix/support-php-8.1-2 branch December 16, 2021 13:24
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jan 16, 2022
Add upstream series of patches for php 8.1 support:
nextcloud/server#29862
Raise php compatibility to < 8.2.0.
Ignore .orig patch files when installing.
Simplify installation of systemd service and timer and quote pkgdir.

git-svn-id: file:///srv/repos/svn-community/svn@1106376 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jan 16, 2022
Add upstream series of patches for php 8.1 support:
nextcloud/server#29862
Raise php compatibility to < 8.2.0.
Ignore .orig patch files when installing.
Simplify installation of systemd service and timer and quote pkgdir.

git-svn-id: file:///srv/repos/svn-community/svn@1106376 9fca08f4-af9d-4005-b8df-a31f2cc04f65
@spicemint
Copy link

Linux archlinux 5.16.11-arch1-1, nextcloud 23.0.2, nginx/1.20.2, PHP 8.1.3, mariadb 10.7.3

running into errors, from log:

Error: Return type of OCA\LogReader\Log\LogIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /usr/share/webapps/nextcloud/apps/logreader/lib/Log/LogIterator.php#69

/usr/share/webapps/nextcloud/apps/logreader/lib/Log/LogIterator.php - line 24:

OC\Log\ErrorHandler::onError()

/usr/share/webapps/nextcloud/lib/composer/composer/ClassLoader.php - line 571:

include("/usr/share/ ... p")

/usr/share/webapps/nextcloud/lib/composer/composer/ClassLoader.php - line 428:

Composer\Autoload\includeFile()

/usr/share/webapps/nextcloud/apps/logreader/lib/Log/LogIteratorFactory.php - line 55:

Composer\Autoload\ClassLoader->loadClass()

/usr/share/webapps/nextcloud/apps/logreader/lib/Controller/LogController.php - line 58:

OCA\LogReader\Log\LogIteratorFactory->getLogIterator()

/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:

OCA\LogReader\Controller\LogController->get()

/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:

OC\AppFramework\Http\Dispatcher->executeController()

/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php - line 157:

OC\AppFramework\Http\Dispatcher->dispatch()

/usr/share/webapps/nextcloud/lib/private/Route/Router.php - line 302:

OC\AppFramework\App::main()

/usr/share/webapps/nextcloud/lib/base.php - line 1006:

OC\Route\Router->match()

/usr/share/webapps/nextcloud/index.php - line 36:

OC::handleRequest()

@come-nc
Copy link
Contributor Author

come-nc commented Mar 7, 2022

Linux archlinux 5.16.11-arch1-1, nextcloud 23.0.2, nginx/1.20.2, PHP 8.1.3, mariadb 10.7.3

running into errors, from log:

Error: Return type of OCA\LogReader\Log\LogIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /usr/share/webapps/nextcloud/apps/logreader/lib/Log/LogIterator.php#69

Nextcloud 23 does not support PHP 8.1, you need to wait for Nextcloud 24.
And this file is not from this repository but from logreadear, see nextcloud/logreader#655

@kesselb
Copy link
Collaborator

kesselb commented Jun 26, 2022

/backport c3a1a66 to stable23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants