Skip to content
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

Closed

Conversation

jakubkulhan
Copy link
Contributor

Q A
Fixed tickets ---
License MIT

If a generated container is inside namespace, generated @return annos are not valid.

@stof
Copy link
Member

stof commented Aug 25, 2014

👍

@sstok
Copy link
Contributor

sstok commented Aug 25, 2014

This should be merged in 2.3 right?

@stof
Copy link
Member

stof commented Aug 25, 2014

@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);
Copy link
Member

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?

Copy link
Member

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)

@fabpot
Copy link
Member

fabpot commented Aug 26, 2014

👍

@fabpot
Copy link
Member

fabpot commented Aug 26, 2014

Thank you @jakubkulhan.

fabpot added a commit that referenced this pull request Aug 26, 2014
…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
@fabpot fabpot closed this Aug 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants