mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
5fe3cfd837
* feat(phpstan): pick up extended model relations typings * feat(phpstan): pick up extended model date attributes * feat(core): introduce `castAttribute` extender Stops using `dates` as it's deprecated in laravel 8 * feat(phpstan): pick up extended model attributes through casts * fix: extenders not resolved when declared namespace * fix(phpstan): new model attributes are always nullable * chore(phpstan): add helpful cache clearing command * Apply fixes from StyleCI * chore: improve extend files provider logic * chore: rename `castAttribute` to just `cast` * chore: update phpstan package to detect `cast` method * Update framework/core/src/Extend/Model.php Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
includes:
|
|
- larastan-extension.neon
|
|
- phpstan-baseline.neon
|
|
|
|
parameters:
|
|
stubFiles:
|
|
- stubs/Illuminate/Contracts/Container/Container.stub
|
|
- stubs/Illuminate/Queue/ListenerOptions.stub
|
|
- stubs/Illuminate/Support/ServiceProvider.stub
|
|
- stubs/Illuminate/Filesystem/Filesystem.stub
|
|
- stubs/Illuminate/Filesystem/FilesystemManager.stub
|
|
|
|
# We're changing the disk return type from Filesystem to Cloud,
|
|
# rather than hacking every bit of the codebase with a phpdoc @var.
|
|
- stubs/Illuminate/Contracts/Filesystem/Factory.stub
|
|
- stubs/Illuminate/Contracts/Filesystem/Cloud.stub
|
|
- stubs/Illuminate/Contracts/Filesystem/Filesystem.stub
|
|
|
|
services:
|
|
-
|
|
class: Flarum\PHPStan\Relations\ModelRelationsExtension
|
|
tags:
|
|
- phpstan.broker.methodsClassReflectionExtension
|
|
- phpstan.broker.propertiesClassReflectionExtension
|
|
-
|
|
class: Flarum\PHPStan\Attributes\ModelDateAttributesExtension
|
|
tags:
|
|
- phpstan.broker.propertiesClassReflectionExtension
|
|
-
|
|
class: Flarum\PHPStan\Attributes\ModelCastAttributeExtension
|
|
tags:
|
|
- phpstan.broker.propertiesClassReflectionExtension
|
|
-
|
|
class: Flarum\PHPStan\Extender\FilesProvider
|
|
arguments:
|
|
- %paths%
|
|
-
|
|
class: Flarum\PHPStan\Extender\Resolver
|
|
arguments:
|
|
- @Flarum\PHPStan\Extender\FilesProvider
|
|
- @defaultAnalysisParser
|