PHP - RSS 作成 - composer インストール
- 1. 概要
- 2. インストール
- 3. アップデート
- 4. 備考
1. 概要
本モジュールは、「composer」でパッケージをインストールする必要があります。
冒頭のページに書いてありますが、もともと「HTML - RSS・Atom」のページから始まって。
何かするたびに、あちこちのページに書き散らしていたので、時間がたったら、そのあたりを忘れてしまって、トラブルがあったときに思い出すのに苦労しました。
なので、そのあたりをあらためて書いておきたいと、ここに少し、まとめておきます。
2. インストール
パッケージのインストール先のディレクトリを作成して、そこへ移動後。
composer require openpsa/universalfeedcreator
実は、初回、末尾に書いてあるようなエラーになって、びびったのですが、少しだけ時間をおいて、実行したら、うまくいったようです。
下記のメッセージが表示されました。
./composer.json has been created
Running composer update openpsa/universalfeedcreator
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking openpsa/universalfeedcreator (v1.9.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Downloading openpsa/universalfeedcreator (v1.9.0)
- Installing openpsa/universalfeedcreator (v1.9.0): Extracting archive
Generating autoload files
No security vulnerability advisories found.
Using version ^1.9 for openpsa/universalfeedcreator
3. アップデート
最近やったばかりですが、いずれ忘れるので、書いておきます。
「PHP」のバージョンがあがったら、パッケージもアップデートしておきましょう。
アップデートのコマンドは、インストール時と同じディレクトリへ移動して。
composer update
4. 備考
インストール初回に、下記のメッセージが出て、びっくりしたり、びびったりしましたが。
https://repo.packagist.org could not be fully loaded (curl error 7 while downloading https://repo.packagist.org/packages.json: Failed to connect to repo.packagist.org port 443 after 103 ms: Couldn't connect to server), package information was loaded from the local cache and may be out of date
Installation failed, deleting ./composer.json.
In RequireCommand.php line 226:
No composer.json present in the current directory (./composer.json), this may be the cause of the following ex
ception.
In CurlDownloader.php line 389:
curl error 7 while downloading https://repo.packagist.org/p2/openpsa/universalfeedcreator.json: Failed to conn
ect to repo.packagist.org port 443 after 102 ms: Couldn't connect to server
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
たまたま、そのときにうまくつながらなかったようです。
再度、同じコマンドで、インストールしようとしたら、うまくいきました。
|
|