Skip to content

Conversation

richardmiller-zz
Copy link
Contributor

Q A
Doc fix? yes
New docs? no
Applies to all

Having the class defined on the parent service is misleading as this is not used for abstract services and also suggests that their must be a corresponding abstract class. Also changed some of the text that suggests the same thing.

@stof
Copy link
Member

stof commented Mar 19, 2013

IMO, you should also keep an example where the class is inherited to show that it is possible (in case the different child services have the same class)

The parent service is abstract as it should not be directly retrieved from the
container or passed into another service. It exists merely as a "template" that
other services can use. This is why it has no ``class`` configured which would
cause an exception to be raised for a non-abstract service.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is wrong. an abstract service does not need to be an abstract class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to make that point, I have made a change to hopefully make this clearer

@richardmiller-zz
Copy link
Contributor Author

@stof good call, I agree that it would be good to show using the parent service having a common class configured that could be inherited by other services. I think this should be a separate section that I will look at adding,

weaverryan added a commit that referenced this pull request Mar 30, 2013
…mples

Removing class key/attribute from parents services in examples
@weaverryan weaverryan merged commit f51116e into symfony:2.0 Mar 30, 2013
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.

3 participants