-
-
Notifications
You must be signed in to change notification settings - Fork 166
Upgrade rest bundle #167
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
Conversation
|
@pamil we have a lot of work here 🤣 |
|
@lchrusciel @pamil |
src/Bundle/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php
Outdated
Show resolved
Hide resolved
…Handler.php Co-authored-by: Kamil Kokot <kamil@kokot.me>
|
@pamil To copy here what we said in slack. We can create a recipe for this bundle with this configuration: |
src/Bundle/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Kamil Kokot <kamil@kokot.me>
Co-authored-by: Kamil Kokot <kamil@kokot.me>
…Handler.php Co-authored-by: Kamil Kokot <kamil@kokot.me>
32279f1 to
2b0c45f
Compare
lchrusciel
left a comment
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.
looks good to me
| $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 comment
The reason will be displayed to describe this comment to others. Learn more.
Woulndn't it be better?
| $currentPage = (int) $request->query->get('page', '1'); | |
| $currentPage = (int) $request->query->getInt('page', '1'); |
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.
| $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 comment
The reason will be displayed to describe this comment to others. Learn more.
| $currentPage = (int) $request->query->get('page', '1'); | |
| $currentPage = $request->query->getInt('page', '1'); |
|
Thank you, Loïc! 🎉 |
Uh oh!
There was an error while loading. Please reload this page.