У меня есть ранее работающее приложение, развернутое на Heroku. Сделал некоторые изменения и попытался развернуть к героку безрезультатно. Развертывание завершается неудачно после отказа в соединении. Я проверил все учетные данные БД, и они точны для производства. Хотя я не совсем уверен в своих пакетах и пытаюсь быть осторожным, поскольку это унаследованная кодовая база, и я немного новичок в PHP и Laravel.
remote: > Illuminate\Foundation\ComposerScripts::postAutoloadDump
remote: > @php artisan package:discover
remote:
remote: In PDOConnection.php line 31:
remote:
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote: In PDOConnection.php line 27:
remote:
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
Вот мой полный след развертывания :
Enumerating objects: 48, done.
Counting objects: 100% (38/38), done.
Delta compression using up to 4 threads
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 17.18 KiB | 2.86 MiB/s, done.
Total 22 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: Deprecation warning: require.test-hook is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.
remote: Deprecation warning: require.test-hook is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.
remote: -----> Installing platform packages...
remote: - php (7.4.3)
remote: - ext-gd (bundled with php)
remote: - ext-mbstring (bundled with php)
remote: - apache (2.4.41)
remote: - nginx (1.16.1)
remote: -----> Installing dependencies...
remote: Composer version 1.9.3 2020-02-04 12:58:49
remote: Deprecation warning: require.test-hook is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.
remote: Loading composer repositories with package information
remote: Installing dependencies from lock file
remote: Package operations: 87 installs, 0 updates, 0 removals
remote: - Installing kylekatarnls/update-helper (1.2.0): Downloading (100%)
remote: - Installing symfony/polyfill-util (v1.14.0): Downloading (100%)
remote: - Installing symfony/polyfill-php56 (v1.14.0): Downloading (100%)
remote: - Installing symfony/polyfill-ctype (v1.14.0): Downloading (100%)
remote: - Installing paragonie/random_compat (v9.99.99): Loading from cache
remote: - Installing symfony/polyfill-php70 (v1.14.0): Downloading (100%)
remote: - Installing symfony/polyfill-mbstring (v1.14.0): Downloading (100%)
remote: - Installing symfony/http-foundation (v3.4.37): Downloading (100%)
remote: - Installing symfony/event-dispatcher-contracts (v1.1.7): Downloading (100%)
remote: - Installing symfony/event-dispatcher (v4.4.4): Downloading (100%)
remote: - Installing psr/log (1.1.2): Downloading (100%)
remote: - Installing symfony/debug (v3.4.37): Downloading (100%)
remote: - Installing symfony/http-kernel (v3.4.37): Downloading (100%)
remote: - Installing vlucas/phpdotenv (v2.6.1): Loading from cache
remote: - Installing symfony/css-selector (v4.4.4): Downloading (100%)
remote: - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Downloading (100%)
remote: - Installing symfony/var-dumper (v3.4.37): Downloading (100%)
remote: - Installing symfony/routing (v3.4.37): Downloading (100%)
remote: - Installing symfony/process (v3.4.37): Downloading (100%)
remote: - Installing symfony/finder (v3.4.37): Downloading (100%)
remote: - Installing symfony/console (v3.4.37): Downloading (100%)
remote: - Installing symfony/polyfill-php72 (v1.14.0): Downloading (100%)
remote: - Installing symfony/polyfill-intl-idn (v1.14.0): Downloading (100%)
remote: - Installing symfony/polyfill-iconv (v1.14.0): Downloading (100%)
remote: - Installing doctrine/lexer (1.0.2): Loading from cache
remote: - Installing egulias/email-validator (2.1.17): Downloading (100%)
remote: - Installing swiftmailer/swiftmailer (v6.2.3): Downloading (100%)
remote: - Installing ramsey/uuid (3.9.3): Downloading (100%)
remote: - Installing psr/simple-cache (1.0.1): Loading from cache
remote: - Installing psr/container (1.0.0): Loading from cache
remote: - Installing symfony/translation-contracts (v1.1.7): Downloading (100%)
remote: - Installing symfony/translation (v4.3.11): Downloading (100%)
remote: - Installing nesbot/carbon (1.39.1): Downloading (100%)
remote: - Installing mtdowling/cron-expression (v1.2.3): Downloading (100%)
remote: - Installing monolog/monolog (1.25.3): Downloading (100%)
remote: - Installing league/flysystem (1.0.64): Downloading (100%)
remote: - Installing erusev/parsedown (1.7.4): Downloading (100%)
remote: - Installing doctrine/inflector (1.3.1): Downloading (100%)
remote: - Installing laravel/framework (v5.5.48): Downloading (100%)
remote: - Installing asm89/stack-cors (1.3.0): Downloading (100%)
remote: - Installing barryvdh/laravel-cors (v0.11.4): Downloading (100%)
remote: - Installing symfony/filesystem (v4.4.4): Downloading (100%)
remote: - Installing seld/phar-utils (1.1.0): Downloading (100%)
remote: - Installing seld/jsonlint (1.7.2): Downloading (100%)
remote: - Installing justinrainbow/json-schema (5.2.9): Downloading (100%)
remote: - Installing composer/xdebug-handler (1.4.0): Downloading (100%)
remote: - Installing composer/spdx-licenses (1.5.3): Downloading (100%)
remote: - Installing composer/semver (1.5.1): Downloading (100%)
remote: - Installing composer/ca-bundle (1.2.6): Downloading (100%)
remote: - Installing composer/composer (1.9.3): Downloading (100%)
remote: - Installing ezyang/htmlpurifier (v4.8.0): Loading from cache
remote: - Installing luketowers/purifier (3.0.6): Loading from cache
remote: - Installing devdojo/chatter (0.2.18): Loading from cache
remote: - Installing doctrine/cache (1.10.0): Downloading (100%)
remote: - Installing doctrine/event-manager (1.1.0): Downloading (100%)
remote: - Installing fideloper/proxy (3.3.4): Loading from cache
remote: - Installing fzaninotto/faker (v1.9.1): Downloading (100%)
remote: - Installing guzzlehttp/promises (v1.3.1): Loading from cache
remote: - Installing ralouphie/getallheaders (3.0.3): Downloading (100%)
remote: - Installing psr/http-message (1.0.1): Loading from cache
remote: - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%)
remote: - Installing jakub-onderka/php-console-color (v0.2): Loading from cache
remote: - Installing nikic/php-parser (v4.3.0): Downloading (100%)
remote: - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache
remote: - Installing dnoegel/php-xdg-base-dir (v0.1.1): Downloading (100%)
remote: - Installing psy/psysh (v0.9.12): Downloading (100%)
remote: - Installing laravel/tinker (v1.0.10): Downloading (100%)
remote: - Installing mtdowling/jmespath.php (2.5.0): Downloading (100%)
remote: - Installing guzzlehttp/guzzle (6.5.2): Downloading (100%)
remote: - Installing aws/aws-sdk-php (3.133.23): Downloading (100%)
remote: - Installing league/flysystem-aws-s3-v3 (1.0.24): Downloading (100%)
remote: - Installing sdkcodes/lara-paystack (1.0.2): Downloading (100%)
remote: - Installing spatie/laravel-sluggable (2.1.6): Loading from cache
remote: - Installing larapack/hooks (v1.0.9): Downloading (100%)
remote: - Installing larapack/voyager-hooks (v1.2.2): Downloading (100%)
remote: - Installing doctrine/dbal (v2.9.3): Downloading (100%)
remote: - Installing larapack/doctrine-support (v0.1.9): Downloading (100%)
remote: - Installing intervention/image (2.5.1): Downloading (100%)
remote: - Installing arrilot/laravel-widgets (3.13.0): Loading from cache
remote: - Installing tcg/voyager (v1.3.1): Downloading (100%)
remote: - Installing test-hook (v1.0.0): Cloning v1.0.0 from cache
remote: - Installing cloudinary/cloudinary_php (1.16.0): Downloading (100%)
remote: - Installing thedarkkid/cloudinary-flysystem (dev-master d44d07c): Loading from cache
remote: - Installing namshi/jose (7.2.3): Loading from cache
remote: - Installing lcobucci/jwt (3.3.1): Loading from cache
remote: - Installing tymon/jwt-auth (1.0.0-rc.5.1): Downloading (100%)
remote: - Installing willvincent/laravel-rateable (1.07): Loading from cache
remote: Package mtdowling/cron-expression is abandoned, you should avoid using it. Use dragonmantank/cron-expression instead.
remote: Generating optimized autoload files
remote: Carbon 1 is deprecated, see how to migrate to Carbon 2.
remote: https://carbon.nesbot.com/docs/#api-carbon-2
remote: You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
remote: > Illuminate\Foundation\ComposerScripts::postAutoloadDump
remote: > @php artisan package:discover
remote:
remote: In PDOConnection.php line 31:
remote:
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote: In PDOConnection.php line 27:
remote:
remote: SQLSTATE[HY000] [2002] Connection refused
remote:
remote:
remote: Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
remote: ! WARNING: An error occurred during a database connection or query
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: ! - An error occurred during a database connection or query
remote:
remote: ! Push rejected, failed to compile PHP app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to travvapi.
remote:
To https://git.heroku.com/travvapi.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/travvapi.git'