Closed guillaumemaka closed 4 years ago
Could go a couple of ways here; this used to not matter way back before ServiceManager normalised the names. Could either document it or explicitly support both (look for Config
then fall back to config
perhaps) to silently support everything. Thoughts @DASPRiD ?
I'd say that we should just document that we expect a configuration registered under the "config" key.
I believe the convention set in Expressive 3+ is config
so I'd prefer to go with that. However, this would be a BC break though as those who currently rely on Config
would be broken...
Not really – When I wrote this library, ServiceManager 3 was already out, so that was what I was already basing it on. It was never intended to account for people relying on normalization by their container.
That's my point; the convention is config
not Config
. IMO its going to be better to just support both. I realise without thinking I've always just aliased config
and Config
because there's been a mismatch. If I find some time I'll get a patch together.
Don't forget to also support all other variations then, plus "Configuration", "configuration" and so on :P… uhm no, People can just use aliases on their container end.
There's a line.. config/Config confusion was caused upstream in ZF/Expressive, so I don't think it's a big ask to support both. Similarly I don't think there's any need to go overboard and support every possible permutation. I'm just suggesting we go with the typical conventions of the ecosystem...
I don't think we should support/enhance that confusion even further. Also, this is a report by a single user. It would be a different case if a larger percentage of the userbase would report this as an issue.
As I already said, I've had this issue the whole time, I just didn't really think about it ;)
This repository is now deprecated. If you are still experiencing this issue, please feel free to open a new issue at https://github.com/Roave/psr-container-doctrine/issues - thanks!
ZE 3 Dependencies
I followed the CLI integration in the README but I got this exception when I run
php vendor/bin/doctrine
And I need to add this line in
cli-config.php
Maybe add it to the README or if you have a workaround I would like to know it.
Thanks for awesome work.