diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index b0cde6a..b65a6a9 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.4'
+ php-version: '8.5'
coverage: none
- name: Install composer dependencies
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 627de27..f68ccb0 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -13,7 +13,7 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
- php: [ 8.3, 8.4 ]
+ php: [ 8.3, 8.4, 8.5 ]
laravel: [ ^11.0, ^12.0 ]
stability: [ prefer-lowest, prefer-stable ]
include:
@@ -25,6 +25,9 @@ jobs:
- php: 8.4
laravel: ^11.0
stability: prefer-lowest
+ - php: 8.5
+ laravel: ^11.0
+ stability: prefer-lowest
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a35e0fd..f96098c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,15 @@
All notable changes to `phpstan-extension` will be documented in this file.
+## 2.2.0 - 2026-03-02
+
+### What's Changed
+
+* Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in https://github.com/Soyhuce/phpstan-extension/pull/27
+* Run tests with Laravel 12 by @bastien-phi in https://github.com/Soyhuce/phpstan-extension/pull/28
+
+**Full Changelog**: https://github.com/Soyhuce/phpstan-extension/compare/2.0.1...2.1.0
+
## 2.1.0 - 2025-02-24
### What's Changed
diff --git a/composer.json b/composer.json
index 27f0548..737abe8 100644
--- a/composer.json
+++ b/composer.json
@@ -26,8 +26,8 @@
"larastan/larastan": "^3.0",
"nunomaduro/collision": "^8.0",
"orchestra/testbench": "^9.0|^10.0",
- "pestphp/pest": "^3.0",
- "pestphp/pest-plugin-laravel": "^3.0",
+ "pestphp/pest": "^3.0|^4.0",
+ "pestphp/pest-plugin-laravel": "^3.0|^4.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0"
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 5879af5..ef6cfcd 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -12,12 +12,6 @@
-
-
-
-
-
-
diff --git a/tests/FeatureTest.php b/tests/FeatureTest.php
index 3246b82..4938712 100644
--- a/tests/FeatureTest.php
+++ b/tests/FeatureTest.php
@@ -3,13 +3,14 @@
namespace Soyhuce\PhpstanExtension\Tests;
use Orchestra\Testbench\TestCase as Orchestra;
+use PHPUnit\Framework\Attributes\CoversNothing;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Test;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
use function dirname;
-/**
- * @coversNothing
- */
+#[CoversNothing]
class FeatureTest extends Orchestra
{
use ExecutesLarastan;
@@ -35,11 +36,8 @@ public static function getFeatures(): array
return $calls;
}
- /**
- * @dataProvider getFeatures
- *
- * @test
- */
+ #[Test]
+ #[DataProvider('getFeatures')]
public function features(string $file): void
{
$configFile = dirname($file) . '/phpstan-tests.neon';
diff --git a/tests/Rules/CarbonCopyRuleTest.php b/tests/Rules/CarbonCopyRuleTest.php
index 8066f03..b5161e1 100644
--- a/tests/Rules/CarbonCopyRuleTest.php
+++ b/tests/Rules/CarbonCopyRuleTest.php
@@ -2,16 +2,14 @@
namespace Soyhuce\PhpstanExtension\Tests\Rules;
+use PHPUnit\Framework\Attributes\CoversNothing;
+use PHPUnit\Framework\Attributes\Test;
use Soyhuce\PhpstanExtension\Tests\RulesTest;
-/**
- * @coversNothing
- */
+#[CoversNothing]
class CarbonCopyRuleTest extends RulesTest
{
- /**
- * @test
- */
+ #[Test]
public function carbonCopyCannotBeUsed(): void
{
$errors = $this->findErrorsByLine(__DIR__ . '/../Fixtures/CarbonCopy.php');
diff --git a/tests/Rules/NoAliasUseRuleTest.php b/tests/Rules/NoAliasUseRuleTest.php
index 83aa346..d6ac9a8 100644
--- a/tests/Rules/NoAliasUseRuleTest.php
+++ b/tests/Rules/NoAliasUseRuleTest.php
@@ -2,16 +2,14 @@
namespace Soyhuce\PhpstanExtension\Tests\Rules;
+use PHPUnit\Framework\Attributes\CoversNothing;
+use PHPUnit\Framework\Attributes\Test;
use Soyhuce\PhpstanExtension\Tests\RulesTest;
-/**
- * @coversNothing
- */
+#[CoversNothing]
class NoAliasUseRuleTest extends RulesTest
{
- /**
- * @test
- */
+ #[Test]
public function carbonCopyCannotBeUsed(): void
{
$errors = $this->findErrorsByLine(__DIR__ . '/../Fixtures/NoAliasUse.php');
diff --git a/tests/Rules/NoMutableDateTimeStaticCallRuleTest.php b/tests/Rules/NoMutableDateTimeStaticCallRuleTest.php
index 8117ed7..b0d887a 100644
--- a/tests/Rules/NoMutableDateTimeStaticCallRuleTest.php
+++ b/tests/Rules/NoMutableDateTimeStaticCallRuleTest.php
@@ -2,16 +2,14 @@
namespace Soyhuce\PhpstanExtension\Tests\Rules;
+use PHPUnit\Framework\Attributes\CoversNothing;
+use PHPUnit\Framework\Attributes\Test;
use Soyhuce\PhpstanExtension\Tests\RulesTest;
-/**
- * @coversNothing
- */
+#[CoversNothing]
class NoMutableDateTimeStaticCallRuleTest extends RulesTest
{
- /**
- * @test
- */
+ #[Test]
public function dateTimeStaticCallCannotBeUsed(): void
{
$errors = $this->findErrorsByLine(__DIR__ . '/../Fixtures/NoMutableDateTimeStaticCall.php');
diff --git a/tests/Rules/NoMutableDateTimeUseRuleTest.php b/tests/Rules/NoMutableDateTimeUseRuleTest.php
index ae25f5e..8f852f2 100644
--- a/tests/Rules/NoMutableDateTimeUseRuleTest.php
+++ b/tests/Rules/NoMutableDateTimeUseRuleTest.php
@@ -2,16 +2,14 @@
namespace Soyhuce\PhpstanExtension\Tests\Rules;
+use PHPUnit\Framework\Attributes\CoversNothing;
+use PHPUnit\Framework\Attributes\Test;
use Soyhuce\PhpstanExtension\Tests\RulesTest;
-/**
- * @coversNothing
- */
+#[CoversNothing]
class NoMutableDateTimeUseRuleTest extends RulesTest
{
- /**
- * @test
- */
+ #[Test]
public function dateTimeUseCannotBeUsed(): void
{
$errors = $this->findErrorsByLine(__DIR__ . '/../Fixtures/NoMutableDateTimeUse.php');
diff --git a/tests/Rules/NoNewMutableDateTimeRuleTest.php b/tests/Rules/NoNewMutableDateTimeRuleTest.php
index 52774a5..b5178b5 100644
--- a/tests/Rules/NoNewMutableDateTimeRuleTest.php
+++ b/tests/Rules/NoNewMutableDateTimeRuleTest.php
@@ -2,16 +2,14 @@
namespace Soyhuce\PhpstanExtension\Tests\Rules;
+use PHPUnit\Framework\Attributes\CoversNothing;
+use PHPUnit\Framework\Attributes\Test;
use Soyhuce\PhpstanExtension\Tests\RulesTest;
-/**
- * @coversNothing
- */
+#[CoversNothing]
class NoNewMutableDateTimeRuleTest extends RulesTest
{
- /**
- * @test
- */
+ #[Test]
public function dateTimeStaticCallCannotBeUsed(): void
{
$errors = $this->findErrorsByLine(__DIR__ . '/../Fixtures/NoNewMutableDateTime.php');
diff --git a/tests/TestCase.php b/tests/TestCase.php
index cc52f6c..2ca24ff 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -4,10 +4,9 @@
use Illuminate\Foundation\Testing\Concerns\InteractsWithDeprecationHandling;
use Orchestra\Testbench\TestCase as Orchestra;
+use PHPUnit\Framework\Attributes\CoversNothing;
-/**
- * @coversNothing
- */
+#[CoversNothing]
class TestCase extends Orchestra
{
use InteractsWithDeprecationHandling;