php bin/magento setup:di:compile Errors
Get the solution ↓↓↓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
Answer
Solution:
$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
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: a non-numeric value encountered in
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.