Inject doctrine listeners with locator if setLocator method is found.