在编译时出现
F:\wwwroot\www.test4.com>F:\BtSoft\php\74\php.exe bin/magento setup:di:compile
Compilation was started.
Plugin list generation... 8/9 [========================>---] 88% 1 min 326.0 MiB
In ErrorHandler.php line 61:
Warning: file_put_contents(F:/wwwroot/www.test4.com/generated/metadata/primary|global|plugin-list.php): failed to o
pen stream: No such file or directory in F:\wwwroot\www.test4.com\vendor\magento\framework\Interception\PluginListG
enerator.php on line 414
setup:di:compile
解决方法:
1. 打开文件
\vendor\magento\framework\Interception\PluginListGenerator.php
2.找到以下代码
$cacheId = implode('|', $this->scopePriorityScheme) . "|" . $this->cacheId;
替换为
$cacheId = implode('-', $this->scopePriorityScheme) . "-" . $this->cacheId;
再次编译
已经正常。