github CuyZ/Valinor 0.8.0

latest releases: 1.14.1, 1.14.0, 1.13.0...
2 years ago

Notable changes

Float values handling

Allows the usage of float values, as follows:

class Foo
{
    /** @var 404.42|1337.42 */
    public readonly float $value;
}

Literal boolean true / false values handling

Thanks @danog for this feature!

Allows the usage of boolean values, as follows:

class Foo
{
    /** @var int|false */
    public readonly int|bool $value;
}

Class string of union of object handling

Allows to declare several class names in a class-string:

class Foo
{
    /** @var class-string<SomeClass|SomeOtherClass> */
    public readonly string $className;
}

Allow psalm and phpstan prefix in docblocks

Thanks @boesing for this feature!

The following annotations are now properly handled: @psalm-param, @phpstan-param, @psalm-return and @phpstan-return.

If one of those is found along with a basic @param or @return annotation, it will take precedence over the basic value.

Full list of changes

Features

  • Allow psalm and phpstan prefix in docblocks (64e0a2)
  • Handle class string of union of object (b7923b)
  • Handle filename in function definition (0b042b)
  • Handle float value type (790df8)
  • Handle literal boolean true / false types (afcedf)
  • Introduce composite types (892f38)

Bug Fixes

  • Call value altering function only if value is accepted (2f08e1)
  • Handle function definition cache invalidation when file is modified (511a0d)

Other

  • Add configuration for Composer allowed plugins (2f310c)
  • Add Psalm configuration file to .gitattributes (979272)
  • Bump dev-dependencies (844384)
  • Declare code type in docblocks (03c84a)
  • Ignore Polyfill coverage (c08fe5)
  • Remove symfony/polyfill-php80 dependency (368737)

Don't miss a new Valinor release

NewReleases is sending notifications on new releases.