skip to Main Content

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
htdocsmagentovendormagentoframeworkInterceptionPluginListGenerator.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:xampphtdocsmagentovendormagentoframeworkInterceptionPluginListGenerator.php on line 159

and this error resolves when I discard my all previous changes and then again first error occurred

2

Answers


  1. Chosen as BEST ANSWER
    $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


  2. Replace the line

    $cacheId = implode('|', $this->scopePriorityScheme) . "|" . $this->cacheId;
    

    with the following one:

    $cacheId = implode('-', $this->scopePriorityScheme) . "-" . $this->cacheId;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search