Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Drop support for nc 26 (#689)
* Adjust or remove code specific to NC-26

Signed-off-by: Sagar <[email protected]>

* Adjust or remove things realted to stable 26

Signed-off-by: Sagar <[email protected]>

* fix CI failure

Signed-off-by: Sagar <[email protected]>

* update changelog

Signed-off-by: Sagar <[email protected]>

---------

Signed-off-by: Sagar <[email protected]>
  • Loading branch information
SagarGi committed Sep 10, 2024
commit 0b3c9cd5f1b18d0ab75415f52fc82eb68f195c04
11 changes: 0 additions & 11 deletions .github/workflows/shared_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
nextcloudVersion: [ stable30 ]
phpVersion: [ 8.1, 8.2, 8.3 ]
include:
- nextcloudVersion: stable26
phpVersion: 8.0
- nextcloudVersion: stable27
phpVersion: 8.0
- nextcloudVersion: stable28
Expand Down Expand Up @@ -192,11 +190,6 @@ jobs:
phpVersionMajor: 8
phpVersionMinor: 1
database: pgsql
# Each oldServer with the oldest PHP version and one database
- nextcloudVersion: stable26
phpVersionMajor: 8
phpVersionMinor: 0
database: mysql
- nextcloudVersion: stable27
phpVersionMajor: 8
phpVersionMinor: 0
Expand Down Expand Up @@ -303,10 +296,6 @@ jobs:
- name: API Tests
env:
NEXTCLOUD_BASE_URL: http://nextcloud
BEHAT_FILTER_TAGS: ${{
matrix.nextcloudVersion == 'stable26' && '~@skipOnStable26' ||
''
}}
run: |
# The following if block can be removed once Nextcloud no longer supports PHP 8.0
if [ "${{matrix.phpVersionMajor}}" -eq 8 ] && [ "${{matrix.phpVersionMinor}}" -eq 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fix random deactivation of automatically managed project folder
- Fix avatar not found in openproject
- Enhance project search when creating workpackages from Nextcloud
- Drop application's support for Nextcloud 26
- Fix issue preventing direct uploading of resources in Nextcloud that are managed by app `Files Access Control`

## 2.6.4 - 2024-08-15
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ For more information on how to set up and use the OpenProject application, pleas
<screenshot>https://github.com/nextcloud/integration_openproject/raw/master/img/screenshot1.png</screenshot>
<screenshot>https://github.com/nextcloud/integration_openproject/raw/master/img/screenshot2.png</screenshot>
<dependencies>
<nextcloud min-version="26" max-version="30" />
<nextcloud min-version="27" max-version="30" />
</dependencies>
<background-jobs>
<job>OCA\OpenProject\BackgroundJob\RemoveExpiredDirectUploadTokens</job>
Expand Down
8 changes: 2 additions & 6 deletions tests/acceptance/features/api/setup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -678,9 +678,7 @@ Feature: setup the integration through an API
When user "OpenProject" sends a "PROPFIND" request to "/remote.php/webdav" using old app password
Then the HTTP status code should be "401"

# to locally run this test the "project folder" needs to be setup already
# issue of group folder https://github.com/nextcloud/groupfolders/issues/2718
@skipOnStable25 @skipOnStable26

Scenario: check version of uploaded file inside a group folder
Given user "Carol" has been created
And user "Carol" has been added to the group "OpenProject"
Expand All @@ -693,9 +691,7 @@ Feature: setup the integration through an API
When user "Carol" deletes folder "/OpenProject/OpenProject/project-demo"
Then the HTTP status code should be 204

# to locally run this test the "project folder" needs to be setup already
# issue of group folder https://github.com/nextcloud/groupfolders/issues/2718
@skipOnStable25 @skipOnStable26

Scenario: check version of uploaded file after an update inside a group folder
Given user "Carol" has been created
And user "Carol" has been added to the group "OpenProject"
Expand Down
7 changes: 0 additions & 7 deletions tests/lib/Reference/WorkPackageReferenceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
namespace OCA\OpenProject\Reference;

use OC\Collaboration\Reference\ReferenceManager;
use OC_Util;
use OCA\OpenProject\AppInfo\Application;
use OCA\OpenProject\Service\OpenProjectAPIService;
use OCP\IConfig;
Expand All @@ -34,12 +33,6 @@
use PHPUnit\Framework\TestCase;

class WorkPackageReferenceProviderTest extends TestCase {
protected function setUp(): void {
if (version_compare(OC_Util::getVersionString(), '26') < 0) {
$this->markTestSkipped('WorkPackageReferenceProvider is only available from nextcloud 26 so skip the tests on versions below');
}
}

/**
*
* @param array<string> $onlyMethods
Expand Down
75 changes: 29 additions & 46 deletions tests/lib/Service/OpenProjectAPIServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use OC\Authentication\Token\IToken;
use OC\Avatar\GuestAvatar;
use OC\Http\Client\Client;
use OC_Util;
use OCA\GroupFolders\Folder\FolderManager;
use OCA\OpenProject\AppInfo\Application;
use OCA\OpenProject\Exception\OpenprojectErrorException;
Expand Down Expand Up @@ -639,53 +638,37 @@ private function getOpenProjectAPIService(
$ocClient = null;
$client = new GuzzleClient();
$clientConfigMock = $this->getMockBuilder(IConfig::class)->getMock();

if (version_compare(OC_Util::getVersionString(), '27') >= 0) {
$clientConfigMock
->method('getSystemValueBool')
->withConsecutive(
['allow_local_remote_servers', false],
['installed', false],
['allow_local_remote_servers', false],
['allow_local_remote_servers', false],
['installed', false],
['allow_local_remote_servers', false],
['allow_local_remote_servers', false],
['installed', false],
['allow_local_remote_servers', false]
)
->willReturnOnConsecutiveCalls(
true,
true,
true,
true,
true,
true,
true,
true,
true
);
//changed from nextcloud 26
$ocClient = new Client(
$clientConfigMock,
$certificateManager,
$client,
$this->createMock(IRemoteHostValidator::class),
$this->createMock(LoggerInterface::class));
} elseif (version_compare(OC_Util::getVersionString(), '26') >= 0) {
$clientConfigMock
$clientConfigMock
->method('getSystemValueBool')
->with('allow_local_remote_servers', false)
->willReturn(true);

//changed from nextcloud 26
$ocClient = new Client(
$clientConfigMock,
$certificateManager,
$client,
$this->createMock(IRemoteHostValidator::class)
->withConsecutive(
['allow_local_remote_servers', false],
['installed', false],
['allow_local_remote_servers', false],
['allow_local_remote_servers', false],
['installed', false],
['allow_local_remote_servers', false],
['allow_local_remote_servers', false],
['installed', false],
['allow_local_remote_servers', false]
)
->willReturnOnConsecutiveCalls(
true,
true,
true,
true,
true,
true,
true,
true,
true
);
}
//changed from nextcloud 26
$ocClient = new Client(
$clientConfigMock,
$certificateManager,
$client,
$this->createMock(IRemoteHostValidator::class),
$this->createMock(LoggerInterface::class));

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