Skip to content

Pagination throws 500 when trying set large value page - #3450

Closed
webant-ltd wants to merge 105 commits into
api-platform:2.5from
webant-ltd:fix-error-pagination
Closed

webant-ltd wants to merge 105 commits into
api-platform:2.5from
webant-ltd:fix-error-pagination

Conversation

@webant-ltd

Copy link
Copy Markdown
Q A
Bug fix? yes/no
New feature? no
BC breaks? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

I integrate a schemathesis tool for automatically testing api based on the openapi standard

When setting a large pag value, for example 9223372036854775807, a 500 error is caused

"Return value of ApiPlatform \ Core \ DataProvider \ Pagination :: getOffset () must be of the type integer, float returned"

Added a check for the type of the return value in the getOffset method on Pagination class,

if the value is outside the scope of int64 (https://www.php.net/manual/en/language.types.integer.php) throw an error "Large page and limit values"

jocel1 and others added 30 commits August 22, 2019 13:45
* Issue #3082: Add and use ContextStamp.

* Issue #3082: Add tests.

* Issue #3157: Correct passing of context.

* Issue #3157: Minor corrections.
* Add defaults configuration

* Suggest defaults in configuration

* Apply changes from code review

* Add deprecation notices for legacy defaults

* Apply @dunglas' suggestions
This makes it more clear this interface can be 'caught'
Make the base exception extend throwable
* 2.5:
  Fix spelling
  Fix removal of illegal characters in schema name for Amazon API Gateway
  Add links to documentation to ApiResource properties
  fix #3189 - JSONAPI pagination ignored when using filter parameter
This will allow IDEs to provide hints/ autocompletion
More Descriptive Input/Output class names
More Descriptive Input/Output class names
alanpoulain and others added 29 commits December 21, 2019 12:32
* 2.5:
  Update CHANGELOG.md
  [GraphQL] Better detection of collection types (#3327)
  Add tests for building JSON Schema of non-resource class
  Fix JSON Schema generation for non-resource class
* Subscription support

* Use sha256 hash for generating subscription identifiers

* Update CHANGELOG
…mation-in-contributing

fix outdated pull request template link in contribution guide
…tions

Add specification property field's values restrictions based on validator setting
Co-authored-by: Teoh Han Hui <teohhanhui@gmail.com>
Allow to autoconfigure validation groups generators
Co-Authored-By: Teoh Han Hui <teohhanhui@gmail.com>
Add error code for JsonApi errors.
Co-Authored-By: Teoh Han Hui <teohhanhui@gmail.com>
send Varnish BAN requests with smaller headers
add support for stale-while-revalidate and stale-if-error cache-control extensions
@webant-ltd webant-ltd closed this Mar 13, 2020
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.