Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions config/nextcloud-29/nextcloud-29-deprecations.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,28 @@

declare(strict_types=1);

use Nextcloud\Rector\Rector\ReplaceIConfigWithIAppConfigRector;
use Nextcloud\Rector\Rector\ReplaceInjectedMethodCallRector;
use Nextcloud\Rector\Set\NextcloudSets;
use Nextcloud\Rector\ValueObject\ReplaceInjectedMethodCall;
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([NextcloudSets::NEXTCLOUD_27]);
$rectorConfig->rule(ReplaceIConfigWithIAppConfigRector::class);
$rectorConfig->ruleWithConfiguration(
ReplaceInjectedMethodCallRector::class,
[
new ReplaceInjectedMethodCall(
'OCP\IConfig',
'OCP\IAppConfig',
'appConfig',
[
'getAppValue' => 'getValue',
'getAppKeys' => 'getKeys',
'setAppValue' => 'setValue',
'deleteAppValue' => 'deleteKey',
'deleteAppValues' => 'deleteApp',
],
),
],
);
};
25 changes: 25 additions & 0 deletions config/nextcloud-32/nextcloud-32-deprecations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

use Nextcloud\Rector\Rector\ReplaceInjectedMethodCallRector;
use Nextcloud\Rector\Set\NextcloudSets;
use Nextcloud\Rector\ValueObject\ReplaceInjectedMethodCall;
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([NextcloudSets::NEXTCLOUD_29]);
$rectorConfig->ruleWithConfiguration(
ReplaceInjectedMethodCallRector::class,
[
new ReplaceInjectedMethodCall(
'OCP\Mail\IMailer',
'OCP\Mail\IEmailValidator',
'emailValidator',
[
'validateMailAddress' => 'isValid',
],
),
],
);
};
27 changes: 24 additions & 3 deletions config/nextcloud-33/nextcloud-33-deprecations.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,36 @@

use Nextcloud\Rector\Rector\AnnotationToAttributeRector;
use Nextcloud\Rector\Rector\ReplaceFetchAllMethodCallRector;
use Nextcloud\Rector\Rector\ReplaceIConfigWithIUserConfigRector;
use Nextcloud\Rector\Rector\ReplaceInjectedMethodCallRector;
use Nextcloud\Rector\Set\NextcloudSets;
use Nextcloud\Rector\ValueObject\ReplaceInjectedMethodCall;
use Rector\Config\RectorConfig;
use Rector\Php80\ValueObject\AnnotationToAttribute;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([NextcloudSets::NEXTCLOUD_29]);
$rectorConfig->sets([NextcloudSets::NEXTCLOUD_32]);
$rectorConfig->rule(ReplaceFetchAllMethodCallRector::class);
$rectorConfig->rule(ReplaceIConfigWithIUserConfigRector::class);
$rectorConfig->ruleWithConfiguration(
ReplaceInjectedMethodCallRector::class,
[
new ReplaceInjectedMethodCall(
'OCP\IConfig',
'OCP\IUserConfig',
'userConfig',
[
'getAllUserValues' => 'getAllValues',
'getUserKeys' => 'getKeys',
'getUserValue' => 'getValueString',
'getUserValueForUsers' => 'getValuesByUsers',
'getUsersForUserValue' => 'searchUsersByValueString',
'setUserValue' => 'setValueString',
'deleteUserValue' => 'deleteUserConfig',
'deleteAllUserValues' => 'deleteAllUserConfig',
'deleteAppFromAllUsers' => 'deleteApp',
],
),
],
);
$rectorConfig->ruleWithConfiguration(
AnnotationToAttributeRector::class,
[
Expand Down
224 changes: 0 additions & 224 deletions src/Rector/AReplaceClassRector.php

This file was deleted.

Loading