-
Notifications
You must be signed in to change notification settings - Fork 49
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
Extract factories #26
Comments
the message factories interfaces are defined in message-factories. but complicated. what if we move message factories that we know of into the separating the factory implementations into their own repo, but then i think my order of preference is:
|
Maybe we could move the factory implementations to utils. It is for library implementors anyway. Also, we don't even have to require it in the discovery package. We just need to check for the Factory and the Message existence. In this case the discovery package can purely be a discovery layer. We can place a warning, that to use our factories, the utils package should also be installed. |
i like this idea. lets do that!
|
Unfortunately guzzle/psr7#50 hasn't been accepted which made me think about the current state of factories and discovery.
Currently we have all our Factory implementations in the discovery repo, which makes the actual implementations nearly unusable in cases where the discovery layer is not needed.
IIRC @mekras suggested a while ago to separate the factories from the discovery layer. Although we refused to do (I don't remember the reasons, probably to many packages and dependencies?) we should reconsider this. I see three possible ways:
Leave it as is.
Separate factories to implementation specific packages and
A. require the implementation itself as well
B. only suggest the implementation
In case of "A" we cannot really use the factories automatically anymore in the discovery layer, but we have to install them manually, based on the chosen implementation.
In case of "B" we can require all the factory packages in the discovery layer, so we could use it as usual. Although in this case we also install lots of extra dependencies.
The text was updated successfully, but these errors were encountered: