Skip to content

Conversation

@martinstefanov
Copy link

Starting from branch: feature/laravel-57-for-phpstan10.1
I got type errors in the phpstan-laravel it self.

The fixes are:
Fix type error for facades because of wrong implementation.

Type error: Argument 3 passed to class@anonymous::create() must implement interface PHPStan\Reflection\Php\BuiltinMethodReflection, instance of Weebly\PHPStan\Laravel\ReflectionMethodAlwaysStatic given, called in laravel5.5\vendor\weebly\phpstan-laravel\src\MethodReflectionFactory.php on line 94

Caused by: Mail::send(...);

Fix type error for static create of model.

Type error: Argument 3 passed to class@anonymous::create() must implement interface PHPStan\Reflection\Php\BuiltinMethodReflection, instance of ReflectionMethod given, called in laravel5.5\vendor\weebly\phpstan-laravel\src\MethodReflectionFactory.php on line 94

Caused by: Model::firstOrNew([...]);
or: Illuminate\Database\Query\Builder::firstOrNew([...]);

Now all the Tests passed correct. I hope this will help your PR to be completed and accepted.

@j6s
Copy link
Owner

j6s commented Nov 22, 2018

Oh, okay.

This branch was only opened as an experiment - I did not expect to use this seriously.
This is not the correct branch to open a PR to.

This branch is basically only a combination of the following two PRs on the main phpstan-laravel repository. Please contribute to the upstream repository. Thanks.

@j6s j6s closed this Nov 22, 2018
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.

2 participants