Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 0 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
<php>
<server name="DB_CONNECTION" value="testing"/>
</php>
<coverage>
<report>
<html outputDirectory="phpunit/coverage"/>
<text outputFile="phpunit/coverage.txt"/>
</report>
</coverage>
<logging>
<junit outputFile="phpunit/test-result.xml"/>
</logging>
Expand Down
14 changes: 6 additions & 8 deletions tests/FeatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
Expand Down
10 changes: 4 additions & 6 deletions tests/Rules/CarbonCopyRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
10 changes: 4 additions & 6 deletions tests/Rules/NoAliasUseRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
10 changes: 4 additions & 6 deletions tests/Rules/NoMutableDateTimeStaticCallRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
10 changes: 4 additions & 6 deletions tests/Rules/NoMutableDateTimeUseRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
10 changes: 4 additions & 6 deletions tests/Rules/NoNewMutableDateTimeRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
5 changes: 2 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down