Skip to content

Commit

Permalink
release: version 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
romm committed Aug 25, 2023
1 parent bf02315 commit f3f3429
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 21 deletions.
1 change: 1 addition & 0 deletions docs/pages/project/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Below are listed the changelogs for all released version of the library.

## Version 1

- [`1.6.0` — 25th of August 2023](changelog/version-1.6.0.md)
- [`1.5.0` — 7th of August 2023](changelog/version-1.5.0.md)
- [`1.4.0` — 17th of April 2023](changelog/version-1.4.0.md)
- [`1.3.1` — 13th of February 2023](changelog/version-1.3.1.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/project/changelog/version-1.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ Note that this commit required heavy refactoring work, leading to a regression
for union types containing enums and other types. As these cases are considered
marginal, this change is considered non-breaking.

### Features
## Features

* Handle custom enum constructors registration ([217e12](https://github.com/CuyZ/Valinor/commit/217e12047440f7ded43c502b8fea1246dd23f2c3))

### Other
## Other

* Handle enum type as class type ([5a3caf](https://github.com/CuyZ/Valinor/commit/5a3caf4b246315715c51802e88d939b7c17a27e3))
4 changes: 2 additions & 2 deletions docs/pages/project/changelog/version-1.3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

Bugfix release.

### Bug Fixes
## Bug Fixes

* Check if temporary cache file exists before deletion ([3177bf](https://github.com/CuyZ/Valinor/commit/3177bf76849ab60bb5a4396f023a1ef0cc8200c8))
* Display useful error message for invalid constructor return type ([dc7f5c](https://github.com/CuyZ/Valinor/commit/dc7f5c3f837d68704ba987c9f0a5456acc940c31))
* Keep input path when error occurs in single node ([d70257](https://github.com/CuyZ/Valinor/commit/d70257b60dd667ff87b5f333d4b3790904303ab2))
* Properly handle class static constructor for other class ([d34974](https://github.com/CuyZ/Valinor/commit/d349741dd361e4bf9e52c2dbd76ec8799157807a))
* Properly handle union of `null` and objects ([8f03a7](https://github.com/CuyZ/Valinor/commit/8f03a7e0cbe1b83434e14d05a3f533e26b7a243f))

### Other
## Other

* Update dependencies ([f7e7f2](https://github.com/CuyZ/Valinor/commit/f7e7f29ff64efa84e1954e0084bb52156e4de56c))
6 changes: 3 additions & 3 deletions docs/pages/project/changelog/version-1.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ try {
}
```

### Features
## Features

* Introduce `InvalidSource` thrown when using invalid JSON/YAML ([0739d1](https://github.com/CuyZ/Valinor/commit/0739d128caa66817ab278bc849ed836fc041b88b))

### Bug Fixes
## Bug Fixes

* Allow integer values in float types ([c6df24](https://github.com/CuyZ/Valinor/commit/c6df24da2bd1bb013ff0aee7c932983646fa4b0e))
* Make `array-key` type match `mixed` ([ccebf7](https://github.com/CuyZ/Valinor/commit/ccebf78c997eb89caa9bb2b73e82b25d9710e6a3))
* Prevent infinite loop when class has parent class with same name ([83eb05](https://github.com/CuyZ/Valinor/commit/83eb058478cc7dc162a77bb2800d2fbd1839639d))

### Other
## Other

* Add previous exception in various custom exceptions ([b9e381](https://github.com/CuyZ/Valinor/commit/b9e381604c90ac5531e1e7ae6b63b9abda36126e))
28 changes: 14 additions & 14 deletions docs/pages/project/changelog/version-1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
!!! info inline end "[See release on GitHub]"
[See release on GitHub]: https://github.com/CuyZ/Valinor/releases/tag/1.5.0

### Features
## Features

* Introduce method to get date formats supported during mapping ([873961](https://github.com/romm/Valinor/commit/873961e8c17474bb4d96be6ea84390969d686d96))
* Introduce method to get date formats supported during mapping ([873961](https://github.com/CuyZ/Valinor/commit/873961e8c17474bb4d96be6ea84390969d686d96))

### Bug Fixes
## Bug Fixes

* Allow filesystem cache to be cleared when directory does not exist ([782408](https://github.com/romm/Valinor/commit/78240837e70a4a5f987e300de20478287e17224b))
* Allow negative timestamp to be mapped to a datetime ([d358e8](https://github.com/romm/Valinor/commit/d358e83bf94dd37359ce4d52388cf7c8639d98ec))
* Allow overriding of supported datetime formats ([1c70c2](https://github.com/romm/Valinor/commit/1c70c2d29ad9a70acc952031e5726e4ea492bad3))
* Correctly handle message formatting for long truncated UTF8 strings ([0a8f37](https://github.com/romm/Valinor/commit/0a8f37b15572107f321c9525573bc5de82463048))
* Make serialization of attributes possible ([e8ca2f](https://github.com/romm/Valinor/commit/e8ca2ff93c241034789d9af938bd7f5bbffd3d37))
* Remove exception inheritance from `UnresolvableType` ([eaa128](https://github.com/romm/Valinor/commit/eaa1283ae15e00b64552abcd28c0236033577992))
* Remove previous exception from `UnresolvableType` ([5c89c6](https://github.com/romm/Valinor/commit/5c89c66f0bdd87b4b50c401d1de22b72f4fde513))
* Allow filesystem cache to be cleared when directory does not exist ([782408](https://github.com/CuyZ/Valinor/commit/78240837e70a4a5f987e300de20478287e17224b))
* Allow negative timestamp to be mapped to a datetime ([d358e8](https://github.com/CuyZ/Valinor/commit/d358e83bf94dd37359ce4d52388cf7c8639d98ec))
* Allow overriding of supported datetime formats ([1c70c2](https://github.com/CuyZ/Valinor/commit/1c70c2d29ad9a70acc952031e5726e4ea492bad3))
* Correctly handle message formatting for long truncated UTF8 strings ([0a8f37](https://github.com/CuyZ/Valinor/commit/0a8f37b15572107f321c9525573bc5de82463048))
* Make serialization of attributes possible ([e8ca2f](https://github.com/CuyZ/Valinor/commit/e8ca2ff93c241034789d9af938bd7f5bbffd3d37))
* Remove exception inheritance from `UnresolvableType` ([eaa128](https://github.com/CuyZ/Valinor/commit/eaa1283ae15e00b64552abcd28c0236033577992))
* Remove previous exception from `UnresolvableType` ([5c89c6](https://github.com/CuyZ/Valinor/commit/5c89c66f0bdd87b4b50c401d1de22b72f4fde513))

### Other
## Other

* Avoid using `unserialize` when caching `NULL` default values ([5e9b4c](https://github.com/romm/Valinor/commit/5e9b4ce217cf43cd400127a76be73fd4fadd54c1))
* Catch `json_encode` exception to help identifying parsing errors ([861c3b](https://github.com/romm/Valinor/commit/861c3b9da7f5c762db11da2ba9bbfc1cbdeaace8))
* Update dependencies ([c31e5c](https://github.com/romm/Valinor/commit/c31e5c9eef02076d665b2d26c10d868a0414934e), [5fa107](https://github.com/romm/Valinor/commit/5fa1076e11d86e9f057ed58bd1d8c4a7d38580c3))
* Avoid using `unserialize` when caching `NULL` default values ([5e9b4c](https://github.com/CuyZ/Valinor/commit/5e9b4ce217cf43cd400127a76be73fd4fadd54c1))
* Catch `json_encode` exception to help identifying parsing errors ([861c3b](https://github.com/CuyZ/Valinor/commit/861c3b9da7f5c762db11da2ba9bbfc1cbdeaace8))
* Update dependencies ([c31e5c](https://github.com/CuyZ/Valinor/commit/c31e5c9eef02076d665b2d26c10d868a0414934e), [5fa107](https://github.com/CuyZ/Valinor/commit/5fa1076e11d86e9f057ed58bd1d8c4a7d38580c3))
101 changes: 101 additions & 0 deletions docs/pages/project/changelog/version-1.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Changelog 1.6.0 — 25th of August 2023

!!! info inline end "[See release on GitHub]"
[See release on GitHub]: https://github.com/CuyZ/Valinor/releases/tag/1.6.0

## Notable changes

**Symfony Bundle**

A bundle is now available for Symfony applications, it will ease the integration
and usage of the Valinor library in the framework. The documentation can be
found in the [CuyZ/Valinor-Bundle] repository.

Note that [the documentation has been updated] to add information about the bundle
as well as tips on how to integrate the library in other frameworks.

[the documentation has been updated]: https://valinor.cuyz.io/1.6/other/app-and-framework-integration/
[CuyZ/Valinor-Bundle]: https://github.com/CuyZ/Valinor-Bundle/#readme

**PHP 8.3 support**

Thanks to [@TimWolla], the library now supports PHP 8.3, which entered its beta
phase. Do not hesitate to test the library with this new version, and [report any
encountered issue on the repository].

**Better type parsing**

The first layer of the type parser has been completely rewritten. The previous
one would use regex to split a raw type in tokens, but that led to limitations —
mostly concerning quoted strings — that are now fixed.

Although this change should not impact the end user, it is a major change in the
library, and it is possible that some edge cases were not covered by tests. If
that happens, please [report any encountered issue on the repository].

Example of previous limitations, now solved:

```php
// Union of strings containing space chars
(new MapperBuilder())
->mapper()
->map(
"'foo bar'|'baz fiz'",
'baz fiz'
);

// Shaped array with special chars in the key
(new MapperBuilder())
->mapper()
->map(
"array{'some & key': string}",
['some & key' => 'value']
);
```

**More advanced array-key handling**

It is now possible to use any string or integer as an array key. The following
types are now accepted and will work properly with the mapper:

```php
$mapper->map("array<'foo'|'bar', string>", ['foo' => 'foo']);

$mapper->map('array<42|1337, string>', [42 => 'foo']);

$mapper->map('array<positive-int, string>', [42 => 'foo']);

$mapper->map('array<negative-int, string>', [-42 => 'foo']);

$mapper->map('array<int<-42, 1337>, string>', [42 => 'foo']);

$mapper->map('array<non-empty-string, string>', ['foo' => 'foo']);

$mapper->map('array<class-string, string>', ['SomeClass' => 'foo']);
```

## Features

* Add support for PHP 8.3 ([5c44f8](https://github.com/CuyZ/Valinor/commit/5c44f83d61def60d13ad7b582d76b2febc63e432))
* Allow any string or integer in array key ([12af3e](https://github.com/CuyZ/Valinor/commit/12af3ed1d396b1dbf81b11a7ad5a0e205b47e74a))
* Support microseconds in the Atom / RFC 3339 / ISO 8601 format ([c25721](https://github.com/CuyZ/Valinor/commit/c25721f838de1e9bf97e5d2c0b301ed2e62429a4))

## Bug Fixes

* Correctly handle type inferring for method coming from interface ([2657f8](https://github.com/CuyZ/Valinor/commit/2657f8bd8836c658753a29737f08b91e145b67b8))
* Detect missing closing bracket after comma in shaped array type ([2aa4b6](https://github.com/CuyZ/Valinor/commit/2aa4b6f0147e31b99b64c59d5d529d4b2230779b))
* Handle class name collision while parsing types inside a class ([044072](https://github.com/CuyZ/Valinor/commit/044072e2cbdd6b12a2b820f3805963a9f8f22860))
* Handle invalid Intl formats with `intl.use_exceptions=1` ([29da9a](https://github.com/CuyZ/Valinor/commit/29da9acd97db6f43bfc7db79b83755cca16734bd))
* Improve cache warmup by creating required directories ([a3341a](https://github.com/CuyZ/Valinor/commit/a3341ab3d7b8b231059037558dbd7f87f420160c))
* Load attributes lazily during runtime and cache access ([3e7c63](https://github.com/CuyZ/Valinor/commit/3e7c632b78bbf031e49b1ba03a8af24856611a82))
* Properly handle class/enum name in shaped array key ([1964d4](https://github.com/CuyZ/Valinor/commit/1964d4158e1a196a33e1c430728ffd27c1a2d728))

## Other

* Improve attributes arguments compilation ([c4acb1](https://github.com/CuyZ/Valinor/commit/c4acb17b4a21744bdc4260715efec56528d5ca83))
* Replace regex-based type parser with character-based one ([ae8303](https://github.com/CuyZ/Valinor/commit/ae830327b2eca87bc171ac4d44c62fde49daa477))
* Simplify symbol parsing algorithm ([f260cf](https://github.com/CuyZ/Valinor/commit/f260cfb0b1b6e84542a250a8f2f10533afdc021e))
* Update Rector dependency ([669ff9](https://github.com/CuyZ/Valinor/commit/669ff992bd5544bb036646248643325d70e87a1d))

[report any encountered issue on the repository]: https://github.com/CuyZ/Valinor/issues/
[@TimWolla]: https://github.com/TimWolla

0 comments on commit f3f3429

Please sign in to comment.