Weebly / phpstan-laravel

Laravel plugins for PHPStan
BSD 2-Clause "Simplified" License
51 stars 22 forks source link

Being error-free with vanilla Laravel #10

Open szepeviktor opened 6 years ago

szepeviktor commented 6 years ago

Hello!

Are there plans to get an error-free analysis of vanilla Laravel (5.5/5.6)?

szepeviktor commented 6 years ago

Currently with Laravel 5.5: vendor/bin/phpstan analyse --configuration=./phpstan.neon --level=7 -- app/

 ------ -----------------------------------------------------------------------------------------------------------
  Line   app/Providers/RouteServiceProvider.php
 ------ -----------------------------------------------------------------------------------------------------------
  54     Method Illuminate\Support\Facades\Route::group() invoked with 1 parameter, 2 required.
  54     Parameter #1 $attributes of method Illuminate\Support\Facades\Route::group() expects array, string given.
  68     Method Illuminate\Support\Facades\Route::group() invoked with 1 parameter, 2 required.
  68     Parameter #1 $attributes of method Illuminate\Support\Facades\Route::group() expects array, string given.
 ------ -----------------------------------------------------------------------------------------------------------

 ------ --------------------------------------------------------------------------------------------------
  Line   app/Http/Controllers/Auth/RegisterController.php
 ------ --------------------------------------------------------------------------------------------------
  65     Method App\Http\Controllers\Auth\RegisterController::create() should return App\User but returns
         App\User|Illuminate\Database\Eloquent\Model.
 ------ --------------------------------------------------------------------------------------------------
szepeviktor commented 6 years ago

Not being a Laravel expert I think Eloquent Query Scopes are not supported. (mainly Dynamic ones)

szepeviktor commented 6 years ago

@Ascendens How do you see it?

3onyc commented 6 years ago

Should we just create individual issues per warning that can then be associated with the milestone?