-
Notifications
You must be signed in to change notification settings - Fork 262
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: Version of psr/log incompatible with the same version at 3rdparty #10644
base: main
Are you sure you want to change the base?
Conversation
…y folder Downgrade `psr/log` from 3 to 2 reverting the PR: nextcloud#10237 The file `appinfo/info.xml` of app Mail is using a range of stable versions: ```xml <nextcloud min-version="30" max-version="32" /> ``` At branch `stable30` of `3rdparty` folder of server, is using the versoin 2.0 of `psr/log` https://github.com/nextcloud/3rdparty/blob/stable30/composer.lock#L3296-L3297 ```json "name": "psr/log", "version": "2.0.0", ``` that haven't the :void at interface: https://github.com/nextcloud/3rdparty/blob/stable30/psr/log/src/LoggerAwareTrait.php#L22 ```php public function setLogger(LoggerInterface $logger) ``` Look the code at `psr/log` repository: https://github.com/php-fig/log/blob/2.0.0/src/LoggerAwareTrait.php#L22 ```php public function setLogger(LoggerInterface $logger) ``` But at `composer.json` and at `composer-lock` file of mail, the used version is `3.0.2`: `composer.json` https://github.com/nextcloud/mail/blob/main/composer.json#L41 ```json "psr/log": "^3.0.2", ``` `composer-lock` https://github.com/nextcloud/mail/blob/main/composer.lock#L2274-L2275 ```json "name": "psr/log", "version": "3.0.2", ``` And the signature of method setLogger at version 3.0.2 is: https://github.com/php-fig/log/blob/3.0.2/src/LoggerAwareTrait.php#L18 ```php public function setLogger(LoggerInterface $logger): void ``` The different signature of this interface between `3rdparty` and mail generate error about inconsistent declaration of `Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger)`. Only is possible upgrade the version of psr/log when the `min-version` at `info.xml` file is equals to 31 because the version 3.x of `psr/log` only was bumped at stable31 of 3rdparty. ref: LibreSign/libresign#4376 Signed-off-by: Vitor Mattos <[email protected]>
Thanks for opening your first pull request in this repository! ✌️ |
Hey Vitor, thanks for the heads up about the incompatibility. Just to let you know: We discussed the issue and are currently planning steps to fix it. The main problem being that we already released broken versions to the app store and the pending release is already in late RC phase. So we have to be careful about our next steps. See also #10658 |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
What's I made
Downgrade
psr/log
from 3 to 2 reverting the PR: #10237Explaining
The file
appinfo/info.xml
of app Mail is using a range of stable versions:At branch
stable30
of3rdparty
folder of server, is using the versoin 2.0 ofpsr/log
https://github.com/nextcloud/3rdparty/blob/stable30/composer.lock#L3296-L3297
that haven't the :void at interface:
https://github.com/nextcloud/3rdparty/blob/stable30/psr/log/src/LoggerAwareTrait.php#L22
Look the code at
psr/log
repository:https://github.com/php-fig/log/blob/2.0.0/src/LoggerAwareTrait.php#L22
But at
composer.json
and atcomposer-lock
file of mail, the used version is3.0.2
:composer.json
https://github.com/nextcloud/mail/blob/main/composer.json#L41
composer-lock
https://github.com/nextcloud/mail/blob/main/composer.lock#L2274-L2275
And the signature of method setLogger at version 3.0.2 is: https://github.com/php-fig/log/blob/3.0.2/src/LoggerAwareTrait.php#L18
The different signature of this interface between
3rdparty
and mail generate error about inconsistent declaration ofPsr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger)
.Only is possible upgrade the version of psr/log when the
min-version
atinfo.xml
file is equals to 31 because the version 3.x ofpsr/log
only was bumped at stable31 of 3rdparty.ref: LibreSign/libresign#4376
to-do