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

PHPStan: Use bleeding edge #17

Merged
merged 1 commit into from
Feb 9, 2024
Merged

PHPStan: Use bleeding edge #17

merged 1 commit into from
Feb 9, 2024

Conversation

philbates35
Copy link
Owner

See:

Fix the following three new highlighted issues at the same time:

[philbates@fedora laravel-starter]$ docker-compose exec php composer run phpstan -- --memory-limit=512M
> phpstan --ansi '--memory-limit=512M'
Note: Using configuration file /app/phpstan.neon.dist.
 50/50 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   app/Models/User.php
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  35     PHPDoc type array<int, string> of property App\Models\User::$hidden is not the same as PHPDoc type list<string> of overridden property Illuminate\Database\Eloquent\Model::$hidden.
         💡 You can fix 3rd party PHPDoc types with stub files:
         💡 https://phpstan.org/user-guide/stub-files

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 ------ -------------------------------------------------------------------------------------------
  Line   app/Providers/RouteServiceProvider.php
 ------ -------------------------------------------------------------------------------------------
  33     Using nullsafe property access "?->id" on left side of ?? is unnecessary. Use -> instead.
 ------ -------------------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------------------------------------
  Line   bootstrap/app.php
 ------ -----------------------------------------------------------------------------------------------------------------
  17     Parameter #1 $basePath of class Illuminate\Foundation\Application constructor expects string|null, mixed given.
 ------ -----------------------------------------------------------------------------------------------------------------

See:
* https://phpstan.org/blog/what-is-bleeding-edge
* https://backendtea.com/post/use-phpstan-bleeding-edge/

Fix the following three new highlighted issues at the same time:

[philbates@fedora laravel-starter]$ docker-compose exec php composer run phpstan -- --memory-limit=512M
> phpstan --ansi '--memory-limit=512M'
Note: Using configuration file /app/phpstan.neon.dist.
 50/50 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   app/Models/User.php
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  35     PHPDoc type array<int, string> of property App\Models\User::$hidden is not the same as PHPDoc type list<string> of overridden property Illuminate\Database\Eloquent\Model::$hidden.
         💡 You can fix 3rd party PHPDoc types with stub files:
         💡 https://phpstan.org/user-guide/stub-files

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 ------ -------------------------------------------------------------------------------------------
  Line   app/Providers/RouteServiceProvider.php
 ------ -------------------------------------------------------------------------------------------
  33     Using nullsafe property access "?->id" on left side of ?? is unnecessary. Use -> instead.
 ------ -------------------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------------------------------------
  Line   bootstrap/app.php
 ------ -----------------------------------------------------------------------------------------------------------------
  17     Parameter #1 $basePath of class Illuminate\Foundation\Application constructor expects string|null, mixed given.
 ------ -----------------------------------------------------------------------------------------------------------------
@philbates35 philbates35 merged commit 1b89446 into main Feb 9, 2024
11 checks passed
@philbates35 philbates35 deleted the phpstan-bleeding-edge branch February 9, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant