From 20074845de16587fee9f4c056ec97d655ac34699 Mon Sep 17 00:00:00 2001 From: FreeScout Date: Sat, 23 Sep 2023 23:04:58 -0700 Subject: [PATCH] Remove phpstan --- .github/workflows/analyse-php.yml | 30 -- .github/workflows/lint-php.yml | 4 - larastan-extension.neon | 550 ------------------------------ phpstan.neon | 26 -- 4 files changed, 610 deletions(-) delete mode 100644 .github/workflows/analyse-php.yml delete mode 100644 larastan-extension.neon delete mode 100644 phpstan.neon diff --git a/.github/workflows/analyse-php.yml b/.github/workflows/analyse-php.yml deleted file mode 100644 index 59c4e1ddd..000000000 --- a/.github/workflows/analyse-php.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: PHP Static Analysis - -on: - push: - branches: - - master - - dist - workflow_dispatch: - -jobs: - phpstan: - name: PHP Static Analysis - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: mysql, mbstring, xml, imap, zip, gd, curl, intl, json - - - name: Install composer dependencies - run: composer install --ignore-platform-reqs --no-interaction - - - name: PHPStan Static Analysis - uses: php-actions/phpstan@v3 - with: - memory_limit: 2G - configuration: phpstan.neon \ No newline at end of file diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index a19d0cfb2..de2c81f28 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -1,10 +1,6 @@ name: PHP Code Sniffer on: - push: - branches: - - master - - dist workflow_dispatch: jobs: diff --git a/larastan-extension.neon b/larastan-extension.neon deleted file mode 100644 index 715d60244..000000000 --- a/larastan-extension.neon +++ /dev/null @@ -1,550 +0,0 @@ -parameters: - universalObjectCratesClasses: - - Illuminate\Http\Request - - Illuminate\Support\Optional - earlyTerminatingFunctionCalls: - - abort - - dd - excludePaths: - - *.blade.php - mixinExcludeClasses: - - Eloquent - bootstrapFiles: - - bootstrap.php - checkOctaneCompatibility: false - noModelMake: true - noUnnecessaryCollectionCall: true - noUnnecessaryCollectionCallOnly: [] - noUnnecessaryCollectionCallExcept: [] - squashedMigrationsPath: [] - databaseMigrationsPath: [] - disableMigrationScan: false - disableSchemaScan: false - viewDirectories: [] - checkModelProperties: false - checkPhpDocMissingReturn: false - checkUnusedViews: false - -parametersSchema: - checkOctaneCompatibility: bool() - noModelMake: bool() - noUnnecessaryCollectionCall: bool() - noUnnecessaryCollectionCallOnly: listOf(string()) - noUnnecessaryCollectionCallExcept: listOf(string()) - databaseMigrationsPath: listOf(string()) - disableMigrationScan: bool() - viewDirectories: listOf(string()) - squashedMigrationsPath: listOf(string()) - disableSchemaScan: bool() - checkModelProperties: bool() - checkUnusedViews: bool() - -conditionalTags: - NunoMaduro\Larastan\Rules\NoModelMakeRule: - phpstan.rules.rule: %noModelMake% - NunoMaduro\Larastan\Rules\NoUnnecessaryCollectionCallRule: - phpstan.rules.rule: %noUnnecessaryCollectionCall% - NunoMaduro\Larastan\Rules\OctaneCompatibilityRule: - phpstan.rules.rule: %checkOctaneCompatibility% - NunoMaduro\Larastan\Rules\ModelProperties\ModelPropertyRule: - phpstan.rules.rule: %checkModelProperties% - NunoMaduro\Larastan\Rules\ModelProperties\ModelPropertyStaticCallRule: - phpstan.rules.rule: %checkModelProperties% - NunoMaduro\Larastan\Rules\UnusedViewsRule: - phpstan.rules.rule: %checkUnusedViews% - -services: - - - class: NunoMaduro\Larastan\Methods\RelationForwardsCallsExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - - class: NunoMaduro\Larastan\Methods\ModelForwardsCallsExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - - class: NunoMaduro\Larastan\Methods\EloquentBuilderForwardsCallsExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - - class: NunoMaduro\Larastan\Methods\HigherOrderTapProxyExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - - class: NunoMaduro\Larastan\Methods\HigherOrderCollectionProxyExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - - class: NunoMaduro\Larastan\Methods\StorageMethodsClassReflectionExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - - class: NunoMaduro\Larastan\Methods\Extension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - class: NunoMaduro\Larastan\Methods\ModelFactoryMethodsClassReflectionExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - class: NunoMaduro\Larastan\Methods\RedirectResponseMethodsClassReflectionExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - class: NunoMaduro\Larastan\Methods\MacroMethodsClassReflectionExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - class: NunoMaduro\Larastan\Methods\ViewWithMethodsClassReflectionExtension - tags: - - phpstan.broker.methodsClassReflectionExtension - - - - class: NunoMaduro\Larastan\Properties\ModelAccessorExtension - tags: - - phpstan.broker.propertiesClassReflectionExtension - - - - class: NunoMaduro\Larastan\Properties\ModelPropertyExtension - tags: - - phpstan.broker.propertiesClassReflectionExtension - - - - class: NunoMaduro\Larastan\Properties\HigherOrderCollectionProxyPropertyExtension - tags: - - phpstan.broker.propertiesClassReflectionExtension - - - - class: NunoMaduro\Larastan\Types\RelationDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\Types\ModelRelationsDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\HigherOrderTapProxyExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\ContainerArrayAccessDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - arguments: - className: Illuminate\Contracts\Container\Container - - - class: NunoMaduro\Larastan\ReturnTypes\ContainerArrayAccessDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - arguments: - className: Illuminate\Container\Container - - - class: NunoMaduro\Larastan\ReturnTypes\ContainerArrayAccessDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - arguments: - className: Illuminate\Foundation\Application - - - class: NunoMaduro\Larastan\ReturnTypes\ContainerArrayAccessDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - arguments: - className: Illuminate\Contracts\Foundation\Application - - - - class: NunoMaduro\Larastan\Properties\ModelRelationsExtension - tags: - - phpstan.broker.propertiesClassReflectionExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\ModelFactoryDynamicStaticMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\ModelDynamicStaticMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\AppMakeDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\AuthExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\GuardDynamicStaticMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\AuthManagerExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\DateExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\GuardExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\RequestFileExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\RequestRouteExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\RequestUserExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\EloquentBuilderExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\RelationFindExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\RelationCollectionExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\ModelFindExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\BuilderModelFindExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\TestCaseExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\Support\CollectionHelper - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\AuthExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\CollectExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\NowAndTodayExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\ResponseExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\ValidatorExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\CollectionFilterDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\CollectionWhereNotNullDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\CollectionGenericStaticMethodDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\NewModelQueryDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\FactoryDynamicMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\CollectionGenericStaticMethodDynamicStaticMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\Types\AbortIfFunctionTypeSpecifyingExtension - tags: - - phpstan.typeSpecifier.functionTypeSpecifyingExtension - arguments: - methodName: 'abort' - negate: false - - - - class: NunoMaduro\Larastan\Types\AbortIfFunctionTypeSpecifyingExtension - tags: - - phpstan.typeSpecifier.functionTypeSpecifyingExtension - arguments: - methodName: 'abort' - negate: true - - - - class: NunoMaduro\Larastan\Types\AbortIfFunctionTypeSpecifyingExtension - tags: - - phpstan.typeSpecifier.functionTypeSpecifyingExtension - arguments: - methodName: throw - negate: false - - - - class: NunoMaduro\Larastan\Types\AbortIfFunctionTypeSpecifyingExtension - tags: - - phpstan.typeSpecifier.functionTypeSpecifyingExtension - arguments: - methodName: throw - negate: true - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\AppExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\ValueExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\StrExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\Helpers\TapExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\StorageDynamicStaticMethodReturnTypeExtension - tags: - - phpstan.broker.dynamicStaticMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\Types\GenericEloquentCollectionTypeNodeResolverExtension - tags: - - phpstan.phpDoc.typeNodeResolverExtension - - - - class: NunoMaduro\Larastan\Types\ViewStringTypeNodeResolverExtension - tags: - - phpstan.phpDoc.typeNodeResolverExtension - - - - class: NunoMaduro\Larastan\Rules\OctaneCompatibilityRule - - - - class: NunoMaduro\Larastan\Rules\NoModelMakeRule - - - - class: NunoMaduro\Larastan\Rules\NoUnnecessaryCollectionCallRule - arguments: - onlyMethods: %noUnnecessaryCollectionCallOnly% - excludeMethods: %noUnnecessaryCollectionCallExcept% - - - - class: NunoMaduro\Larastan\Rules\ModelProperties\ModelPropertyRule - - - - class: NunoMaduro\Larastan\Rules\ModelProperties\ModelPropertyStaticCallRule - - - - class: NunoMaduro\Larastan\Types\GenericEloquentBuilderTypeNodeResolverExtension - tags: - - phpstan.phpDoc.typeNodeResolverExtension - - - class: NunoMaduro\Larastan\ReturnTypes\AppEnvironmentReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\Types\ModelProperty\ModelPropertyTypeNodeResolverExtension - tags: - - phpstan.phpDoc.typeNodeResolverExtension - arguments: - active: %checkModelProperties% - - - - class: NunoMaduro\Larastan\Types\RelationParserHelper - arguments: - parser: @currentPhpVersionSimpleDirectParser - - - - class: NunoMaduro\Larastan\Properties\MigrationHelper - arguments: - databaseMigrationPath: %databaseMigrationsPath% - disableMigrationScan: %disableMigrationScan% - parser: @currentPhpVersionSimpleDirectParser - reflectionProvider: @reflectionProvider - - - - class: NunoMaduro\Larastan\Properties\SquashedMigrationHelper - arguments: - schemaPaths: %squashedMigrationsPath% - disableSchemaScan: %disableSchemaScan% - - - - class: NunoMaduro\Larastan\Properties\ModelCastHelper - - - - class: NunoMaduro\Larastan\Rules\ModelProperties\ModelPropertiesRuleHelper - - - - class: NunoMaduro\Larastan\Rules\ModelRuleHelper - - - - class: NunoMaduro\Larastan\Methods\BuilderHelper - arguments: - checkProperties: %checkModelProperties% - - - - class: NunoMaduro\Larastan\Rules\RelationExistenceRule - tags: - - phpstan.rules.rule - - - - class: NunoMaduro\Larastan\Rules\CheckDispatchArgumentTypesCompatibleWithClassConstructorRule - arguments: - dispatchableClass: Illuminate\Foundation\Bus\Dispatchable - tags: - - phpstan.rules.rule - - - class: NunoMaduro\Larastan\Rules\CheckDispatchArgumentTypesCompatibleWithClassConstructorRule - arguments: - dispatchableClass: Illuminate\Foundation\Events\Dispatchable - tags: - - phpstan.rules.rule - - NunoMaduro\Larastan\Properties\Schema\PhpMyAdminDataTypeToPhpTypeConverter - - - - class: NunoMaduro\Larastan\LarastanStubFilesExtension - tags: [phpstan.stubFilesExtension] - - - - class: NunoMaduro\Larastan\Rules\UnusedViewsRule - - - - class: NunoMaduro\Larastan\Collectors\UsedViewFunctionCollector - tags: - - phpstan.collector - - - - class: NunoMaduro\Larastan\Collectors\UsedEmailViewCollector - tags: - - phpstan.collector - - - - class: NunoMaduro\Larastan\Collectors\UsedViewMakeCollector - tags: - - phpstan.collector - - - - class: NunoMaduro\Larastan\Collectors\UsedViewFacadeMakeCollector - tags: - - phpstan.collector - - - - class: NunoMaduro\Larastan\Collectors\UsedRouteFacadeViewCollector - tags: - - phpstan.collector - - - class: NunoMaduro\Larastan\Collectors\UsedViewInAnotherViewCollector - arguments: - parser: @currentPhpVersionSimpleDirectParser - - - class: NunoMaduro\Larastan\Support\ViewFileHelper - arguments: - viewDirectories: %viewDirectories% - - - - class: NunoMaduro\Larastan\ReturnTypes\ApplicationMakeDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\ContainerMakeDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - - class: NunoMaduro\Larastan\ReturnTypes\ConsoleCommand\ArgumentDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\ConsoleCommand\HasArgumentDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\ConsoleCommand\OptionDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\ConsoleCommand\HasOptionDynamicReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\TranslatorGetReturnTypeExtension - tags: - - phpstan.broker.dynamicMethodReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\TransHelperReturnTypeExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - class: NunoMaduro\Larastan\ReturnTypes\DoubleUnderscoreHelperReturnTypeExtension - tags: - - phpstan.broker.dynamicFunctionReturnTypeExtension - - - NunoMaduro\Larastan\ReturnTypes\AppMakeHelper - - NunoMaduro\Larastan\Internal\ConsoleApplicationResolver - - NunoMaduro\Larastan\Internal\ConsoleApplicationHelper - - NunoMaduro\Larastan\Support\HigherOrderCollectionProxyHelper - -rules: - - NunoMaduro\Larastan\Rules\UselessConstructs\NoUselessWithFunctionCallsRule - - NunoMaduro\Larastan\Rules\UselessConstructs\NoUselessValueFunctionCallsRule - - NunoMaduro\Larastan\Rules\DeferrableServiceProviderMissingProvidesRule - - NunoMaduro\Larastan\Rules\ConsoleCommand\UndefinedArgumentOrOptionRule diff --git a/phpstan.neon b/phpstan.neon deleted file mode 100644 index 5bacdbfb2..000000000 --- a/phpstan.neon +++ /dev/null @@ -1,26 +0,0 @@ -# https://phpstan.org/config-reference -# https://github.com/nunomaduro/larastan - -includes: - - ./larastan-extension.neon - -parameters: - - paths: - - app - - # The level 8 is the highest level - level: 1 - - phpVersion: 80200 - - #bootstrapFiles: - # - bootstrap/phpstan.php - - #ignoreErrors: - ## - '#PHPDoc tag @throws with type .*?Psr\\SimpleCache\\InvalidArgumentException.*? is not subtype of Throwable#' - - excludePaths: - - ./Config/**/*.php - - checkMissingIterableValueType: false \ No newline at end of file