質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.31%
Laravel 6

Laravel 6は、オープンソースなPHPのフレームワーク。Webアプリケーションの開発に適しており、バージョン6はLTSです。5.8での向上に加えて、セマンティックバージョニングの採用やLaravel Vaporとのコンパチビリティなどが変更されています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

解決済

1回答

1513閲覧

git push heroku masterでアプリをデプロイできない

asahiko123

総合スコア43

Laravel 6

Laravel 6は、オープンソースなPHPのフレームワーク。Webアプリケーションの開発に適しており、バージョン6はLTSです。5.8での向上に加えて、セマンティックバージョニングの採用やLaravel Vaporとのコンパチビリティなどが変更されています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

0グッド

0クリップ

投稿2022/02/03 06:16

編集2022/02/03 06:24

前提・実現したいこと

laravel にて制作した自作アプリをherokuにデプロイする段階で、git push heroku masterを実行しましたが、

依存関係のインストールに失敗した(下記ログ)とのことで解決方法が分からなかったので
質問させて頂きます。

発生している問題・エラーメッセージ

エラーがないと思われるログを一部省略してます。

remote: Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead. remote: Generating optimized autoload files remote: > Illuminate\Foundation\ComposerScripts::postAutoloadDump remote: Deprecation Notice: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /tmp/build_90ec80e4/vendor/laravel/framework/src/Illuminate/Container/Container.php:1231 (文字数制限により省略 remote: remote: remote: Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 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 pure-ravine-32101. remote: To https://git.heroku.com/pure-ravine-32101.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/pure-ravine-32101.git'

試したこと

・composer updateの実行→変化なし

・heroku アプリを削除して作り直し→変化なし

remote: Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.

ERROR: Dependency installation failed! とあるので
swiftmailerのパッケージがないのかと思い

composer require swiftmailer/swiftmailer

を実行→変化なし

いや、abandoned(放棄)しているんだから不要なのでは、
と思い、

composer remove swiftmailer/swiftmailer

してみるも、失敗

$ composer why swiftmailer/swiftmailer laravel/framework v6.20.44 requires swiftmailer/swiftmailer (^6.0)

とのことで今使っているlaravel6系では必要なパッケージということが分かったのですが
じゃあgit push heroku masterが通らない原因は別なのか?

と考えたところで行き詰っています。

エラーログの読み落とし等あれば教えて頂きたいです。

補足情報(FW/ツールのバージョンなど)

laravel6.20.44
php7.4.16

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

Zuishin

2022/02/03 06:24

abandoned は破棄された、you should avoid using it はそれを使うなという意味です。 書いてあることをまず読みましょう。 読めなければ Google に翻訳機能があるので使ってください。
asahiko123

2022/02/03 11:04

回答ありがとうございます。 アプリ内でメール通知機能を使っているので、そこで使われたswiftmailerがハネられたのだと思います。公式サイトhttps://swiftmailer.symfony.com/docs/introduction.htmlにもnot maintained anymoreとあるので、後継のSymfonyMailerが使えるようにphpのバージョンを上げる等して対応したいと思います。
guest

回答1

0

自己解決

swiftmailerが非推奨(https://swiftmailer.symfony.com/docs/introduction.html)
なので後継のSymfonyMailerを検討する

投稿2022/02/03 11:09

asahiko123

総合スコア43

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.31%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問