Replies: 3 comments 2 replies
-
I think you'll need to add the opcache recipe to clean your opcache on each deploy. See https://github.com/deployphp/deployer/blob/master/docs/contrib/cachetool.md |
Beta Was this translation helpful? Give feedback.
-
@peterjaap thanks for your reply. Any idea why I need it? Sometimes It doesn't happen. Sometimes it does. All our clients are hosted at Hypernode. So the environments are the same. Not sure if I had these issues with earlier versions of Deployer... |
Beta Was this translation helpful? Give feedback.
-
@peterjaap Thanks. Tbh, I have never worried about caching etc when deploying with deployer in the past. Do I understand correctly that flushing opcache after each deploy is a best practice? If so, why isn't it incorporated in the Magento 2 receipe? Should it be incorporated? |
Beta Was this translation helpful? Give feedback.
-
Deployer Version
v7.3.1
Target OS
Debian
Which PHP version are you using?
PHP 8.1
Content of deploy.php or deploy.yaml
Steps to reproduce
Very often we need to do a second deploy to make magento 2 working again after a first "succesfull" deploy. (The deploy is succesfull but Magento throws an erros, see below). I am not exactly sure when this problem occurs but I think it happens when enabling a previously disabled module.
This time it was this error. The CSP module was disabled, and with this deploy it was being enabled.
There has been an error processing your request
Warning: Undefined array key "policy_id"
in /vendor/magento/module-csp/Model/Collector/ConfigCollector.php on line 111
I just had another instance. I upgraded to 2.4.5-p10, after deploying one time it showed the older version. Deploying it again changed it to 2.4.5-p10. Was comming from (2.4.5-p9).
I'll tag @peterjaap already :)
PS: reopened as discussing since the issue was closed
Beta Was this translation helpful? Give feedback.
All reactions