I am new to Magento and was trying tutorial's example, and my site got broken with HTTP ERROR 500 when i have added my events.xml under my module's etc folder
<event name="controller_action_predispatch">
<observer name="predispatch" instance="MyCompany\Test\Observer\ControlerPreDispatch" shared="false" />
</event>
along with my observer and here is the constructor
public function __construct(\Magento\Framework\App\Response\RedirectInterface $redirect,\Magento\Framework\App\ActionFlag $actionFlag)
Here is apache error:
PHP Fatal error: `Uncaught TypeError: Argument 1 passed to MyCompany\\Test\\Observer\\ControlerPreDispatch::__construct() must implement interface Magento\\Framework\\App\\Response\\RedirectInterface,` .....
any clue?