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

Properly Document how to override core classes #4234

Closed
weaverryan opened this issue Sep 16, 2014 · 6 comments
Closed

Properly Document how to override core classes #4234

weaverryan opened this issue Sep 16, 2014 · 6 comments
Labels
actionable Clear and specific issues ready for anyone to take them.

Comments

@weaverryan
Copy link
Member

Hi guys!

First, see symfony/symfony#11881. Basically, we should be using service decoration and not recommending that you override any *class parameters. We do talk about service decoration in components/dependency_injection/advanced.rst, but I propose that we show a quick cookbook article on how to override a real core service.

It might also be nice to change the existing article to use examples better than foo and bar :). See https://github.com/symfony/symfony-docs/pull/3753/files#r17416550.

@weaverryan weaverryan added the actionable Clear and specific issues ready for anyone to take them. label Sep 16, 2014
@wouterj
Copy link
Member

wouterj commented Sep 16, 2014

Please note that this duplicates what I proposed in #4228:

Three topics ("Marking services as public/private", "Aliasing" and "Decorating Services") are related to the way you make your services open for extensibility. This should be moved into a new article, telling you everything about these concepts and learning you best practises.

@linaori
Copy link
Contributor

linaori commented Oct 22, 2014

@weaverryan Is it possible to put this in the 2.6 milestone? Especially with new services not having .class, this will be a must have for the documentation.

@wouterj
Copy link
Member

wouterj commented Oct 22, 2014

@iltar that's not how we use the milestones. Milestones in de docs indicate only new features which needs to be documented for a specific version. This should be done for all versions.

It's still an issue that's high on my prioritylist btw.

@weaverryan
Copy link
Member Author

I agree this should be done soon, and me can merge it into all branches, which is really nice :).

Cheers!

@linaori
Copy link
Contributor

linaori commented Oct 23, 2014

I've got a service here that might want some love and attention. A lot of people need the following service but a bit more customized, without copying all the code to a SimpleAuthenticatorInterface implementation. I often see question related to this in #symfony. There are a few more but I can't remember them, if I find more example worthy services, I'll let you know.

security.authentication.provider.dao - Using a decorator around DaoAuthenticationProvider which implements SimpleAuthenticatorInterface to allow it in the SimpleAuthenticationProvider without having to duplicate too much code.

@wouterj
Copy link
Member

wouterj commented May 2, 2015

Closing in favor of #4228

@wouterj wouterj closed this as completed May 2, 2015
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.
Projects
None yet
Development

No branches or pull requests

3 participants