New issue
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
[DependencyInjection] fix @return anno created by PhpDumper #11756
Conversation
d686544
to
a9f04d3
Compare
👍 |
This should be merged in 2.3 right? |
@sstok indeed |
@@ -521,7 +521,7 @@ private function addService($id, $definition) | |||
if ($definition->isSynthetic()) { | |||
$return[] = '@throws RuntimeException always since this service is expected to be injected dynamically'; | |||
} elseif ($class = $definition->getClass()) { | |||
$return[] = sprintf("@return %s A %s instance.", 0 === strpos($class, '%') ? 'object' : $class, $class); | |||
$return[] = sprintf("@return %s A %s instance.", 0 === strpos($class, '%') ? 'object' : "\\" . $class, $class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the spaces around the dot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabpot FYI, the PHP-CS-Fixer now fixes this kind of issues (well, once you make a new release containing the recent work)
a9f04d3
to
c66da9d
Compare
👍 |
Thank you @jakubkulhan. |
…r (jakubkulhan) This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11756). Discussion ---------- [DependencyInjection] fix @return anno created by PhpDumper | Q | A | ------------- | --- | Fixed tickets | --- | License | MIT If a generated container is inside namespace, generated @return annos are not valid. Commits ------- 39c4cc3 [DependencyInjection] fix @return anno created by PhpDumper
If a generated container is inside namespace, generated @return annos are not valid.