Magento Cloud error and missing php extensions
During one of my Magento Cloud deployments after upgrading to Magento 2.4.3, I had the following error in the Magento Cloud console:
W: Problem 1
W: - web-token/jwt-framework is locked to version v2.2.11 and an update of this package was not requested.
W: - web-token/jwt-framework v2.2.11 requires ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
W: Problem 2
W: - web-token/jwt-framework v2.2.11 requires ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
W: - magento/module-jwt-framework-adapter 100.4.0 requires web-token/jwt-framework ^v2.2.7 -> satisfiable by web-token/jwt-framework[v2.2.11]. W: - magento/module-jwt-framework-adapter is locked to version 100.4.0 and an update of this package was not requested.
The fix for this problem is very simple.
Edit .magento.app.yaml
Under the runtime:extensions node, add the following line:
- sodium
Save and redeploy.
This will work for any php extension that you are missing.