Skip to content

Should the ServiceContainer allow the app to overload default extension classes? #142

Description

@g105b

Specific example: My app deals with editing HTTP Requests, so I have a class called EditableRequest that extends Gt\Http\Request. Because of this, the EditableRequest class is instantiated and passed to the DefaultServiceLoader as the actual Request, rather than the actual request that's coming in.

This is obviously a flaw in the system, because it should be fine for the App's service loader to supply classes that extend already-existing classes.

The question is, what should the default behaviour be? If there's already a class defined in the default service loader, should we ignore loading any extras that simply extend the base classes? I think that would be safest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsage questions or clarification requests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions