I will try to follow up on the alternative provider approach I suggested soon - 
per my last comment on that issue, another push is needed to evaluate this in 
practice.

As for the standardized provider format you're proposing, I remain of the 
opinion that this will be of little practical use in real life.

Bootstrapping everything against a single container is, in my opinion, 
unrealistic - it works for a low number of providers from vendors who carefully 
coordinate those providers, but at scale, I am fairly confident this will fail 
hard.

It's kind of like if everyone was sharing a single namespace, and in many ways 
it's actually worse. You can't possibly know what other vendors are 
bootstrapping in their providers. Is it safe for me to register a PSR-16 
CacheInterface implementation, for example? If two providers do that, you will 
get terrible unexpected results when one of these randomly "win" depending on 
the order in which the providers were added.

I work on a fairly large project, and we're starting to see some of these 
issues surface - different teams can't know about everything that gets 
bootstrapped by every provider from every other team. It's not safe.

My hypothesis is that isolated modules, that selectively export only 
domain-specific services etc. are likely much safer, and I think that using 
proprietaty providers within a given domain is perfectly fine.

I think that the introduction of a standard provider format will effectively 
mean that almost no one will be able to make use of proprietary container 
configuration features - the standard format will compete and be at odds with 
proprietary formats. If successful, it will largely erase the differences 
between containers. (If unsuccessful, well, the PSR won't have much value.)

So I'm proposing an alternative, not a supplement. Not that I will be putting 
my energy into derailing your current proposal, just that I don't believe it 
solves the problem we're facing in my organization - what we're doing now is 
very much what you're proposing, bootstrapping everything against a single 
container, and it's already looking non-viable for four teams trying to 
coordinate providers. I'm afraid this will be much, much worse with hundreds of 
vendors shipping providers without any coordination.

Anyhow, I'm hoping to do another iteration on the alternative modular approach, 
probably in the next two weeks.

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/40fb0ebc-b7fc-4a64-9d8c-ffa08329ae2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to