diff --git a/.github/workflows/shared_workflow.yml b/.github/workflows/shared_workflow.yml index fc79cad97..f12011a8d 100644 --- a/.github/workflows/shared_workflow.yml +++ b/.github/workflows/shared_workflow.yml @@ -11,11 +11,9 @@ jobs: name: unit tests and linting strategy: matrix: - nextcloudVersion: [ stable26, stable27, stable28, stable29, stable30 ] + nextcloudVersion: [ stable27, stable28, stable29, stable30 ] phpVersion: [ 8.0, 8.1, 8.2, 8.3] exclude: - - nextcloudVersion: stable26 - phpVersion: 8.3 - nextcloudVersion: stable27 phpVersion: 8.3 - nextcloudVersion: stable30 @@ -180,15 +178,13 @@ jobs: name: API tests strategy: matrix: - nextcloudVersion: [ stable26, stable27, stable28, stable29, stable30 ] + nextcloudVersion: [ stable27, stable28, stable29, stable30 ] phpVersionMajor: [ 8 ] phpVersionMinor: [ 0, 1, 2, 3 ] database: [pgsql, mysql] isScheduledEventNightly: - ${{github.event_name == 'schedule'}} exclude: - - nextcloudVersion: stable26 - phpVersionMinor: 3 - nextcloudVersion: stable27 phpVersionMinor: 3 - nextcloudVersion: stable30 @@ -297,10 +293,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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 08e9a57b1..e0313e00b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ## 2.6.4 - 2024-08-15 ### Changed diff --git a/appinfo/info.xml b/appinfo/info.xml index 5b700bc32..6afe609ab 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -41,7 +41,7 @@ For more information on how to set up and use the OpenProject application, pleas https://github.com/nextcloud/integration_openproject/raw/master/img/screenshot1.png https://github.com/nextcloud/integration_openproject/raw/master/img/screenshot2.png - + OCA\OpenProject\BackgroundJob\RemoveExpiredDirectUploadTokens diff --git a/tests/acceptance/features/api/setup.feature b/tests/acceptance/features/api/setup.feature index 842e1fca4..c7d01bb7e 100644 --- a/tests/acceptance/features/api/setup.feature +++ b/tests/acceptance/features/api/setup.feature @@ -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" @@ -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" diff --git a/tests/lib/Reference/WorkPackageReferenceProviderTest.php b/tests/lib/Reference/WorkPackageReferenceProviderTest.php index b17ff704a..c7cfa16d3 100644 --- a/tests/lib/Reference/WorkPackageReferenceProviderTest.php +++ b/tests/lib/Reference/WorkPackageReferenceProviderTest.php @@ -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; @@ -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 $onlyMethods diff --git a/tests/lib/Service/OpenProjectAPIServiceTest.php b/tests/lib/Service/OpenProjectAPIServiceTest.php index 68ce11d77..50f0d5906 100644 --- a/tests/lib/Service/OpenProjectAPIServiceTest.php +++ b/tests/lib/Service/OpenProjectAPIServiceTest.php @@ -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; @@ -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);