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

Enh/apply rector set to apps #50577

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Jan 30, 2025

Summary

  1. Apply current rector configuration to apps folder
  2. Bump rector/rector and nextcloud/rector to latest version
  3. Add NextcloudSets::NEXTCLOUD_25 to configuration
  4. Run rector on apps folder again

You can note that \OC::$server->get calls are correctly replaced but not \OC::$server->query ones, that’s an oversight of the Set and will need to be fixed upstream.
Apart from that the changes look sound to me.

Checklist

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.

👍 for caldav/carddav

@come-nc
Copy link
Contributor Author

come-nc commented Jan 30, 2025

            // Deprecated since 20.0.0
            new LegacyGetterToOcpServerGet('getUserManager', 'OCP\User\IManager'),
            // Deprecated since 20.0.0
            new LegacyGetterToOcpServerGet('getGroupManager', 'OCP\Group\IManager'),

Those 2 are wrong, should be 'OCP\IUserManager' and 'OCP\IGroupManager'.
Should be fixed upstream.

@come-nc come-nc added 2. developing Work in progress technical debt and removed 3. to review Waiting for reviews labels Jan 30, 2025
apps/comments/tests/Unit/AppInfo/ApplicationTest.php Outdated Show resolved Hide resolved
apps/comments/tests/Unit/AppInfo/ApplicationTest.php Outdated Show resolved Hide resolved
apps/dav/appinfo/v1/caldav.php Outdated Show resolved Hide resolved
apps/dav/appinfo/v1/caldav.php Outdated Show resolved Hide resolved
apps/dav/appinfo/v1/caldav.php Outdated Show resolved Hide resolved
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>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the enh/apply-rector-set-to-apps branch from 92966bf to e37fb47 Compare February 3, 2025 14:36
@come-nc
Copy link
Contributor Author

come-nc commented Feb 3, 2025

            // Deprecated since 20.0.0 Use 'get(\OCP\Files\AppData\IAppDataFactory')->get($app) instead
            new LegacyGetterToOcpServerGet('getAppDataDir', 'OCP\Files\IAppData'),

This is wrong in 25 set. For this PR it can easily be fixed manually I think.
We should still remove or fix this part of the set upstream.

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

Successfully merging this pull request may close these issues.

3 participants