auryn icon indicating copy to clipboard operation
auryn copied to clipboard

Injector::prepare exception

Open Furgas opened this issue 2 years ago • 2 comments

Shouldn't Injector::prepare throw ConfigException instead of InjectionException?

Furgas avatar May 11 '22 14:05 Furgas

What makes you think so?

kelunik avatar May 12 '22 04:05 kelunik

Probably because it happens during configuring the injector, not when the injector is making something.

I'm guessing some idiot used InjectionException::fromInvalidCallable because it was there, when they probably should have moved that static method to InjectorException so it can be used as ConfigException::fromInvalidCallable ?

Danack avatar May 12 '22 11:05 Danack

Should be fixed in a9a6146b876fa7f626e8ca41a360e044017b299b

Injector::prepare now throws ConfigException instead of InjectionException

Danack avatar Apr 17 '23 11:04 Danack