This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Serializer
Nicolas Grekas 50db43fc4c bug #34019 [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor (Dario Savella)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

My first pull request...
The following code:
```
$data = <<<EOD
a,b
c,d
EOD;
$encoder = new CsvEncoder([CsvEncoder::NO_HEADERS_KEY=>true]);
var_dump($encoder->decode($data,'csv'));
```
produces:
```
array(2) {
  'a' =>
  string(1) "c"
  'b' =>
  string(1) "d"
}
```
instead of the expected:
```
array(2) {
  [0] =>
  array(2) {
    [0] =>
    string(1) "a"
    [1] =>
    string(1) "b"
  }
  [1] =>
  array(2) {
    [0] =>
    string(1) "c"
    [1] =>
    string(1) "d"
  }
}
```

Commits
-------

a0430f6917 [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor
2019-11-28 12:29:50 +01:00
..
Annotation Merge branch '3.4' into 4.3 2019-08-14 14:26:46 +02:00
DependencyInjection Merge branch '3.4' into 4.0 2018-07-26 11:08:35 +02:00
Encoder bug #34019 [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor (Dario Savella) 2019-11-28 12:29:50 +01:00
Exception Mark ExceptionInterfaces throwable 2018-08-29 17:58:00 +02:00
Extractor Fix CS regarding nullable arguments 2019-07-05 09:04:50 +02:00
Mapping Merge branch '3.4' into 4.3 2019-11-26 04:44:44 +01:00
NameConverter [Serializer] Fix MetadataAwareNameConverter usage with string group 2019-11-21 13:47:16 +01:00
Normalizer Merge branch '3.4' into 4.3 2019-11-13 08:29:07 +01:00
Tests bug #34019 [Serializer] CsvEncoder::NO_HEADERS_KEY ignored when used in constructor (Dario Savella) 2019-11-28 12:29:50 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md Merge branch '3.4' into 4.3 2019-08-14 13:02:36 +02:00
composer.json Merge branch '4.2' into 4.3 2019-06-07 15:58:47 +02:00
LICENSE update year in license files 2019-01-01 14:45:19 +01:00
phpunit.xml.dist Bump phpunit XSD version to 5.2 2018-11-11 12:18:13 +01:00
README.md Updated all the README files 2016-03-04 08:12:06 +01:00
Serializer.php Merge branch '3.4' into 4.3 2019-10-30 13:53:54 +01:00
SerializerAwareInterface.php [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
SerializerAwareTrait.php Add normalizer / denormalizer awarness 2016-02-19 11:48:56 +01:00
SerializerInterface.php [Serializer] fix return type declarations 2019-08-26 09:52:58 +02:00

Serializer Component

With the Serializer component it's possible to handle serializing data structures, including object graphs, into array structures or other formats like XML and JSON. It can also handle deserializing XML and JSON back to object graphs.

Resources