Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adapt return type for Nextcloud 26 #540

Merged
merged 4 commits into from
Feb 10, 2023

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Feb 8, 2023

Changed in nextcloud/server#36120

Should still be compatible with 25 as adding the return type on the child class is ok if none is there on the parent.

@cypress
Copy link

cypress bot commented Feb 8, 2023

10 failed and 1 flaky tests on run #263 ↗︎

10 40 0 0 Flakiness 1

Details:

fix: Adapt return type for Nextcloud 26
Project: Collectives Commit: a40379b4df
Status: Failed Duration: 12:49 💡
Started: Feb 10, 2023 6:09 PM Ended: Feb 10, 2023 6:22 PM
Failed  pages.spec.js • 2 failed tests

View Output Video

Test
Page > Editing a page > Supports page content editing and switching to read mode Screenshot
Page > Display table of contents > Allows to display/close TOC and switch page modes in between Screenshot
Failed  pages-links.spec.js • 8 failed tests

View Output Video

Test
Page > Link handling internal > Opens link to image in Nextcloud in viewer Screenshot
Page > Link handling internal > Opens link to text file in Nextcloud in viewer Screenshot
Page > Link handling internal > Opens link to page in this collective in same/new tab depending on view/edit mode Screenshot
Page > Link handling internal > Opens link to page in other collective in same/new tab depending on view/edit mode Screenshot
Page > Link handling internal > Opens link to another Nextcloud app in new tab Screenshot
Page > Link handling internal > Opens link to external page in new tab Screenshot
Page > Link handling public share > Public share: opens link to page in this collective in same/new tab depending on view/edit mode Screenshot
Page > Link handling public share > Public share: opens link to external page in new tab Screenshot
Flakiness  cypress/e2e/pages.spec.js • 1 flaky test

View Output Video

Test
Page > Creating a page from template > New page has template content Screenshot

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@juliusknorr juliusknorr force-pushed the bugfix/noid/wrapper-return-type branch from 8bb7688 to d23484d Compare February 8, 2023 14:29
@juliusknorr juliusknorr requested a review from mejo- February 8, 2023 14:56
@juliusknorr juliusknorr added bug Something isn't working 3. to review labels Feb 8, 2023
Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

Good catch! But it turns out this is possible in stable25 - but not in php 7.4 which stable25 still supports. So i don't know what to do here.

@juliusknorr
Copy link
Member Author

cc @come-nc as you added the return type on the storage wrapper. Any idea how we could stay compatible with 7.4 still? Otherwise apps implementing a wrapper would be forced to release separate versions for 25/26.

@juliusknorr juliusknorr force-pushed the bugfix/noid/wrapper-return-type branch from 9a2d39f to 62aedf2 Compare February 10, 2023 13:59
@juliusknorr
Copy link
Member Author

Found a way by having two separate classes and let psalm ignore the error for php 7.4. Not really nice but at least save us from needing to branch off for Nextcloud 26. @mejo- What do you think?

@max-nextcloud
Copy link
Collaborator

max-nextcloud commented Feb 10, 2023

@juliushaertl sounds great! I was wondering if something like this would be possible.
I think the Lint / php-cs failure and the PHPUnit failures are still related to this though.

update: I addressed those two.

@max-nextcloud max-nextcloud force-pushed the bugfix/noid/wrapper-return-type branch from 41a3af7 to a40379b Compare February 10, 2023 17:42
@max-nextcloud max-nextcloud merged commit 81f76eb into main Feb 10, 2023
@delete-merged-branch delete-merged-branch bot deleted the bugfix/noid/wrapper-return-type branch February 10, 2023 18:22
@come-nc
Copy link

come-nc commented Feb 13, 2023

Way too many applications got hit by this change in OC.
It seems some of files classes should move to OCP, if so many applications depend on them anyway…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants