feat(profiler): add XHProf middleware to get profiles from web API #148
Annotations
10 errors
src/Handler/Http/Middleware/XHProfTrap.php#L76
src/Handler/Http/Middleware/XHProfTrap.php:76:9: DocblockTypeContradiction: Docblock-defined type array<array-key, mixed> for $payload['profile'] is always array<array-key, mixed> (see https://psalm.dev/155)
|
src/Handler/Http/Middleware/XHProfTrap.php#L92
src/Handler/Http/Middleware/XHProfTrap.php:92:31: MixedArgumentTypeCoercion: Argument 3 of Buggregator\Trap\Module\Profiler\XHProf\ProfileBuilder::createProfile expects array<non-empty-string, non-empty-string>, but parent type array<array-key, mixed> provided (see https://psalm.dev/194)
|
src/Handler/Http/Middleware/XHProfTrap.php#L93
src/Handler/Http/Middleware/XHProfTrap.php:93:32: MixedArgumentTypeCoercion: Argument 4 of Buggregator\Trap\Module\Profiler\XHProf\ProfileBuilder::createProfile expects array<non-empty-string, array{cpu: int<0, max>, ct: int<0, max>, mu: int<0, max>, pmu: int<0, max>, wt: int<0, max>}>, but parent type array<array-key, mixed> provided (see https://psalm.dev/194)
|
src/Module/Profiler/Struct/Profile.php#L37
src/Module/Profiler/Struct/Profile.php:37:15: InvalidParamDefault: Default value type Buggregator\Trap\Module\Profiler\Struct\Tree<object> for argument 4 of method Buggregator\Trap\Module\Profiler\Struct\Profile::__construct does not match the given type Buggregator\Trap\Module\Profiler\Struct\Tree<Buggregator\Trap\Module\Profiler\Struct\Edge> (see https://psalm.dev/062)
|
src/Module/Profiler/Struct/Profile.php#L71
src/Module/Profiler/Struct/Profile.php:71:37: PossiblyInvalidArgument: Argument 1 of Buggregator\Trap\Module\Profiler\Struct\Peaks::fromArray expects array{cpu: int<0, max>, ct: int<0, max>, mu: int<0, max>, pmu: int<0, max>, wt: int<0, max>}, but possibly different type Buggregator\Trap\Module\Profiler\Struct\Peaks|array{cpu: int<0, max>, ct: int<0, max>, mu: int<0, max>, pmu: int<0, max>, wt: int<0, max>} provided (see https://psalm.dev/092)
|
src/Module/Profiler/Struct/Profile.php#L78
src/Module/Profiler/Struct/Profile.php:78:16: MixedReturnTypeCoercion: The declared return type 'array{app_name?: string, date: int, edges: array<array-key, mixed>, filename?: string, hostname?: string, peaks: Buggregator\Trap\Module\Profiler\Struct\Peaks|array{cpu: int<0, max>, ct: int<0, max>, mu: int<0, max>, pmu: int<0, max>, wt: int<0, max>}, tags: array<non-empty-string, non-empty-string>, total_edges: int<0, max>}' for Buggregator\Trap\Module\Profiler\Struct\Profile::jsonSerialize is more specific than the inferred return type 'array{app_name: string, date: int, edges: array<array-key, Buggregator\Trap\Module\Profiler\Struct\Edge>, filename: mixed|string, hostname: mixed|string, peaks: Buggregator\Trap\Module\Profiler\Struct\Peaks, tags: array<non-empty-string, non-empty-string>, total_edges: int<0, max>}' (see https://psalm.dev/197)
|
src/Module/Profiler/Struct/Profile.php#L82
src/Module/Profiler/Struct/Profile.php:82:16: MixedReturnTypeCoercion: The type 'array{app_name: string, date: int, edges: array<array-key, Buggregator\Trap\Module\Profiler\Struct\Edge>, filename: mixed|string, hostname: mixed|string, peaks: Buggregator\Trap\Module\Profiler\Struct\Peaks, tags: array<non-empty-string, non-empty-string>, total_edges: int<0, max>}' is more general than the declared return type 'array{app_name?: string, date: int, edges: array<array-key, mixed>, filename?: string, hostname?: string, peaks: Buggregator\Trap\Module\Profiler\Struct\Peaks|array{cpu: int<0, max>, ct: int<0, max>, mu: int<0, max>, pmu: int<0, max>, wt: int<0, max>}, tags: array<non-empty-string, non-empty-string>, total_edges: int<0, max>}' for Buggregator\Trap\Module\Profiler\Struct\Profile::jsonSerialize (see https://psalm.dev/197)
|
src/Proto/Frame/Profiler.php#L12
src/Proto/Frame/Profiler.php:12:23: InvalidTypeImport: Type alias Calls imported from Buggregator\Trap\Proto\Frame\Profiler\Payload is not defined on the source class (see https://psalm.dev/233)
|
src/Proto/Frame/Profiler.php#L30
src/Proto/Frame/Profiler.php:30:9: InvalidDocblock: array{type: non-empty-string}&Calls&Metadata is not a valid type (Intersection types must be all objects, Psalm\Type\Atomic\TTypeAlias provided in /home/runner/work/trap/trap/src/Proto/Frame/Profiler.php:29) (see https://psalm.dev/008)
|
src/Proto/Frame/Profiler.php#L30
src/Proto/Frame/Profiler.php:30:9: MixedAssignment: Unable to determine the type that $data is being assigned to (see https://psalm.dev/032)
|
This job failed
Loading