-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow any string or integer in array key
The following array key 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']); ```
- Loading branch information
Showing
10 changed files
with
267 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.