Fix PHP 8.5 issues, drop PHP 8.1 support#2996
Fix PHP 8.5 issues, drop PHP 8.1 support#2996przepompownia wants to merge 1 commit intophpactor:masterfrom
Conversation
|
<?php
class Book
{
public function __construct(
public private(set) string $title,
public protected(set) string $author,
protected private(get) int $pubYear,
public string $bar,
) {}
public function methodThatNowWontParse(): void
{}
}
$book = new Book();
wrAssertType('string',$book->bar);@dantleech probably I need your help here - feel free to modify this PR if you want. I'm not sure if it can reveal some bug, maybe worth a separate fix. I didn't analyze two other remaining deprecations yet. |
894b70d to
2df0f42
Compare
125dfca to
395076b
Compare
9cc0792 to
bf23869
Compare
|
I'm OK with bumping to 8.2
I'm not sure what the issue is - that's a test file? but the tests are passing. It seems the only issue is PHPStan? |
bf23869 to
7294eda
Compare
|
Problem: some phpunit tests fail on PHP 8.5 Solution: - upgrade Psalm version (implies dropped support for PHP 8.1) - upgrade Monolog (avoid: deprecation on the one side, dependency conflicts on the other side) - increase test Psalm process timeout to 15 s - fix new deprecations - add 8.5 to CI matrix, bump minimal version to 8.2
7294eda to
5cace4e
Compare
|
Perhaps enumerated values (here for Monolog logging levels) would avoid silencing phpstan reports, but I'm not sure it's worth changing now. |
Problem: some phpunit tests fail on PHP 8.5
Solution: