Comments (3)
That would be great.
My idea is not write unit tests for this package. But write acceptation tests instead.
Write specific code on a Laravel package and check if those errors are detected by Larastan. I am open for suggestions.
from larastan.
Ignoring one error brings up two others in vanilla Laravel: composer create-project --quiet --prefer-dist "laravel/laravel" laravel
$ php artisan code:analyse --level=max
19/19 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ --------------------------------------------------------------------------------------------
Line app/Exceptions/Handler.php
------ --------------------------------------------------------------------------------------------
49 Method App\Exceptions\Handler::render() should return Illuminate\Http\Response but returns
Symfony\Component\HttpFoundation\Response.
------ --------------------------------------------------------------------------------------------
[ERROR] Found 1 error
and with
parameters:
ignoreErrors:
- '|^Method App\\Exceptions\\Handler::render\(\) should return Illuminate\\Http\\Response but returns Symfony\\Component\\HttpFoundation\\Response\.$|'
$ php artisan code:analyse --level=max -c /home/viktor/tmp/phpstan-laravel/laravel/phpstan.neon
19/19 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ --------------------------------------------------------
Line app/Http/Controllers/Auth/RegisterController.php
------ --------------------------------------------------------
66 Call to an undefined static method App\User::create().
------ --------------------------------------------------------
------ ------------------------------------------------------------------------------------
Line app/Providers/BroadcastServiceProvider.php
------ ------------------------------------------------------------------------------------
17 Call to an undefined static method Illuminate\Support\Facades\Broadcast::routes().
------ ------------------------------------------------------------------------------------
[ERROR] Found 2 errors
@nunomaduro Please advise.
Correcting the first error gives: "[OK] No errors" but not with phpstan configuration.
All this could be related to specifying phpstan configuration.
from larastan.
BTW the above error's (Handler::render()
) fix got a big 👎
See laravel/framework#23825
from larastan.
Related Issues (20)
- Variables created by `extract` are not recognized HOT 3
- Non-Standard Laravel Location Support? HOT 3
- More frequent release cadence? HOT 4
- vendor/nunomaduro/larastan/bootstrap.php: Class "Redis" not found HOT 1
- README file links to CHANGELOG.md, but it no longer exists. HOT 1
- Internal error: Dynamic model properties with underscores cannot be used HOT 6
- Enumerable template is not used for search method
- How in larastan on laravel make checks for return type of control ? HOT 1
- How to fix phpstan error with models defined in interface ? HOT 1
- Support Livewire? HOT 1
- Error in second step of documentation? HOT 1
- Unable to find Builder Mixin method on Relation HOT 1
- Can I hide Cannot access property error when refering dynamic model field ? HOT 6
- support for subquery ordering
- Two dozen PR-s were closed by deleting the master branch HOT 4
- Internal error when a model has a legacy factory via legacy factories package and a regular factory
- Getting error "Class self was not found while trying to analyse it" HOT 1
- Eloquent Collection `groupBy` has incorrect return type when grouping by multiple fields
- Model::where()->firstOrFail() has unspecific return type HOT 4
- When I tried to build the environment according to the Contribute Guide, an error was output at the point where the test was executed. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from larastan.