The build of my Laravel 9 app is broken. During the deploy the build stage always fails because the installation of composer fails due to unmathing checksums.
Build logs:
=== PHP - Composer - Install ([email protected]) ===
DEBUG: ***** CACHE MISS: "composer"
2023/04/05 10:22:16 [DEBUG] GET https://getcomposer.org/installer
2023/04/05 10:22:16 [DEBUG] GET https://composer.github.io/installer.sig
---------------------------------------------
Running "bash -c php -d 'error_reporting=24575' -r \"echo hash_file('sha384', '/layers/google.php.composer-install/composer/composer-setup-4280150151.php');\""
Warning: PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so: cannot open shared object file: No such file or directory), /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so: cannot open shared object file: No such file or directory), /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eaeDone "bash -c php -d 'error_reporting=24575' -r \"echo hash_file('s..." (314.259832ms)
Failure: (ID: 8b19fc7b) Failed to run /bin/build: invalid composer installer found at "https://getcomposer.org/installer": checksum for composer installer, "Warning: PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so: cannot open shared object file: No such file or directory), /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0\n\nWarning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so: cannot open shared object file: No such file or directory), /layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so.so (/layers/google.php.runtime/php/lib/php/extensions/no-debug-non-zts-20210902/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0\n55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae", does not match expected checksum of "55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae"
I have tried to load the missing extensions from the php.ini but it doesn't change anything. I still have the same error in the build logs.
php.ini file:
; enable function that are disabled by default in the App Engine PHP runtime
google_app_engine.enable_functions = "php_sapi_name, php_uname, getmypid, escapeshellarg"
google_app_engine.allow_include_gs_buckets = "wegiv-staging-storage"
memory_limit = 2000M
allow_url_include = 1
extension=curl.so
extension=fileinfo.so
I am new to GCP, any help is welcome !