Skip to content

v0.9.0 - PHP 8.1 features

Compare
Choose a tag to compare
@krzysztofrewak krzysztofrewak released this 04 Jan 07:23
· 45 commits to main since this release
c1e06d9

Codestyle will understand PHP 8.1 features in right way.

Before:

<?php

class ReadonlyThing
{
    protected readonly bool $true;

    public function __construct(protected readonly string $string)
    {
    }

    protected function test(array & $param): void
    {
    }
}

After:

<?php

declare(strict_types=1);

class ReadonlyThing
{
    protected readonly bool $true;

    public function __construct(
        protected readonly string $string,
    ) {
    }

    protected function test(array &$param): void
    {
    }
}