You are making some changes to your existing action controller
\MyCompany\MyModule\Controller\Index\Index
public function __construct( \Magento\Framework\App\Action\Context $context,
<new dependency here>, \Magento\Framework\View\Result\PageFactory $resultPageFactory){
You want to inject a new dependency to the controller, but you encounter the following error after flushing the cache and
reloading the page: Recoverable Error: Argument 2 passed to MyCompany\MyModule\Controller\Index\Index::__construct() must be an instance of <new dependency class> ...How do you fix the error?
Wähle eine der folgenden: