Skip to content

Types of request param in KernelBrowser are now string instead of integer #38591

@alexander-schranz

Description

@alexander-schranz

Symfony version(s) affected: 5.2.0-beta2

Description

In the request stack does now only contain strings instead of integer like before:

How to reproduce

I did test sulu against the newest 5.2.0-dev and some tests are failing now a basic example looks like this:

$this->client->request(
    'PUT',
    '/api/contacts/' . $contact->getId(),
    [
        'account' => [
            'id' => 5, // a integer type
        ],
    ]
);

If we then debug the value is now a string, in 5.1.7 its correctly a integer:

$request->request->all()['account']['id'];

Before this was a integer with 5 and now its an string with "5" and so this make in our case some test fail which I think should not happen.

Possible Solution

Not sure yet where and why this behaviour was changed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions