Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to PHPStan 2 #107

Merged
merged 3 commits into from
Nov 17, 2024
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![CI](https://github.com/staudenmeir/belongs-to-through/actions/workflows/ci.yml/badge.svg)](https://github.com/staudenmeir/belongs-to-through/actions/workflows/ci.yml?query=branch%3Amain)
[![Code Coverage](https://codecov.io/gh/staudenmeir/belongs-to-through/graph/badge.svg?token=Z4KscVFWIE)](https://codecov.io/gh/staudenmeir/belongs-to-through)
[![PHPStan](https://img.shields.io/badge/PHPStan-level%209-brightgreen.svg?style=flat)](https://github.com/staudenmeir/belongs-to-through/actions/workflows/static-analysis.yml?query=branch%3Amain)
[![PHPStan](https://img.shields.io/badge/PHPStan-level%2010-brightgreen.svg?style=flat)](https://github.com/staudenmeir/belongs-to-through/actions/workflows/static-analysis.yml?query=branch%3Amain)
[![Latest Stable Version](https://poser.pugx.org/staudenmeir/belongs-to-through/v/stable)](https://packagist.org/packages/staudenmeir/belongs-to-through)
[![Total Downloads](https://poser.pugx.org/staudenmeir/belongs-to-through/downloads)](https://packagist.org/packages/staudenmeir/belongs-to-through/stats)
[![License](https://poser.pugx.org/staudenmeir/belongs-to-through/license)](https://github.com/staudenmeir/belongs-to-through/blob/main/LICENSE)
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^3.0",
"larastan/larastan": "^2.9",
"orchestra/testbench": "^9.0",
"laravel/framework": "^11.0",
"larastan/larastan": "^3.0",
"mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^9.5",
"phpunit/phpunit": "^11.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
level: 9
level: 10
paths:
- src
2 changes: 1 addition & 1 deletion phpstan.types.neon.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
includes:
- ./vendor/larastan/larastan/extension.neon
parameters:
level: 9
level: 10
paths:
- types
1 change: 1 addition & 0 deletions src/Relations/BelongsToThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ protected function performJoins(?Builder $query = null)
$query->join($model->getTable(), $first, '=', $second);

if ($this->hasSoftDeletes($model)) {
/** @var string $column */
/** @phpstan-ignore method.notFound */
$column = $model->getQualifiedDeletedAtColumn();

Expand Down
3 changes: 3 additions & 0 deletions src/Traits/BelongsToThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use Illuminate\Database\Eloquent\Model;
use Znck\Eloquent\Relations\BelongsToThrough as Relation;

/**
* @phpstan-ignore trait.unused
*/
trait BelongsToThrough
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Traits/HasTableAlias.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Znck\Eloquent\Traits;

/**
* @phpstan-ignore trait.unused
*/
trait HasTableAlias
{
/** @inheritDoc */
Expand Down