The method outlined here to create a dirty playground doesn't work in magento 2.1.6: https://magento.stackexchange.com/a/40848/55108
It generates the error:
Uncaught TypeError: Argument 2 passed to Magento\Framework\App\Http::__construct() must be an instance of Magento\Framework\Event\Manager, none given
The TestApp
class in the example extends \Magento\Framework\App\Http
. This is the Http classes constructor:
public function __construct(
\Magento\Framework\ObjectManagerInterface $objectManager,
Event\Manager $eventManager,
AreaList $areaList,
RequestHttp $request,
ResponseHttp $response,
ConfigLoaderInterface $configLoader,
State $state,
Filesystem $filesystem,
\Magento\Framework\Registry $registry
) {
$this->_objectManager = $objectManager;
$this->_eventManager = $eventManager;
$this->_areaList = $areaList;
$this->_request = $request;
$this->_response = $response;
$this->_configLoader = $configLoader;
$this->_state = $state;
$this->_filesystem = $filesystem;
$this->registry = $registry;
}
So I guess it is failing because $eventManager
doesn't exist within the playgrounds context?
How does the code need to be updated to work with 2.1.6?