Auto-registering of Accessor(s)

srigi
Nette Blogger | 558
+
+2
-

The generated Accessor(s) are very handy, but the need to register them manually is annoying.

I propose, that the Search extension would also support for searching of Accessors and autoregistering them.

Not sure if/how that can be achieved, but I believe it would drastically improve the DX of Nette DI.

Last edited by srigi (2023-12-16 22:21)

David Grudl
Nette Core | 8229
+
0
-

It's not working for you? Can you show me an example?

srigi
Nette Blogger | 558
+
0
-

Thank you David for reply. I prepared minimal demo repository demonstrating my struggle.

See the configuration of the search/services to understand what I want to achieve.

There is also another branch demonstrating a little more complicated demo (Repository is now interface).

Thanks.

David Grudl
Nette Core | 8229
+
+1
-

I'm sorry, I mistook accessory for factory. I added it to 3.1-dev.