Need For Independent Standards Implementation #16
Comments
Hi @XedinUnknown, the thing is that this repository and definition-interop were part of a project that was experimental, and that has been superseded by https://github.com/container-interop/service-provider now. This new project is also experimental, it's used to try out ideas and we'll bring them back to the PHP-FIG very soon, but I don't consider it stable enough to be used anywhere. |
I have added a more explicit warning to the README by the way. |
Does this mean that development of Assembly will be discontinued? If not, as an implementation it is still free to include this feature. I could implement this and submit a PR, just would be a shame if it's for nothing =) |
I understand. I'm not sure I understood why you couldn't require this library but only use the classes you wanted to (and not use the rest)? I don't want to add features that are not part of definition-interop. This repository was used and can still be used to test out definition-interop. If we ever add changes to definition-interop they will need to be reflected here, and I don't want to be limited by extra features. By "add changes" it could also mean a complete radical change of the whole classes/project. Keep in mind that this repository can break backward compatibility anytime, you should require Also what do you think about the new approach we are taking: https://github.com/container-interop/service-provider ? This isn't more stable though, but it's simpler that's mainly why we went that way. |
Got it. WRT Then, there's the static nature of the new approach. I would no longer be able to simply provide an instance (or instances) of the service provider to the container, which would run against a Finally, while a standard configuration format seems like something too complex to start with, it's an excellent idea, but for a separate project. I have a Magento background, and I think that XML configuration is amazing: not only is it expressive and platform-independent, but it is very easy to create intuitive GUIs for them. The In conclusion, I absolutely loved |
Oh, to answer your question: Because I don't want to depend on any concrete implementation of a container. |
Got it. FYI the container provided in this package is quite secondary (I wouldn't use it, it's mostly included as a reference or for use in tests), the main goal is to provide implementations of definition-interop. |
Yea, for now I'm using it just for tests. But either way, I want the user of my code to be able to choose the container implementation. By the way, it doesn't seem too difficult to change the definition format from |
Another advantage of One way to go around the issue could be to make certain parts of the implementation possible under certain strict conditions, but not required. This could be achieved, for example, by merging the |
A standard like this would never happen. If it's too complex, it has no chance of being accepted. That's why simplicity is key. Also:
|
Hi,
Came across your repo because it is listed as standards-compliant in the docs of
container-interop/definition-interop
. And it's true, this is a fantastic implementation! What can I say, you have my thanks.However, discovered
container-interop
because I wanted to make a container implementation-agnostic library that would still use DI. As such, I want to provide default service definitions via a default provider in my lib. This is mainly for 2 reasons:I use your lib for testing, because it's so standards-compliant, and I like it overall. And probably, the users of my lib will use it with your lib, since currently it seems to be the only standards-compliant lib. But hopefully, this will not always be the case, and I absolutely do not wish to limit them in this way.
Currently, I have 3 ways of being flexible through compliance with the
container-interop
standards:DefinitionInterface
. This would really bloat my lib with similar code, and will decrease its maintainability. Additionally, I would have to create a class for eachMethodCallInterface
whenever I need to perform additional configuration on my services, which is a lot of the times.Right now, I am taking approach 2. However, this creates more opportunity for non-interoperability, which is the opposite of what this whole thing is about. Additionally, like I mentioned before, I'm copying someone else's code mostly (your code).
Wouldn't it be great if there was a separate, standards-compliant, container implementation-agnostic library of convenient wrappers? What I'm suggesting is the extraction of some of your classes, such as
MethodCall
andObjectDefinition
, into a separate library, whichmnapoli/assembly
can then depend upon. This way, people like me can provide default service definitions with ease, while still being standards-compliant and container implementation-agnostic. On the other hand, you write that your container implementation is very simple, and anyone who isn't satisfied by it is welcome to write their own. The approach which I am proposing could give them a definition framework to build upon.What do you think?
The text was updated successfully, but these errors were encountered: