\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Mehran_UnicodeURL',
__DIR__
);
{
"name": "mehran/module-unicode-url",
"description": "Magento 2 Allow Unicode URL",
"type": "magento2-module",
"version": "1.0.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Mehran\\UnicodeURL\\": ""
}
}
}
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Mehran_UnicodeURL" setup_version="0.0.1"/>
</config>_Until now, Everything is fine, and setup:upgrade run as well._
getRequestUri() method of Http Request class.<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\HTTP\PhpEnvironment\Request">
<plugin name="mehran-request" type="Mehran\UnicodeURL\Plugin\Request" />
</type>
</config>
namespace Mehran\UnicodeURL\Plugin;
class Request
{
public function beforeGetRequestUri(\Magento\Framework\HTTP\PhpEnvironment\Request $req)
{
die('Please Die:(');
}
}
php bin/magento setup upgrade -vvv
Can you reproduce an issue using a supported operating system: http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements-tech.html? Note that Windows is not in the list.
OK, I need to install an Ubuntu then. I'll give it a try. But I doubt that the OS causing that!
Let me check it out.
I install Ubuntu 16.04 with Xampp 7.0.24 but the _problem still exists_:

@Mehran91z, thank you for your report.
We've created internal ticket(s) MAGETWO-84072 to track progress on the issue.
Hello,
can anyone test this (2.2.4)?:
<type name="Magento\Framework\Cache\InvalidateLogger">
<arguments>
<argument name="request" xsi:type="object">Magento\Framework\App\Request\Http\Proxy</argument>
</arguments>
</type>
Making "request" parameter for Magento\Framework\Cache\InvalidateLogger constructor lazy (Proxy) seems to resolve the issue in our setup.
Edit: By https://devdocs.magento.com/guides/v2.0/extension-dev-guide/plugins.html :
Limitations
Plugins cannot be used with any of the following:
Objects that are instantiated before Magento\Framework\Interception is bootstrapped
It seem this is the case with Magento\FrameworkApp\Request\Http:
Magento\Framework\Cache\InvalidateLogger::execute() is called (only for logging purpose) before Magento\Framework\Interception is bootstrapped:
public function execute($invalidateInfo)
{
$this->logger->debug('cache_invalidate: ', $this->makeParams($invalidateInfo));
}
private function makeParams($invalidateInfo)
{
$method = $this->request->getMethod();
$url = $this->request->getUriString();
return compact('method', 'url', 'invalidateInfo');
}
which requires fully featured Magento\FrameworkApp\Request\Http class (despite being \Proxy'ied).
Commenting body of Magento\Framework\Cache\InvalidateLogger::execute() allows one to make Request class pluginable.
@pczerkas I don't think your proxy solution is working. After adding it, the compile fails with
There are no commands defined in the "cache" namespace.
Tested on 2.3.1
Thanks @pczerkas for your investigation!
Most helpful comment
@Mehran91z, thank you for your report.
We've created internal ticket(s) MAGETWO-84072 to track progress on the issue.