after upgrading to Nette 2.1 I keep getting the following error:
PHP User Deprecated: Passing factories to Nette\DI\Container::addService() is deprecated; pass the object itself.
It's obviously caused by the following part of config.neon:
services: router: factory: \MyRouter::createRouter
What's the proper way of handling this? Even sandbox uses static factory to create Router. If it's the recommended way, why does it fire the User Deprecated error? It's really confusing.