Skip to content

Commit 5280d47

Browse files
SagarGinabim777
authored andcommitted
Drop support for nc 26 (#689)
* Adjust or remove code specific to NC-26 Signed-off-by: Sagar <sagargurung1001@gmail.com> * Adjust or remove things realted to stable 26 Signed-off-by: Sagar <sagargurung1001@gmail.com> * fix CI failure Signed-off-by: Sagar <sagargurung1001@gmail.com> * update changelog Signed-off-by: Sagar <sagargurung1001@gmail.com> --------- Signed-off-by: Sagar <sagargurung1001@gmail.com> Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
1 parent 8740326 commit 5280d47

6 files changed

Lines changed: 35 additions & 70 deletions

File tree

.github/workflows/shared_workflow.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ jobs:
1111
name: unit tests and linting
1212
strategy:
1313
matrix:
14-
nextcloudVersion: [ stable26, stable27, stable28, stable29, stable30 ]
14+
nextcloudVersion: [ stable27, stable28, stable29, stable30 ]
1515
phpVersion: [ 8.0, 8.1, 8.2, 8.3]
1616
exclude:
17-
- nextcloudVersion: stable26
18-
phpVersion: 8.3
1917
- nextcloudVersion: stable27
2018
phpVersion: 8.3
2119
- nextcloudVersion: stable30
@@ -180,15 +178,13 @@ jobs:
180178
name: API tests
181179
strategy:
182180
matrix:
183-
nextcloudVersion: [ stable26, stable27, stable28, stable29, stable30 ]
181+
nextcloudVersion: [ stable27, stable28, stable29, stable30 ]
184182
phpVersionMajor: [ 8 ]
185183
phpVersionMinor: [ 0, 1, 2, 3 ]
186184
database: [pgsql, mysql]
187185
isScheduledEventNightly:
188186
- ${{github.event_name == 'schedule'}}
189187
exclude:
190-
- nextcloudVersion: stable26
191-
phpVersionMinor: 3
192188
- nextcloudVersion: stable27
193189
phpVersionMinor: 3
194190
- nextcloudVersion: stable30
@@ -297,10 +293,6 @@ jobs:
297293
- name: API Tests
298294
env:
299295
NEXTCLOUD_BASE_URL: http://nextcloud
300-
BEHAT_FILTER_TAGS: ${{
301-
matrix.nextcloudVersion == 'stable26' && '~@skipOnStable26' ||
302-
''
303-
}}
304296
run: |
305297
# The following if block can be removed once Nextcloud no longer supports PHP 8.0
306298
if [ "${{matrix.phpVersionMajor}}" -eq 8 ] && [ "${{matrix.phpVersionMinor}}" -eq 0 ]; then

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313
- Fix random deactivation of automatically managed project folder
1414
- Fix avatar not found in openproject
1515
- Enhance project search when creating workpackages from Nextcloud
16+
- Drop application's support for Nextcloud 26
1617

1718
## 2.6.4 - 2024-08-15
1819
### Changed

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For more information on how to set up and use the OpenProject application, pleas
4141
<screenshot>https://github.com/nextcloud/integration_openproject/raw/master/img/screenshot1.png</screenshot>
4242
<screenshot>https://github.com/nextcloud/integration_openproject/raw/master/img/screenshot2.png</screenshot>
4343
<dependencies>
44-
<nextcloud min-version="26" max-version="30" />
44+
<nextcloud min-version="27" max-version="30" />
4545
</dependencies>
4646
<background-jobs>
4747
<job>OCA\OpenProject\BackgroundJob\RemoveExpiredDirectUploadTokens</job>

tests/acceptance/features/api/setup.feature

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,7 @@ Feature: setup the integration through an API
678678
When user "OpenProject" sends a "PROPFIND" request to "/remote.php/webdav" using old app password
679679
Then the HTTP status code should be "401"
680680

681-
# to locally run this test the "project folder" needs to be setup already
682-
# issue of group folder https://github.com/nextcloud/groupfolders/issues/2718
683-
@skipOnStable25 @skipOnStable26
681+
684682
Scenario: check version of uploaded file inside a group folder
685683
Given user "Carol" has been created
686684
And user "Carol" has been added to the group "OpenProject"
@@ -693,9 +691,7 @@ Feature: setup the integration through an API
693691
When user "Carol" deletes folder "/OpenProject/OpenProject/project-demo"
694692
Then the HTTP status code should be 204
695693

696-
# to locally run this test the "project folder" needs to be setup already
697-
# issue of group folder https://github.com/nextcloud/groupfolders/issues/2718
698-
@skipOnStable25 @skipOnStable26
694+
699695
Scenario: check version of uploaded file after an update inside a group folder
700696
Given user "Carol" has been created
701697
And user "Carol" has been added to the group "OpenProject"

tests/lib/Reference/WorkPackageReferenceProviderTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
namespace OCA\OpenProject\Reference;
2525

2626
use OC\Collaboration\Reference\ReferenceManager;
27-
use OC_Util;
2827
use OCA\OpenProject\AppInfo\Application;
2928
use OCA\OpenProject\Service\OpenProjectAPIService;
3029
use OCP\IConfig;
@@ -34,12 +33,6 @@
3433
use PHPUnit\Framework\TestCase;
3534

3635
class WorkPackageReferenceProviderTest extends TestCase {
37-
protected function setUp(): void {
38-
if (version_compare(OC_Util::getVersionString(), '26') < 0) {
39-
$this->markTestSkipped('WorkPackageReferenceProvider is only available from nextcloud 26 so skip the tests on versions below');
40-
}
41-
}
42-
4336
/**
4437
*
4538
* @param array<string> $onlyMethods

tests/lib/Service/OpenProjectAPIServiceTest.php

Lines changed: 29 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use OC\Authentication\Token\IToken;
2020
use OC\Avatar\GuestAvatar;
2121
use OC\Http\Client\Client;
22-
use OC_Util;
2322
use OCA\GroupFolders\Folder\FolderManager;
2423
use OCA\OpenProject\AppInfo\Application;
2524
use OCA\OpenProject\Exception\OpenprojectErrorException;
@@ -639,53 +638,37 @@ private function getOpenProjectAPIService(
639638
$ocClient = null;
640639
$client = new GuzzleClient();
641640
$clientConfigMock = $this->getMockBuilder(IConfig::class)->getMock();
642-
643-
if (version_compare(OC_Util::getVersionString(), '27') >= 0) {
644-
$clientConfigMock
645-
->method('getSystemValueBool')
646-
->withConsecutive(
647-
['allow_local_remote_servers', false],
648-
['installed', false],
649-
['allow_local_remote_servers', false],
650-
['allow_local_remote_servers', false],
651-
['installed', false],
652-
['allow_local_remote_servers', false],
653-
['allow_local_remote_servers', false],
654-
['installed', false],
655-
['allow_local_remote_servers', false]
656-
)
657-
->willReturnOnConsecutiveCalls(
658-
true,
659-
true,
660-
true,
661-
true,
662-
true,
663-
true,
664-
true,
665-
true,
666-
true
667-
);
668-
//changed from nextcloud 26
669-
$ocClient = new Client(
670-
$clientConfigMock,
671-
$certificateManager,
672-
$client,
673-
$this->createMock(IRemoteHostValidator::class),
674-
$this->createMock(LoggerInterface::class));
675-
} elseif (version_compare(OC_Util::getVersionString(), '26') >= 0) {
676-
$clientConfigMock
641+
$clientConfigMock
677642
->method('getSystemValueBool')
678-
->with('allow_local_remote_servers', false)
679-
->willReturn(true);
680-
681-
//changed from nextcloud 26
682-
$ocClient = new Client(
683-
$clientConfigMock,
684-
$certificateManager,
685-
$client,
686-
$this->createMock(IRemoteHostValidator::class)
643+
->withConsecutive(
644+
['allow_local_remote_servers', false],
645+
['installed', false],
646+
['allow_local_remote_servers', false],
647+
['allow_local_remote_servers', false],
648+
['installed', false],
649+
['allow_local_remote_servers', false],
650+
['allow_local_remote_servers', false],
651+
['installed', false],
652+
['allow_local_remote_servers', false]
653+
)
654+
->willReturnOnConsecutiveCalls(
655+
true,
656+
true,
657+
true,
658+
true,
659+
true,
660+
true,
661+
true,
662+
true,
663+
true
687664
);
688-
}
665+
//changed from nextcloud 26
666+
$ocClient = new Client(
667+
$clientConfigMock,
668+
$certificateManager,
669+
$client,
670+
$this->createMock(IRemoteHostValidator::class),
671+
$this->createMock(LoggerInterface::class));
689672

690673
$clientService = $this->getMockBuilder('\OCP\Http\Client\IClientService')->getMock();
691674
$clientService->method('newClient')->willReturn($ocClient);

0 commit comments

Comments
 (0)