-
Notifications
You must be signed in to change notification settings - Fork 155
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
Upgrade rest bundle #167
Merged
Merged
Upgrade rest bundle #167
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1ce86e6
Upgrade rest bundle
loic425 f4fdada
Use templating or twig for template rendering
loic425 ce8f902
Fix psalm errors
loic425 90a376f
Fix phpspec errors
loic425 61420b7
Fix coding standard
loic425 6f9ef32
Enable body listener on fos rest configuration
loic425 9b33f88
Update src/Bundle/Form/Extension/HttpFoundation/HttpFoundationRequest…
loic425 f988b35
Remove a bc-break
loic425 ac1e9b5
Remove an unnecessary change on fos rest config
loic425 2bf3bcd
Add an upgrade guide
loic425 ce995cd
Update UPGRADE-1.7.md
loic425 ed03d67
Update UPGRADE-1.7.md
loic425 5ec3938
Update src/Bundle/Form/Extension/HttpFoundation/HttpFoundationRequest…
loic425 2b0c45f
Trying to prepend fos rest configuration
loic425 6f8bd46
Fix phpstan error
loic425 9b64585
Remove useless doc for upgrade
loic425 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -58,7 +58,8 @@ public function get(RequestConfiguration $requestConfiguration, RepositoryInterf | |||||
$requestConfiguration->getPaginationMaxPerPage(), | ||||||
$paginationLimits | ||||||
)); | ||||||
$paginator->setCurrentPage($request->query->get('page', 1)); | ||||||
$currentPage = (int) $request->query->get('page', '1'); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
$paginator->setCurrentPage($currentPage); | ||||||
|
||||||
// This prevents Pagerfanta from querying database from a template | ||||||
$paginator->getCurrentPageResults(); | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woulndn't it be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lchrusciel Yes, but, if it returns an integer, we don't need the (int) conversion after :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed another suggestion to remove the unnecessary int conversion in your suggestion.