Skip to content

Commit

Permalink
Improving denormalization
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Sep 21, 2024
1 parent da8f41d commit 712490f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/9.0/reader/record-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ foreach ($csv->getRecordsAsObject(ClimaticRecord::class) {
}
```

Starting with version `9.17.0` you can get a more granular effect. To do so, you first need to disable the
Starting with version `9.17.0` you can get a more granular effect. To do so, you first need to disable the
auto-conversion using `Denormalizer::disallowEmptyStringAsNull`. Once this is done you can either control
the conversion at the field level using the option field `emptyStringAsNull` as shown in the example below:

Expand All @@ -236,6 +236,7 @@ flnail readonly class Car
}
}
```

Just like with the `MapCell` attribute, if set to true the conversion will happen otherwise and by default, no conversion is done.

### Post Mapping
Expand Down Expand Up @@ -280,8 +281,8 @@ in the order they have been declared.

<p class="message-info">The feature is available since version <code>9.13.0</code></p>

The `League\Csv\Serializer\AfterMapping` attribute is deprecated in favor of the `MapRecord` attribute. The
example is left of reference.
The `League\Csv\Serializer\AfterMapping` attribute is deprecated in favor of the `MapRecord` attribute.
The example is left of reference.

```php
use League\Csv\Serializer;
Expand Down

0 comments on commit 712490f

Please sign in to comment.