Skip to content

Commit

Permalink
Merge pull request #30 from spiral-packages/fix-readme
Browse files Browse the repository at this point in the history
Update readme and changelog
  • Loading branch information
butschster committed Mar 23, 2024
2 parents f484db5 + e1c0711 commit 189a0a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.1.0 - 2023-06-08
- **Other Features**
- Added the `Spiral\Serializer\Symfony\Normalizer\RamseyUuidNormalizer` class to normalize and denormalize
UUID objects.

## 2.0.0 - 2023-04-19
- **High Impact Changes**
- Since version **2.0.0**, serializers are registered with names `symfony-json`, `symfony-csv`,
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Make sure that your server is configured with following PHP version and extensio

- PHP 8.1+
- Spiral framework ^3.7
- Symfony Serializer Component ^5.4 || ^6.0
- Symfony PropertyAccess Component ^5.4 || ^6.0
- Symfony Serializer Component ^6.4 || ^7.0
- Symfony PropertyAccess Component ^6.4 || ^7.0

## Installation

Expand Down Expand Up @@ -69,6 +69,7 @@ parameters to extend the default configuration.
```php
use Symfony\Component\Serializer\Encoder;
use Symfony\Component\Serializer\Normalizer;
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
use Spiral\Core\Container\Autowire;

return [
Expand All @@ -94,7 +95,7 @@ return [
Encoder\XmlEncoder::class,
new Autowire(Encoder\YamlEncoder::class),
],
'metadataLoader' => new AnnotationLoader(new AnnotationReader()) // by default
'metadataLoader' => new AttributeLoader() // by default
// Other available loaders:
// 'metadataLoader' => new YamlFileLoader('/path/to/your/definition.yaml')
// 'metadataLoader' => new XmlFileLoader('/path/to/your/definition.xml')
Expand Down

0 comments on commit 189a0a2

Please sign in to comment.