Following example:
services:
- ISomeControlFactory
interface ISomeControlFactory {
/** @return SomeControl */
public function create(SomeEntity $someEntity);
}
class SomeControl {
public function __construct(SomeEntity $entity) {}
}
class SomeEntity {}
leads to exception
Service 'XX_ISomeControlFactory': Service of type SomeEntity needed by SomeControl::__construct() not found. Did you register it in configuration file?
just because the parameter variables have different names.