Commit Graph

19 Commits

Author SHA1 Message Date
Romain Canon
86802daced qa: run Infection only on modified files 2022-09-26 22:31:04 +02:00
Romain Canon
e686c07f39 qa: set xdebug mode to off when running QA checks 2022-09-26 22:31:04 +02:00
Nathan Boiron
56ff6849bc
doc: introduce mkdocs as a static documentation generator 2022-06-10 17:32:07 +02:00
Abdul Malik Ikhsan
5a50baed86
qa: include and use Rector 2022-05-21 16:37:16 +02:00
Romain Canon
5f9d41cf35 test: require and make use of vfsStream library 2022-05-08 16:48:15 +02:00
Romain Canon
2f310cf5ab misc: add configuration for Composer allowed plugins 2022-05-04 19:45:34 +02:00
Romain Canon
ee0d1fed6b qa: run Psalm when using composer check 2022-05-04 19:45:34 +02:00
Romain Canon
3687379217 misc: remove symfony/polyfill-php80 dependency 2022-04-09 17:44:32 +02:00
Romain Canon
6fdd62dfc2 fix: change license in composer.json 2022-02-21 17:05:28 +01:00
Romain Canon
c1a884fadd qa: require and include phpstan/phpstan-phpunit rules 2022-02-19 19:58:28 +01:00
Marco Pivetta
822865876d chore: downgrade dependencies to a dependency set that works on 7.4 too
Used for locked tests.
2022-01-13 19:55:20 +01:00
Romain Canon
1e0084c6cd test: upgrade Infection to 0.26
This new version grants a new `--git-diff-lines` options, as well as a
new badge/report system.
2022-01-11 19:19:51 +01:00
Romain Canon
b2e810e3ce feat!: allow mapping to any type
Previously, the method `TreeMapper::map` would allow mapping only to an
object. It is now possible to map to any type handled by the library.

It is for instance possible to map to an array of objects:

```php
$objects = (new \CuyZ\Valinor\MapperBuilder())->mapper()->map(
    'array<' . SomeClass::class . '>',
    [/* … */]
);
```

For simple use-cases, an array shape can be used:

```php
$array = (new \CuyZ\Valinor\MapperBuilder())->mapper()->map(
    'array{foo: string, bar: int}',
    [/* … */]
);

echo strtolower($array['foo']);
echo $array['bar'] * 2;
```

This new feature changes the possible behaviour of the mapper, meaning
static analysis tools need help to understand the types correctly. An
extension for PHPStan and a plugin for Psalm are now provided and can be
included in a project to automatically increase the type coverage.
2022-01-02 00:48:01 +01:00
Romain Canon
0144bf084a misc: raise PHPStan version
This enables full PHP 8.1 support 🎉
2021-12-31 13:30:14 +01:00
Romain Canon
e5ccbe201b misc: raise version of friendsofphp/php-cs-fixer
Grants PHP 8.1 support.
2021-12-15 13:19:24 +01:00
Romain Canon
0b507c9b33 misc: change Composer scripts calls 2021-12-15 13:19:24 +01:00
Romain Canon
ce3dfb0ced misc: use marcocesarato/php-conventional-changelog for changelog 2021-12-07 18:59:46 +01:00
Romain Canon
1f754a7e77 misc: use composer runtime API 2021-11-29 12:36:00 +01:00
Romain Canon
396f64a524 feat: initial release
🎉
2021-11-28 18:21:56 +01:00