calebdw / larastan
Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel
Fund package maintenance!
calebdw
Installs: 9 164
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 421
Open Issues: 1
Type:phpstan-extension
Requires
- php: ^8.0.2
- ext-json: *
- illuminate/console: ^9.52.16 || ^10.28.0 || ^11.16.0
- illuminate/container: ^9.52.16 || ^10.28.0 || ^11.16.0
- illuminate/contracts: ^9.52.16 || ^10.28.0 || ^11.16.0
- illuminate/database: ^9.52.16 || ^10.28.0 || ^11.16.0
- illuminate/http: ^9.52.16 || ^10.28.0 || ^11.16.0
- illuminate/pipeline: ^9.52.16 || ^10.28.0 || ^11.16.0
- illuminate/support: ^9.52.16 || ^10.28.0 || ^11.16.0
- phpmyadmin/sql-parser: ^5.9.0
- phpstan/phpstan: ^1.12.2
Requires (Dev)
- doctrine/coding-standard: ^12.0
- nikic/php-parser: ^4.19.1
- orchestra/canvas: ^7.11.1 || ^8.11.0 || ^9.0.2
- orchestra/testbench: ^7.33.0 || ^8.13.0 || ^9.0.3
- phpunit/phpunit: ^9.6.13 || ^10.5.16
Suggests
- orchestra/testbench: Using Larastan for analysing a package needs Testbench
- 2.x-dev
- v2.10.11
- v2.10.10
- v2.10.9
- v2.10.8
- v2.10.7
- v2.10.6
- v2.10.5
- v2.10.4
- v2.10.3
- v2.10.2
- v2.10.1
- v2.10.0
- dev-fix_relation_forwarding
- dev-dynamic_relation_closures
- dev-collection_intersection
- dev-docs_builder_factory_col
- dev-wildcards
- dev-config
- dev-multiple_connections
- dev-default_date_casts
- dev-relation_generics
- dev-blade
- dev-attribute_generics
- dev-custom_collection
- dev-with_default
This package is auto-updated.
Last update: 2024-11-18 12:36:03 UTC
README
⚗️ About This Fork
Hello! 👋
This is my fork of larastan/larastan, which includes additional features and improvements that have been proposed but are not yet available in the upstream package. This fork is intended to provide the community with immediate access to these enhancements while maintaining compatibility with the upstream package.
For Laravel Livewire support, check out larastan-livewire!
🔄 Changes and Upstream PRs
This fork includes the following changes and enhancements:
- feat: update relation generics (support Laravel >= 11.15)
- feat: support dynamic relation closures
- feat: support newFactory method when resolving factory
- feat: add support for config array shapes
- feat: support multiple database connections
- feat: support wildcards in migration/schema paths
- fix: default date casting
- fix: handle model property aliases
- fix: make TGet covariant on Attribute stub
- fix: properly handle static called on type for query
- fix: check if class exists before calling reflectionProvider getClass
- fix: relation class forwarding
✨ Getting Started
To use this fork, you may use Composer to install it as a development dependency into your Laravel project:
composer require --dev "calebdw/larastan:^2.0"
Or if you already have the upstream package installed, you can point your composer.json
to this fork:
- "larastan/larastan": "^2.0" + "calebdw/larastan": "^2.0"
If you have the PHPStan extension installer installed then nothing more is needed, otherwise you will need to manually include the extension in the phpstan.neon(.dist)
configuration file:
includes: - ./vendor/calebdw/larastan/extension.neon
For more information on how to configure and use Larastan, please refer to the official documentation.
👊🏻 Contributing
Thank you for considering contributing to Larastan. All the contribution guidelines are mentioned here.
📄 License
This fork is open-sourced software licensed under the MIT license.