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

fix: Version of psr/log incompatible with the same version at 3rdparty #10644

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vitormattos
Copy link

@vitormattos vitormattos commented Feb 1, 2025

What's I made

Downgrade psr/log from 3 to 2 reverting the PR: #10237

Explaining

The file appinfo/info.xml of app Mail is using a range of stable versions:

<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

            "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

    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

    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

		"psr/log": "^3.0.2",

composer-lock
https://github.com/nextcloud/mail/blob/main/composer.lock#L2274-L2275

            "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

    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

to-do

  • create a stable branch from main
  • change the max-version at info.xml to 30
  • change the target of this PR to stable30
  • after merge, create a new release compatible with Nextcloud 30
  • change the min-version of into.xml at branch main to 31.

…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]>
Copy link

welcome bot commented Feb 1, 2025

Thanks for opening your first pull request in this repository! ✌️

@vitormattos vitormattos changed the title fix: Version of psr/log incompatible with the same version at 3rdpart… fix: Version of psr/log incompatible with the same version at 3rdparty Feb 1, 2025
@st3iny
Copy link
Member

st3iny commented Feb 5, 2025

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

Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

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

Successfully merging this pull request may close these issues.

2 participants