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

v2 API (Folders) #1003

Merged
merged 25 commits into from
Apr 8, 2021
Merged

v2 API (Folders) #1003

merged 25 commits into from
Apr 8, 2021

Conversation

powerpaul17
Copy link
Contributor

@powerpaul17 powerpaul17 commented Dec 25, 2020

This should be the folder part of the v2 API.

@powerpaul17 powerpaul17 marked this pull request as draft December 25, 2020 14:46
@SMillerDev
Copy link
Contributor

Thanks for the PR, it's exciting that someone is getting started with the V2 API 4,5 years after the draft was written 😅.

I would ask/urge you to split the work into multiple pull requests though. It's simply too much work to review it otherwise. If you add some test to the current one it's perfectly doable to review it and I'd be happy to do so.

@powerpaul17
Copy link
Contributor Author

Thanks for the excitement! 😉 It will certainly take some time as I'm doing this also in my spare time. But I guess people are used to being patient around here..
From what I saw the draft should be ok, as stated in the issue #628 there may come up some things to change but I think it would be best to deal with it in the process. We can always discuss them when it becomes relevant.
I totally agree that having too big PRs is very hard to review, so I'll try to submit in pieces.

@powerpaul17 powerpaul17 changed the title V2 API v2 API (Folders) Dec 26, 2020
@powerpaul17
Copy link
Contributor Author

@SMillerDev, one question: I saw that you recently added the v2 versions of the services and mappers. I suppose I should use these since the others are marked as deprecated. But there are now some functions missing which were available before. Should I recreate these according to the old ones? Are there any other things to keep in mind?

@anoymouserver
Copy link
Contributor

Yes you should use the V2 versions of the mappers/services, since the old ones are removed gradually.
One option is that you list which functions are missing for APIv2 and we implement them, or you implement them yourself and we review it then anyways.

@powerpaul17
Copy link
Contributor Author

Yes you should use the V2 versions of the mappers/services, since the old ones are removed gradually.
One option is that you list which functions are missing for APIv2 and we implement them, or you implement them yourself and we review it then anyways.

I have no problem in implementing what I need, just wanted to make sure it's ok since it's my first time contributing to this repo. But I guess I'm too polite, we can sort everything out during/after the review(s) 😉

Copy link
Contributor

@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

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

Looking good so far, just some comments that could make the code cleaner IMHO

@powerpaul17
Copy link
Contributor Author

Thanks for reviewing already but actually I'm not finished yet.. 😅 But it's definitely good to have some feedback..

@SMillerDev
Copy link
Contributor

Just wanted to get some basic review done already. Don't forget to rebase when you continue because I just merged the V2 version of the Feed Services.

@Grotax Grotax added API Impact API/Backend code major labels Jan 20, 2021
@SMillerDev SMillerDev added this to the 16.0.0 milestone Jan 20, 2021
Signed-off-by: Paul Tirk <[email protected]>
Signed-off-by: Paul Tirk <[email protected]>
Signed-off-by: Paul Tirk <[email protected]>
Signed-off-by: Paul Tirk <[email protected]>
@powerpaul17 powerpaul17 marked this pull request as ready for review March 25, 2021 17:34
Copy link
Contributor

@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

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

Thanks for the work, the code itself looks mostly fine in terms of features now. I'd just like some more consistent type usage and more tests and then we'll be good to go.

@powerpaul17
Copy link
Contributor Author

Thanks, I am always in favor of type hints & tests, I just do not program a lot in php, so I didn't know how to do it..

Copy link
Contributor

@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

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

Just a couple more tweaks and I think we're ready to go after.

@codecov-io
Copy link

Codecov Report

Merging #1003 (cdf18fa) into master (aaa461d) will decrease coverage by 0.52%.
The diff coverage is 91.78%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1003      +/-   ##
============================================
- Coverage     87.22%   86.69%   -0.53%     
- Complexity      701      726      +25     
============================================
  Files            60       62       +2     
  Lines          2520     2609      +89     
============================================
+ Hits           2198     2262      +64     
- Misses          322      347      +25     
Impacted Files Coverage Δ Complexity Δ
lib/Controller/ApiController.php 72.72% <0.00%> (ø) 5.00 <0.00> (ø)
lib/Controller/ApiPayloadTrait.php 68.42% <44.44%> (-21.58%) 9.00 <4.00> (+4.00) ⬇️
lib/Controller/FolderApiV2Controller.php 100.00% <100.00%> (ø) 8.00 <8.00> (?)
lib/Db/Feed.php 99.05% <100.00%> (+0.06%) 78.00 <3.00> (+3.00)
lib/Db/Folder.php 100.00% <100.00%> (ø) 22.00 <1.00> (+1.00)
lib/Db/Item.php 100.00% <100.00%> (ø) 83.00 <2.00> (+2.00)
lib/Fetcher/FeedFetcher.php 88.57% <0.00%> (-0.17%) 37.00% <0.00%> (ø%)
lib/Config/LegacyConfig.php 0.00% <0.00%> (ø) 7.00% <0.00%> (ø%)
lib/Service/FeedServiceV2.php 100.00% <0.00%> (ø) 28.00% <0.00%> (ø%)
lib/Service/ImportService.php 100.00% <0.00%> (ø) 6.00% <0.00%> (ø%)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaa461d...cdf18fa. Read the comment docs.

@powerpaul17 powerpaul17 requested a review from SMillerDev April 5, 2021 19:01
Copy link
Contributor

@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

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

Looks good to me but I'd like to hold of on merging this until we have 15.4 shipped, shouldn't be too long now.

@powerpaul17
Copy link
Contributor Author

No problem, I just wanted to make sure if it's ok now, so I can continue with the next part. 😉

@SMillerDev SMillerDev merged commit f18adeb into nextcloud:master Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Impact API/Backend code enhancement major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants