mirror of
https://github.com/flarum/core.git
synced 2025-08-13 11:54:32 +02:00
refactor: JSON:API (#3971)
* refactor: json:api refactor iteration 1 * chore: delete dead code * fix: regressions * chore: move additions/changes to package * feat: AccessTokenResource * feat: allow dependency injection in resources * feat: `ApiResource` extender * feat: improve * feat: refactor tags extension * feat: refactor flags extension * fix: regressions * fix: drop bc layer * feat: refactor suspend extension * feat: refactor subscriptions extension * feat: refactor approval extension * feat: refactor sticky extension * feat: refactor nicknames extension * feat: refactor mentions extension * feat: refactor lock extension * feat: refactor likes extension * chore: merge conflicts * feat: refactor extension-manager extension * feat: context current endpoint helpers * chore: minor * feat: cleaner sortmap implementation * chore: drop old package * chore: not needed (auto scoping) * fix: actor only fields * refactor: simplify index endpoint * feat: eager loading * test: adapt * test: phpstan * test: adapt * fix: typing * fix: approving content * tet: adapt frontend tests * chore: typings * chore: review * fix: breaking change
This commit is contained in:
@@ -12,6 +12,7 @@ parameters:
|
||||
bootstrapFiles:
|
||||
- bootstrap.php
|
||||
checkOctaneCompatibility: false
|
||||
noEnvCallsOutsideOfConfig: false
|
||||
noModelMake: true
|
||||
noUnnecessaryCollectionCall: true
|
||||
noUnnecessaryCollectionCallOnly: []
|
||||
@@ -24,9 +25,11 @@ parameters:
|
||||
checkModelProperties: false
|
||||
checkPhpDocMissingReturn: false
|
||||
checkUnusedViews: false
|
||||
checkModelAppends: false
|
||||
|
||||
parametersSchema:
|
||||
checkOctaneCompatibility: bool()
|
||||
noEnvCallsOutsideOfConfig: bool()
|
||||
noModelMake: bool()
|
||||
noUnnecessaryCollectionCall: bool()
|
||||
noUnnecessaryCollectionCallOnly: listOf(string())
|
||||
@@ -38,8 +41,11 @@ parametersSchema:
|
||||
disableSchemaScan: bool()
|
||||
checkModelProperties: bool()
|
||||
checkUnusedViews: bool()
|
||||
checkModelAppends: bool()
|
||||
|
||||
conditionalTags:
|
||||
Larastan\Larastan\Rules\NoEnvCallsOutsideOfConfigRule:
|
||||
phpstan.rules.rule: %noEnvCallsOutsideOfConfig%
|
||||
Larastan\Larastan\Rules\NoModelMakeRule:
|
||||
phpstan.rules.rule: %noModelMake%
|
||||
Larastan\Larastan\Rules\NoUnnecessaryCollectionCallRule:
|
||||
@@ -52,6 +58,8 @@ conditionalTags:
|
||||
phpstan.rules.rule: %checkModelProperties%
|
||||
Larastan\Larastan\Rules\UnusedViewsRule:
|
||||
phpstan.rules.rule: %checkUnusedViews%
|
||||
Larastan\Larastan\Rules\ModelAppendsRule:
|
||||
phpstan.rules.rule: %checkModelAppends%
|
||||
|
||||
services:
|
||||
-
|
||||
@@ -163,6 +171,10 @@ services:
|
||||
class: Larastan\Larastan\Properties\ModelRelationsExtension
|
||||
tags:
|
||||
- phpstan.broker.propertiesClassReflectionExtension
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\ModelOnlyDynamicMethodReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\ModelFactoryDynamicStaticMethodReturnTypeExtension
|
||||
@@ -287,7 +299,7 @@ services:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\CollectionGenericStaticMethodDynamicMethodReturnTypeExtension
|
||||
class: Larastan\Larastan\ReturnTypes\EnumerableGenericStaticMethodDynamicMethodReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
@@ -302,7 +314,7 @@ services:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\CollectionGenericStaticMethodDynamicStaticMethodReturnTypeExtension
|
||||
class: Larastan\Larastan\ReturnTypes\EnumerableGenericStaticMethodDynamicStaticMethodReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
|
||||
|
||||
@@ -348,6 +360,11 @@ services:
|
||||
tags:
|
||||
- phpstan.broker.dynamicFunctionReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\Helpers\StrExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicFunctionReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\Helpers\TapExtension
|
||||
tags:
|
||||
@@ -371,6 +388,9 @@ services:
|
||||
-
|
||||
class: Larastan\Larastan\Rules\OctaneCompatibilityRule
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Rules\NoEnvCallsOutsideOfConfigRule
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Rules\NoModelMakeRule
|
||||
|
||||
@@ -383,6 +403,9 @@ services:
|
||||
-
|
||||
class: Larastan\Larastan\Rules\ModelProperties\ModelPropertyRule
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Rules\ModelAppendsRule
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Rules\ModelProperties\ModelPropertyStaticCallRule
|
||||
|
||||
@@ -413,6 +436,7 @@ services:
|
||||
databaseMigrationPath: %databaseMigrationsPath%
|
||||
disableMigrationScan: %disableMigrationScan%
|
||||
parser: @currentPhpVersionSimpleDirectParser
|
||||
reflectionProvider: @reflectionProvider
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Properties\SquashedMigrationHelper
|
||||
@@ -423,6 +447,9 @@ services:
|
||||
-
|
||||
class: Larastan\Larastan\Properties\ModelCastHelper
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Properties\ModelPropertyHelper
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Rules\ModelProperties\ModelPropertiesRuleHelper
|
||||
|
||||
@@ -451,11 +478,14 @@ services:
|
||||
dispatchableClass: Illuminate\Foundation\Events\Dispatchable
|
||||
tags:
|
||||
- phpstan.rules.rule
|
||||
- Larastan\Larastan\Properties\Schema\PhpMyAdminDataTypeToPhpTypeConverter
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Properties\Schema\PhpMyAdminDataTypeToPhpTypeConverter
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\LarastanStubFilesExtension
|
||||
tags: [phpstan.stubFilesExtension]
|
||||
tags:
|
||||
- phpstan.stubFilesExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Rules\UnusedViewsRule
|
||||
@@ -507,35 +537,48 @@ services:
|
||||
class: Larastan\Larastan\ReturnTypes\ConsoleCommand\ArgumentDynamicReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\ConsoleCommand\HasArgumentDynamicReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\ConsoleCommand\OptionDynamicReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\ConsoleCommand\HasOptionDynamicReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\TranslatorGetReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicMethodReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\TransHelperReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicFunctionReturnTypeExtension
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\DoubleUnderscoreHelperReturnTypeExtension
|
||||
tags:
|
||||
- phpstan.broker.dynamicFunctionReturnTypeExtension
|
||||
|
||||
- Larastan\Larastan\ReturnTypes\AppMakeHelper
|
||||
- Larastan\Larastan\Internal\ConsoleApplicationResolver
|
||||
- Larastan\Larastan\Internal\ConsoleApplicationHelper
|
||||
- Larastan\Larastan\Support\HigherOrderCollectionProxyHelper
|
||||
-
|
||||
class: Larastan\Larastan\ReturnTypes\AppMakeHelper
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Internal\ConsoleApplicationResolver
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Internal\ConsoleApplicationHelper
|
||||
|
||||
-
|
||||
class: Larastan\Larastan\Support\HigherOrderCollectionProxyHelper
|
||||
|
||||
rules:
|
||||
- Larastan\Larastan\Rules\UselessConstructs\NoUselessWithFunctionCallsRule
|
||||
|
Reference in New Issue
Block a user