Skip to content

Symfony3 doc Service container example #5999

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
bigs21 opened this issue Dec 10, 2015 · 3 comments
Closed

Symfony3 doc Service container example #5999

bigs21 opened this issue Dec 10, 2015 · 3 comments
Labels
actionable Clear and specific issues ready for anyone to take them. good first issue Ideal for your first contribution! (some Symfony experience may be required) hasPR A Pull Request has already been submitted for this issue.

Comments

@bigs21
Copy link
Contributor

bigs21 commented Dec 10, 2015

In the documentation, at http://symfony.com/doc/3.0/book/service_container.html#creating-configuring-services-in-the-container the file to edit is not correct.

It points to config.yml:

# app/config/config.yml
services:
    my_mailer:
        class:        Acme\HelloBundle\Mailer
        arguments:    [sendmail]

But should be services.yml:

# app/config/services.yml
services:
    my_mailer:
        class:        Acme\HelloBundle\Mailer
        arguments:    [sendmail]

The same may be the case for XML and PHP formats.

@xabbuh xabbuh added good first issue Ideal for your first contribution! (some Symfony experience may be required) actionable Clear and specific issues ready for anyone to take them. labels Dec 10, 2015
@wouterj
Copy link
Member

wouterj commented Dec 10, 2015

Please note that it's possible to do it in both files, but services.yml definitely is more correct.

If you want, you can submit a fix for this yourself by clicking on the blue "edit" button of the page and changing the file names.

@xabbuh
Copy link
Member

xabbuh commented Dec 10, 2015

Good catch @bigs21. We can also update the example to use the AppBundle namespace. Do you like to work on a pull request?

@bigs21
Copy link
Contributor Author

bigs21 commented Dec 10, 2015

Not at the moment, @wouterj and @xabbuh.
I'll leave it to the pros.

Or at least someone that has done at least 1 line of code in Symfony3.

vincentaubert added a commit to vincentaubert/symfony-docs that referenced this issue Dec 12, 2015
@wouterj wouterj added the hasPR A Pull Request has already been submitted for this issue. label Dec 12, 2015
xabbuh added a commit that referenced this issue Dec 13, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

#5999 fix files names

Fixes #5999

Commits
-------

7a9c1d7 #5999 fix files names
@xabbuh xabbuh closed this as completed Dec 13, 2015
weaverryan added a commit that referenced this issue Dec 13, 2015
* 2.3:
  Minor tweaks
  #5999 fix files names
  Updated the other image too
  Fixed the image
  Minor typo
  Rewords
  Minor changes
  Updated the release process for Symfony 3.x and future releases
  removing php opening tags
weaverryan added a commit that referenced this issue Dec 13, 2015
* 2.7:
  Minor tweaks
  #5999 fix files names
  Updated the other image too
  Fixed the image
  Minor typo
  Rewords
  Minor changes
  Updated the release process for Symfony 3.x and future releases
  removing php opening tags
weaverryan added a commit that referenced this issue Dec 13, 2015
* 2.8:
  Minor tweaks
  #5999 fix files names
  Updated the other image too
  Fixed the image
  Minor typo
  Rewords
  Minor changes
  Updated the release process for Symfony 3.x and future releases
  removing php opening tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. good first issue Ideal for your first contribution! (some Symfony experience may be required) hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

3 participants