[SOLVED] Heroku Laravel Dependency installation failed


After I sent the git push heroku main command, I got this error below. To fix it, as it says in the error, there was a problem in  config/database.php line 54. I looked at database.php and sure enough, I was missing a comma at the end of the line for the object property values.

CHANGE FROM:

'password' => isset($DATABASE_URL['pass']) ? $DATABASE_URL['pass'] : null

TO:

'password' => isset($DATABASE_URL['pass']) ? $DATABASE_URL['pass'] : null,

Do you see the difference?

Here is the error message:

remote:        > Illuminate\Foundation\ComposerScripts::postAutoloadDump
remote:        > @php artisan package:discover --ansi
remote:        
remote:        In database.php line 54:
remote:                                                                                      
remote:          syntax error, unexpected single-quoted string "unix_socket", expecting "]"  
remote:                                                                                      
remote:        
remote:        Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
remote:  !     WARNING: A post-autoload-dump script terminated with an error
remote:
remote:  !     ERROR: Dependency installation failed!
remote:  !     
remote:  !     The 'composer install' process failed with an error. The cause
remote:  !     may be the download or installation of packages, or a pre- or
remote:  !     post-install hook (e.g. a 'post-install-cmd' item in 'scripts')
remote:  !     in your 'composer.json'.
remote:  !     
remote:  !     Typical error cases are out-of-date or missing parts of code,
remote:  !     timeouts when making external connections, or memory limits.
remote:  !     
remote:  !     Check the above error output closely to determine the cause of
remote:  !     the problem, ensure the code you're pushing is functioning
remote:  !     properly, and that all local changes are committed correctly.
remote:  !     
remote:  !     For more information on builds for PHP on Heroku, refer to
remote:  !     https://devcenter.heroku.com/articles/php-support
remote:  !     
remote:  !     REMINDER: the following warnings were emitted during the build;
remote:  !     check the details above, as they may be related to this error:
remote:  !     - A post-autoload-dump script terminated with an error
remote:
remote:  !     Push rejected, failed to compile PHP app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to larave20210128-v3.
remote: