###前提・実現したいこと
composerでphpmailer/phpmailer
をインストールしたいのですがなぜかできません。
###発生している問題・エラーメッセージ
環境はVagrantでscotchbox3.0を使ってます。
公式のリファレンス参考にして、
https://github.com/PHPMailer/PHPMailer
composer.jsonの中身も真似して
composer require phpmailer/phpmailer
とやって見ると、
$ composer require phpmailer/phpmailer Using version ^6.0 for phpmailer/phpmailer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - Can only install one of: phpmailer/phpmailer[v6.0.0, dev-master]. - Can only install one of: phpmailer/phpmailer[v6.0.1, dev-master]. - Installation request for phpmailer/phpmailer dev-master -> satisfiable by phpmailer/phpmailer[dev-master]. - Installation request for phpmailer/phpmailer ^6.0 -> satisfiable by phpmailer/phpmailer[v6.0.0, v6.0.1]. Installation failed, reverting ./composer.json to its original content.
このようになってしまいインストールができません。
そこでdev-masterにしないとダメなのかなと思い、
composer.jsonを下に変えて見たのですが、
"require": { "php": ">=5.5.0", "ext-ctype": "*", "phpmailer/phpmailer": "dev-master" } ```そのあと `composer update` 返ってくるのは
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
いろいろ調査したのですが、これ以上解決策が見つからずどうにもならない状態です。 何か原因思い当たる方、教えて頂けないでしょうか。 ###補足情報(言語/FW/ツール等のバージョンなど) 言語:PHP 7.1.8 独自フレームワークです 何卒よろしくお願い致します。 ### composer.json こちらの2パターン試しましたがダメでした。
{
"name": "phpmailer/phpmailer",
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"require": {
"phpmailer/phpmailer": "~6.0"
}
}
{
"name": "phpmailer/phpmailer",
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"require": {
"php": ">=5.5.0",
"ext-ctype": "*",
"phpmailer/phpmailer": "dev-master"
},
"require-dev": {
},
"suggest": {
},
"autoload": {
"psr-4": {
"PHPMailer\PHPMailer": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PHPMailer\Test": "test/"
}
},
"license": "LGPL-2.1"
}
回答2件
あなたの回答
tips
プレビュー