8000 Add constructor call to the "Getting Services from the Service Container" section by vekien · Pull Request #8849 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Add constructor call to the "Getting Services from the Service Container" section #8849

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

Closed
wants to merge 1 commit into from

Conversation

vekien
Copy link
Contributor
@vekien vekien commented Dec 7, 2017

Parent constructor call is required when using auto-wired services in a command constructor, without it you will receive the error:

There are no commands defined in the "app" namespace.

Some discussion of what I ran into: #8843

Parent constructor call is required when using auto-wired services in a command constructor, without it you will receive the error:

```
There are no commands defined in the "app" namespace.
```
@xabbuh
Copy link
Member
xabbuh commented Dec 8, 2017

I think we should merge this PR into the 2.7 branch. Calling the parent constructor should happen there too.

Looks like we only added the example constructor in 3.4 docs.

@xabbuh xabbuh added this to the 2.7 milestone Dec 8, 2017
@weaverryan
Copy link
Member

Great fix. Thank you Josh!

weaverryan added a commit that referenced this pull request Dec 13, 2017
…ice Container" section (viion)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #8849).

Discussion
----------

Add constructor call to the "Getting Services from the Service Container" section

Parent constructor call is required when using auto-wired services in a command constructor, without it you will receive the error:

```
There are no commands defined in the "app" namespace.
```

Some discussion of what I ran into: #8843

Commits
-------

88fd7a7 Update console.rst
@weaverryan weaverryan closed this Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may cl 3D97 ose these issues.

5 participants
0