Reputation: 21
when i run php bin/magento setup:di:compile on cmd this error will occur:
Compilation was started. Plugin list generation... 8/9 [========================>---] 88% 10 mins 392.0 MiB In ErrorHandler.php line 61: Warning: file_put_contents(C:/xampp/htdocs/magento/generated/metadata/primary|global|plugin-list.php): failed to open stream: No such file or directory in C:\xampp \htdocs\magento\vendor\magento\framework\Interception\PluginListGenerator.php on line 415 setup:di:compile
Then I see solution on internet I find that if I replace this
$cacheId = implode('|', $this->scopePriorityScheme) . "|" . $this->cacheId;
with
$cacheId = implode(‘-’, $this->scopePriorityScheme) . “-” . $this->cacheId;
then this error will resolve but a new error will accrue which is :
Deprecated Functionality: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in C:\xampp\htdocs\magento\vendor\magento\framework\Interception\PluginListGenerator.php on line 159
and this error resolves when I discard my all previous changes and then again first error occurred
Upvotes: 1
Views: 1253
Reputation: 66
Replace the line
$cacheId = implode('|', $this->scopePriorityScheme) . "|" . $this->cacheId;
with the following one:
$cacheId = implode('-', $this->scopePriorityScheme) . "-" . $this->cacheId;
Upvotes: 3
Reputation: 21
$cacheId = implode(‘-’, $this->scopePriorityScheme) . “-” . $this->cacheId;
I copy this line from a website, When I copy it then '' automatically changes to ‘’ and "" changes to “” thatsway error occurred. use this:
$cacheId = implode('-', $this->scopePriorityScheme) . "-" . $this->cacheId;
Thanks
Upvotes: 1