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

Replace all pagination with Filter classes #263

Merged
merged 5 commits into from
Sep 9, 2020
Merged

Replace all pagination with Filter classes #263

merged 5 commits into from
Sep 9, 2020

Conversation

giggsey
Copy link
Contributor

@giggsey giggsey commented Sep 8, 2020

Continuation of #259

@giggsey
Copy link
Contributor Author

giggsey commented Sep 8, 2020

I force pushed to try to get rid of some of the unrelated commits, but I think the pipeline is from before. CS Fixer runs fine locally

Copy link
Member

@akondas akondas left a comment

Choose a reason for hiding this comment

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

minor touches to make, I improved the code style but now phpstan is still complaining about something, is the status of this build visible to you?

@giggsey
Copy link
Contributor Author

giggsey commented Sep 9, 2020

Both PHPStan failures are because TokenFixtures and PrivatePackageDownloadFixtures want to load 9999 organisations. From what I can see, both classes are only used to populate dummy data. Happy to them to limit to 100 instead?

@codecov
Copy link

codecov bot commented Sep 9, 2020

Codecov Report

Merging #263 into master will decrease coverage by 0.02%.
The diff coverage is 98.50%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #263      +/-   ##
============================================
- Coverage     99.82%   99.80%   -0.03%     
- Complexity     1539     1542       +3     
============================================
  Files           252      253       +1     
  Lines          4479     4503      +24     
============================================
+ Hits           4471     4494      +23     
- Misses            8        9       +1     
Impacted Files Coverage Δ Complexity Δ
src/Query/User/PackageQuery/Filter.php 94.11% <94.11%> (ø) 8.00 <8.00> (?)
src/Controller/Admin/OrganizationController.php 100.00% <100.00%> (ø) 4.00 <0.00> (ø)
src/Controller/Admin/ProxyController.php 100.00% <100.00%> (ø) 4.00 <0.00> (ø)
src/Controller/Admin/UserController.php 100.00% <100.00%> (ø) 8.00 <0.00> (ø)
src/Controller/Organization/MembersController.php 100.00% <100.00%> (ø) 14.00 <0.00> (ø)
src/Controller/OrganizationController.php 100.00% <100.00%> (ø) 41.00 <0.00> (ø)
.../Admin/OrganizationQuery/DbalOrganizationQuery.php 100.00% <100.00%> (ø) 5.00 <1.00> (ø)
src/Query/Admin/UserQuery/DbalUserQuery.php 100.00% <100.00%> (ø) 8.00 <1.00> (ø)
src/Query/Filter.php 100.00% <100.00%> (ø) 8.00 <5.00> (-5.00)
...y/User/OrganizationQuery/DbalOrganizationQuery.php 100.00% <100.00%> (ø) 17.00 <4.00> (ø)
... and 2 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 580c18c...c732f0c. Read the comment docs.

Copy link
Member

@akondas akondas left a comment

Choose a reason for hiding this comment

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

Thanks 🍻 🍸

@@ -144,7 +143,7 @@ public function versionCount(string $packageId): int
/**
* @return Version[]
*/
public function getVersions(string $packageId, int $limit = 20, int $offset = 0): array
public function getVersions(string $packageId, \Buddy\Repman\Query\Filter $filter): array
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we can somehow automate the detection of this notation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly 'fully_qualified_strict_types', but it looks like that only works when the use statement is there in the first place

@akondas akondas merged commit dc59f82 into repman-io:master Sep 9, 2020
@akondas
Copy link
Member

akondas commented Sep 9, 2020

Thanks @giggsey for your work 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants