Closed juliusknorr closed 15 hours ago
A quick additional note, if needed you can also setup psalm as a static analysis tool whihc can be used to check for other deprecations and use of internal methods https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/continuous_integration.html#static-analysis
@juliusknorr Thank you Done 87adce08f761717f4ad7ca024b9dc1ca4c54f25e
I noticed that the current develop branch is no longer compatible with our development branch for the upcoming Nextcloud 31 release. While we are not in beta phase yet (so some more changes might happen), there is one impactful change that could already be addressed and is backward compatible.
We removed the deprecated methods of
\OCP\ILogger
(deprecated since Nextcloud 20) and for that also the internal\OC::$server->getLogger()
method that is still used a lot in the connector app.The following replacements can be used:
\OCP\ILogger
in the constructor make use of\Psr\Log\LoggerInterface
\OC::$server->getLogger()
use dependency injection where possible with the LoggerInterface or\OCP\Log\logger('onlyoffice')
where DI is not feasible$this->logger->logException($e, ['message' => 'My message']);
use$this->logger->error("My message", ['exception' => $e]);
\OCP\Log\logger
function the app id is passed and you get a scoped logger instance backLet me know if there are any questions.