We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@phpstan-type
API Platform version(s) affected: 3.3.12
Description When viewing documentation and using @phpstan-type CustomType array{} and @returns CustomType, an error is thrown.
@phpstan-type CustomType array{}
@returns CustomType
"@context": "/contexts/Error", "@type": "hydra:Error", "hydra:title": "An error occurred", "hydra:description": "Class \"Satws\\Scarface\\Insight\\Reports\\InsightReportInsights\" does not exist", "trace": [ { "namespace": "", "short_class": "", "class": "", "type": "", "function": "", "file": "/srv/app/vendor/api-platform/core/src/JsonSchema/DefinitionNameFactory.php", "line": 35, "args": [] }, { "namespace": "", "short_class": "ReflectionClass", "class": "ReflectionClass", "type": "-\u003E", "function": "__construct", "file": "/srv/app/vendor/api-platform/core/src/JsonSchema/DefinitionNameFactory.php", "line": 35, "args": [ [ "string", "Satws\\Scarface\\Insight\\Reports\\InsightReportInsights" ] ] },
If you use @phpstan-returns instead, the error will go away.
@phpstan-returns
How to reproduce
<?php #[ApiResource] /** * @phpstan-type CustomType array{test: string} */ class Test { /** * @returns CustomType */ public function __construct(public array $property) {} }
Possible Solution
Additional Context
The text was updated successfully, but these errors were encountered:
No branches or pull requests
API Platform version(s) affected: 3.3.12
Description
When viewing documentation and using
@phpstan-type CustomType array{}
and@returns CustomType
, an error is thrown.If you use
@phpstan-returns
instead, the error will go away.How to reproduce
Possible Solution
Additional Context
The text was updated successfully, but these errors were encountered: