Skip to content

Commit df37667

Browse files
authored
Merge pull request #793 from nextcloud/feat/drop-php81-support
feat: drop PHP 8.1 support, require PHP 8.2+, use readonly classes
2 parents 444f244 + aeb217a commit df37667

23 files changed

Lines changed: 82 additions & 82 deletions

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
name: php-lint
4040
strategy:
4141
matrix:
42-
php-versions: ["8.1"]
42+
php-versions: ["8.2"]
4343

4444
steps:
4545
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -60,7 +60,7 @@ jobs:
6060
name: php-cs
6161
strategy:
6262
matrix:
63-
php-versions: ["8.1"]
63+
php-versions: ["8.2"]
6464

6565
steps:
6666
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -83,7 +83,7 @@ jobs:
8383
runs-on: ubuntu-22.04
8484
strategy:
8585
matrix:
86-
php-versions: ["8.1"]
86+
php-versions: ["8.2"]
8787
name: php-psalm-analysis
8888

8989
steps:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"optimize-autoloader": true,
3737
"classmap-authoritative": true,
3838
"platform": {
39-
"php": "8.1"
39+
"php": "8.2"
4040
}
4141
},
4242
"autoload": {
@@ -51,6 +51,6 @@
5151
},
5252
"require": {
5353
"ext-simplexml": "*",
54-
"php": ">=8.1.0"
54+
"php": ">=8.2.0"
5555
}
5656
}

composer.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Capabilities.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
use OCP\Capabilities\ICapability;
1515
use OCP\IConfig;
1616

17-
class Capabilities implements ICapability {
17+
readonly class Capabilities implements ICapability {
1818

1919
public function __construct(
20-
private readonly IConfig $config,
21-
private readonly IAppManager $appManager,
20+
private IConfig $config,
21+
private IAppManager $appManager,
2222
) {
2323
}
2424

lib/Listener/DeclarativeSettings/GetValueListener.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
/**
2323
* @template-implements IEventListener<Event>
2424
*/
25-
class GetValueListener implements IEventListener {
25+
readonly class GetValueListener implements IEventListener {
2626
public function __construct(
27-
private readonly SettingsService $service,
28-
private readonly ExAppPreferenceService $preferenceService,
29-
private readonly ExAppConfigService $configService,
30-
private readonly ICrypto $crypto,
31-
private readonly LoggerInterface $logger,
27+
private SettingsService $service,
28+
private ExAppPreferenceService $preferenceService,
29+
private ExAppConfigService $configService,
30+
private ICrypto $crypto,
31+
private LoggerInterface $logger,
3232
) {
3333
}
3434

lib/Listener/DeclarativeSettings/RegisterDeclarativeSettingsListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
/**
1818
* @template-implements IEventListener<Event>
1919
*/
20-
class RegisterDeclarativeSettingsListener implements IEventListener {
20+
readonly class RegisterDeclarativeSettingsListener implements IEventListener {
2121
public function __construct(
22-
private readonly SettingsService $service,
22+
private SettingsService $service,
2323
) {
2424
}
2525

lib/Listener/DeclarativeSettings/SetValueListener.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
/**
2323
* @template-implements IEventListener<Event>
2424
*/
25-
class SetValueListener implements IEventListener {
25+
readonly class SetValueListener implements IEventListener {
2626
public function __construct(
27-
private readonly SettingsService $service,
28-
private readonly ExAppPreferenceService $preferenceService,
29-
private readonly ExAppConfigService $configService,
30-
private readonly ICrypto $crypto,
31-
private readonly LoggerInterface $logger,
27+
private SettingsService $service,
28+
private ExAppPreferenceService $preferenceService,
29+
private ExAppConfigService $configService,
30+
private ICrypto $crypto,
31+
private LoggerInterface $logger,
3232
) {
3333
}
3434

lib/Listener/GetTaskProcessingProvidersListener.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
use OCP\TaskProcessing\Events\GetTaskProcessingProvidersEvent;
1919
use Psr\Log\LoggerInterface;
2020

21-
class GetTaskProcessingProvidersListener implements IEventListener {
21+
readonly class GetTaskProcessingProvidersListener implements IEventListener {
2222
public function __construct(
23-
private readonly TaskProcessingService $taskProcessingService,
24-
private readonly ExAppService $exAppService,
25-
private readonly AppAPIService $appAPIService,
26-
private readonly LoggerInterface $logger,
23+
private TaskProcessingService $taskProcessingService,
24+
private ExAppService $exAppService,
25+
private AppAPIService $appAPIService,
26+
private LoggerInterface $logger,
2727
) {
2828
}
2929

lib/Listener/LoadMenuEntriesListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
/**
2626
* @template-extends IEventListener<LoadMenuEntriesListener>
2727
*/
28-
class LoadMenuEntriesListener implements IEventListener {
28+
readonly class LoadMenuEntriesListener implements IEventListener {
2929

3030
public function __construct(
31-
private readonly TopMenuService $topMenuService,
31+
private TopMenuService $topMenuService,
3232
) {
3333
}
3434

lib/PublicFunctions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
use OCP\Http\Client\IResponse;
1616
use OCP\IRequest;
1717

18-
class PublicFunctions {
18+
readonly class PublicFunctions {
1919

2020
public function __construct(
21-
private readonly ExAppService $exAppService,
22-
private readonly AppAPIService $service,
21+
private ExAppService $exAppService,
22+
private AppAPIService $service,
2323
) {
2424
}
2525

0 commit comments

Comments
 (0)