Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

[RestContext] Arrays in request #264

@Mateuszry

Description

@Mateuszry

After release v3.2.0 with feature: "Allows parameters with dot" #258 arrays in request didn't work as before.
Feature:

And I send a "POST" request to "/api/supplier" with parameters:
      | key         | value               |
      | name        | testName            |
      | user[email] | testEmail@email.com |
      | user[lang]  | en                  |

Request dump in Symfony application before release:

array(2) {
  ["name"]=>
  string(8) "testName"
  ["user"]=>
  array(2) {
    ["email"]=>
    string(19) "testEmail@email.com"
    ["lang"]=>
    string(2) "en"
  }
}

Request dump in Symfony application after release:

array(3) {
  ["name"]=>
  string(8) "testName"
  ["user[email]"]=>
  string(19) "testEmail@email.com"
  ["user[lang]"]=>
  string(2) "en"
}

I also tried the syntax with dots:
Feature:

    And I send a "POST" request to "/api/supplier" with parameters:
      | key         | value               |
      | name        | testName            |
      | user.email  | testEmail@email.com |
      | user.lang   | en                  |

Request dump in Symfony application:

array(3) {
  ["name"]=>
  string(8) "testName"
  ["user.email"]=>
  string(19) "testEmail@email.com"
  ["user.lang"]=>
  string(2) "en"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions