Skip to content

Commit

Permalink
Prepare 9.13.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Dec 16, 2023
1 parent 0c443c4 commit 3690cc7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

All Notable changes to `Csv` will be documented in this file

## [Next] - TBD
## [9.13.0](https://github.com/thephpleague/csv/compare/9.12.0...9.13.0) - 2023-12-16

### Added

- `SwapDelimiter` stream filter to allow working with multibyte CSV delimiter
- `League\Csv\Serializer\AfterMapping` to work around the limitation aroud constructor usage.
- `Denormalizer` can register type alias to simplify callback usage.
- `League\Csv\Serializer\MapCell` has a new property `ignore` to qllow ignoring a property or a method typcasting during conversion.
- `League\Csv\SwapDelimiter` stream filter to allow working with multibyte CSV delimiter
- `League\Csv\Serializer\AfterMapping` to work around the limitation of not using the class constructor during denormalization.
- `League\Csv\Serializer\Denormalizer` to allow registering type alias to improve callback usage.
- `League\Csv\Serializer\MapCell` has a new property `ignore` to allow ignoring a property or a method during denormalization.

### Deprecated

Expand Down
10 changes: 5 additions & 5 deletions docs/9.0/reader/record-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ It can be used on class properties and methods regardless of their visibility an

The attribute can take up to four (4) arguments which are all optional:

- The `column` argument tells the engine which record key to use via its numeric or name. If not present the property name or the name of the first argument of the `setter` method will be used. In such case, you are required to specify the property names information.
- The `cast` argument which accept the name of a class implementing the `TypeCasting` interface and responsible for type casting the record value. If not present, the mechanism will try to resolve the typecasting based on the property or method argument type.
- The `options` argument enables controlling typecasting by providing extra arguments to `TypeCasting::setOptions` method. The argument expects an associative array and relies on named arguments to inject its value to the method.
- The `ignore` arguemnt which is a boolean control if the property or method should be completely ignored by the mechanism. By default its value is `false`. This property takes precedence over all the other properties of the attribute once set to `true`.
- The `column` a string or an integer that tells the engine which record key to use via its offset or key. If not present the property name or the name of the first argument of the `setter` method will be used. In such case, you are required to specify the property names information.
- The `cast` a string which represents the name of a class implementing the `TypeCasting` interface or an alias and responsible for type casting the record value. If not present, the mechanism will try to resolve the typecasting based on the property or method argument type.
- The `options` an associative array to improve typecasting by providing extra options per class/alias. The argument expects an associative array and relies on named arguments to inject its value to the method.
- The `ignore` a boolean which control if the property or method should be completely ignored by the mechanism. By default, its value is `false`. This property takes precedence over all the other properties of the attribute once set to `true`.

<p class="message-info">The <code>ignore</code> argument was added in version <code>9.13.0</code></p>
<p class="message-notice">You can use the mechanism on a CSV without a header row but it requires
<p class="message-info">You can use the mechanism on a CSV without a header row but it requires
adding a <code>MapCell</code> attribute on each property or method needed for the conversion. Or you
can use the optional second argument of <code>TabularDataReader::getObjects</code> to specify the
header value, just like with <code>TabularDataReader::getRecords</code></p>
Expand Down
1 change: 1 addition & 0 deletions src/Serializer/CallbackCasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use function class_exists;

/**
* @internal Container for registering Closure as type and/or type alias casting
* @template TValue
*/
final class CallbackCasting implements TypeCasting
Expand Down

0 comments on commit 3690cc7

Please sign in to comment.