ReflectionException #-1 Class does not exist after update to Nette 2.4
- lutor
- Member | 27
Hi,
in our project config, we have a service defined like this:
where CeneoService
is service with constructor like this:
(Lang
is autowired).
@controlSettingsLoader
is name of a service, that loads a new
Settings
object for given control (Settings class then have method
get
to access specific setting section).
With Nette 2.3 everything worked fine, but after update to Nette 2.4 we are getting “ReflectionException #-1 Class does not exist” error caused by Container builder trying to call autowireArguments with empty string: http://pasteboard.co/aAEOoGsoA.png
If I rewrite definitions of the service to separate services…
…it works, but it is not so handy and comfortable as it was. Is there any way, how to make the first, “short” definition to work and compile? I didn't find in changelog that format or way how to write service definitions has been changes, so maybe it is a bug?
Thanks!
- David Grudl
- Nette Core | 8249
It doesn't know type that returns
@controlSettingsLoader::load(Project\Control\Tracker\Component\Ceneo\Conversion\CeneoConversionControl)
,
so autowiring for method get()
fails. It rewritten example is type
known (defined via class
).
Fixed in master.