Description
Preconditions
Using Magento 2.1.3 with sample data and PHP 7.0.8
Steps to reproduce
Create a new module and add a plugin for Magento\Framework\App\Request\Http in [module_root]/etc/di.xml
For example:
<type name="Magento\Framework\App\Request\Http">
<plugin name="not_working_http_request_plugin"
type="Company\CustomModule\Plugin\Http"
sortOrder="70"
disabled="false"/>
</type>
do not forget to create a file Company\CustomModule\Plugin\Http
Flush cache using php bin/magento cache:flush
Run php bin/magento setup:di:compile
.
Result
If you remove the plugin code from [module_root]/etc/di.xml and run the command php bin/magento setup:di:compile
, you will receive this error again. The command php bin/magento cache:flush
began to return an error There are no commands defined in the "cache" namespace.
If clearing the cache using , rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/*
I can again use php bin/magento setup:di:compile
But if the return plugin code in file, the problem Cache frontend 'default' is not recognized.
persists.