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
Jane version(s) affected: 7.5.3
Description
The generated code will reference the generated classes in a bunch of places while it would be trivial to make it be the FQCN.
How to reproduce
Generate code and check the code, it will do something like
throw new \App\Infrastructure\Langchain\Exception\PostApiV1ClassifyBadRequestException($serializer->deserialize($body, 'App\\Infrastructure\\Langchain\\Model\\ApiV1ClassifyPostResponse400', 'json'), $response);
all over.
Possible Solution
Use the FQCN.
Additional context
This generates a lot of churn if you're using Rector on your app where it will run StringClassNameToClassConstantRector on everything.
StringClassNameToClassConstantRector
Example
26) src/Infrastructure/Langchain/Endpoint/PostApiV1Classify.php:53 ---------- begin diff ---------- @@ @@ $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (($contentType === null) === false && ($status === 200 && mb_strpos($contentType, 'application/json') !== false)) { - return $serializer->deserialize($body, 'App\\Infrastructure\\Langchain\\Model\\ApiV1ClassifyPostResponse200', 'json'); + return $serializer->deserialize($body, \App\Infrastructure\Langchain\Model\ApiV1ClassifyPostResponse200::class, 'json'); } if (($contentType === null) === false && ($status === 400 && mb_strpos($contentType, 'application/json') !== false)) { - throw new \App\Infrastructure\Langchain\Exception\PostApiV1ClassifyBadRequestException($serializer->deserialize($body, 'App\\Infrastructure\\Langchain\\Model\\ApiV1ClassifyPostResponse400', 'json'), $response); + throw new \App\Infrastructure\Langchain\Exception\PostApiV1ClassifyBadRequestException($serializer->deserialize($body, \App\Infrastructure\Langchain\Model\ApiV1ClassifyPostResponse400::class, 'json'), $response); } } ----------- end diff ----------- Applied rules: * StringClassNameToClassConstantRector (https://wiki.php.net/rfc/class_name_scalars https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form)
The difference is trivial and could easily be done by Jane itself.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Jane version(s) affected: 7.5.3
Description
The generated code will reference the generated classes in a bunch of places while it would be trivial to make it be the FQCN.
How to reproduce
Generate code and check the code, it will do something like
all over.
Possible Solution
Use the FQCN.
Additional context
This generates a lot of churn if you're using Rector on your app where it will run
StringClassNameToClassConstantRector
on everything.Example
The difference is trivial and could easily be done by Jane itself.
The text was updated successfully, but these errors were encountered: