Skip to content

Conversation

@nabim777
Copy link
Collaborator

@nabim777 nabim777 commented Jul 10, 2025

Description

1. Support groupfolders master branch

The data structure to access the groupfolder has been changed in nextcloud/groupfolders#3849.
Implemented a method to convert the groupfolder entry into an array so that we maintain the compatibility with older versions.

2. Fix for unit test failre:

Nextcloud master updated the php-http/guzzle7-adapter in nextcloud/server#53866
which included the changes in return type for php-fig/http-message. see: php-fig/http-message@1.1...2.0

So, this PR fixes a php unit test failure in OpenProjectControllerTest::testIsValidOpenProjectInstanceException, where the mocked ResponseInterface::getBody() method was returning a string.

According to Psr, getBody() must return an instance of Psr\Http\Message\StreamInterface. Returning a string was causing the following PHPUnit error:

1) Error
The data provider specified for OCA\OpenProject\Controller\OpenProjectControllerTest::testIsValidOpenProjectInstanceException is invalid.
PHPUnit\Framework\MockObject\IncompatibleReturnValueException: Method getBody may not return value of type string, its declared return type is "Psr\Http\Message\StreamInterface"
/__w/integration_openproject/integration_openproject/integration_openproject/server/apps/integration_openproject/tests/lib/Controller/OpenProjectControllerTest.php:163

Related Issue or Workpackage

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Updated CHANGELOG.md file

@nabim777 nabim777 force-pushed the CI/fix-ci branch 3 times, most recently from 4eb1329 to 5defcb2 Compare July 10, 2025 09:19
@nabim777 nabim777 self-assigned this Jul 10, 2025
@nabim777 nabim777 force-pushed the CI/fix-ci branch 7 times, most recently from f85621f to 08d7f8a Compare July 11, 2025 10:25
Copy link
Collaborator

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are good 👍
Nextcloud master updated the php-http/guzzle7-adapter in nextcloud/server#53866
which included the changes in return type for php-fig/http-message. see: php-fig/http-message@1.1...2.0

@nabim777 Please update the description when relevant information

@nabim777
Copy link
Collaborator Author

Need to fix another CI failure in this PR

@saw-jan saw-jan force-pushed the CI/fix-ci branch 4 times, most recently from 4686b11 to 549b105 Compare July 14, 2025 05:41
@saw-jan saw-jan changed the title CI: Fix php unit test failure fix: convert and consume groupfolder properties as an array Jul 14, 2025
@saw-jan saw-jan force-pushed the CI/fix-ci branch 7 times, most recently from 8d5153b to 247dead Compare July 14, 2025 12:06
@saw-jan saw-jan marked this pull request as ready for review July 15, 2025 08:05
@saw-jan saw-jan changed the title fix: convert and consume groupfolder properties as an array fix: consume groupfolder properties as an array Jul 15, 2025
@saw-jan
Copy link
Collaborator

saw-jan commented Jul 15, 2025

Need to fix another CI failure in this PR

we will look at them in next Pr once the CI is stable with this one

@saw-jan saw-jan added the backport PR needs backporting label Jul 15, 2025
@saw-jan saw-jan merged commit 05fe7e5 into master Jul 15, 2025
11 checks passed
@saw-jan saw-jan deleted the CI/fix-ci branch July 15, 2025 08:43
@github-actions
Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PR needs backporting feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants