oss-gate / workshop

OSSの開発に未参加または参加したことはあるけどまだ自信がない人を後押しするワークショップ用のリポジトリー
124 stars 547 forks source link

OSS Gate Workshop: Tokyo: 2017-11-25: NanaAruga: zendframework: Work log #672

Closed NanaAruga closed 6 years ago

NanaAruga commented 6 years ago

This is a work log of a "OSS Gate workshop". "OSS Gate workshop" is an activity to increase OSS developers. Here's been discussed in Japanese. Thanks.

作業ログ作成時の説明

以下のテンプレートを埋めてタイトルに設定します。埋め方例はスクロールすると見えてきます。

OSS Gate Workshop: ${LOCATION}: ${YEAR}-${MONTH}-${DAY}: ${アカウント名}: ${OSS名}: Work log

タイトル例↓:

OSS Gate Workshop: Tokyo: 2017-01-16: kou: Rabbit: Work log

OSS Gateワークショップ関連情報

uchan-nos commented 6 years ago

よろしくお願いします!

hyuraku commented 6 years ago

本日はよろしくお願いします!

knokmki612 commented 6 years ago

よろしくお願いします!

NanaAruga commented 6 years ago

Zendframeworkを選んだ。 まずは、OSSであることの確認を。。

GitHubで「Zendframework」で検索で https://github.com/zendframework/zendframeworkhttps://github.com/zendframework/zendframework/blob/master/LICENSE.md に「BSD 3-clause "New" or "Revised" License」の記載

https://opensource.org/licenses/alphabetical に「The 3-Clause BSD License」があるので問題ない。

NanaAruga commented 6 years ago

インストール手順を調べる。。

公式サイトは Official Zend Framework repository https://framework.zend.com/

■Installのページ https://framework.zend.com/downloads を見つけたが、日本語のページがない? Google翻訳を使うか。。。

Installation of Zend Framework is only a Composer command away: →インストールにComposer コマンドが使えないとダメらしい。  とりあえず、コマンド叩いてみたが自分の環境にない。

■「Composer」のリンクから https://getcomposer.org/ (相変わらず英語ページ、日本語の公式ページはなさそう) ↓ Downloadページに行く https://getcomposer.org/download/ 「Windows Installer」があったのでダウンロードする。

NanaAruga commented 6 years ago

■Composerインストール ダウンロードした「Composer-Setup.exe」を実行 →すべて「Next」(インストーラーの初期設定を変更しないで実行)

正常終了した。

https://github.com/zendframework/zendframework/blob/master/README.mdZend Framework 3 requires PHP 5.6 or later; とあり、ローカルにPHP7が入っているので大丈夫なはず。

NanaAruga commented 6 years ago

■Composerを動かす 実行結果は C:\Users\nana.aruga\Downloads>composer 'composer' は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。 ※動かない

downloadページに、 The installer will download composer for you and set up your PATH environment variable so you can simply call composer from any directory. とあったので、PATH設定を見てみた。

C:\Users\nana.aruga\AppData\Roaming\Composer\vendor\bin が追加されていた→しかしこのフォルダは作成されていない。

C:\Users\nana.aruga\AppData\Roaming\Composer\ までならフォルダがあるのでPATHをこれに変更して実行してみた。 →結果は同じ(動かない)

NanaAruga commented 6 years ago

■Composer再インストール ダウンロードした「Composer-Setup.exe」を実行 途中でインストーラから「コマンドプロンプトを閉じろ」的メッセージが出たので、 cmdを閉じて再実行

※実際に出たメッセージは以下の通り おそらく、インストール時に開いているコマンドウインドウに設定反映されないから、コマンドウインドウを立ち上げなおせ。。。的なアラートだと思う。

Setup has changed your environment, but not all running programs will be aware of this. To use Composer fot the first time, you will have to do one of the following;

・Open a new command windows. ・Close all File Explorer windows, then open a new command windows. ・Logoff and Logon again, then open a new command windows.

■Composerを動かす 実行結果: C:\Users\nana.aruga>composer -V Composer version 1.5.2 2017-09-11 16:59:25

NanaAruga commented 6 years ago

■Zendframeworkインストール https://framework.zend.com/downloads の記載に従って実行

composer require zendframework/zendframework

実行結果:

C:\xampp\htdocs>composer require zendframework/zendframework Using version ^3.0 for zendframework/zendframework ./composer.json has been created Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 101 installs, 0 updates, 0 removals

NanaAruga commented 6 years ago

■Zendframeworkインストール(2) https://framework.zend.com/downloads の記載に従って実行

composer require zendframework/zend-mvc

実行結果:

C:\xampp\htdocs>composer require zendframework/zend-mvc Using version ^3.1 for zendframework/zend-mvc ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Package http-interop/http-middleware is abandoned, you should avoid using it. Use http-interop/http-server-middleware instead. Writing lock file Generating autoload files

※これは、特定のパッケージのみを入れたい場合のコマンド実行方法らしい

NanaAruga commented 6 years ago

■アンインストールして、再インストール(Composer)

Setup has changed your environment, but not all running programs will be aware of this. To use Composer fot the first time, you will have to do one of the following;

・Open a new command windows. ・Close all File Explorer windows, then open a new command windows. ・Logoff and Logon again, then open a new command windows.

のメッセージがインストール完了時に表示された。

knokmki612 commented 6 years ago

https://framework.zend.com/manual/2.4/en/index.html image

NanaAruga commented 6 years ago

■追加でパッケージをインストールしようとした。

実行コマンド: composer require zendframework/zend-expressive

結果:

Using version ^2.0 for zendframework/zend-expressive ./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

  • zendframework/zend-stratigility 2.0.1 requires http-interop/http-middleware ^0.4.1 -> satisfiable by http-interop/http-middleware[0.4.1].
  • zendframework/zend-expressive 2.0.5 requires http-interop/http-middleware ^0.4.1 -> satisfiable by http-interop/http-middleware[0.4.1].
  • Conclusion: don't install http-interop/http-middleware 0.4.1
  • Conclusion: don't install zendframework/zend-expressive 2.0.4
  • Conclusion: don't install zendframework/zend-expressive 2.0.3
  • Conclusion: don't install zendframework/zend-expressive 2.0.2
  • Conclusion: don't install zendframework/zend-expressive 2.0.1
  • Conclusion: remove zendframework/zend-stratigility 1.3.3
  • Installation request for http-interop/http-middleware (locked at 0.2.0) -> satisfiable by http-interop/http-middleware[0.2.0].
  • Installation request for zendframework/zend-expressive ^2.0 -> satisfiable by zendframework/zend-expressive[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5].
  • Conclusion: don't install zendframework/zend-stratigility 1.3.3
  • zendframework/zend-expressive 2.0.0 requires zendframework/zend-stratigility ^2.0.1 -> satisfiable by zendframework/zend-stratigility[2.0.1, 2.1.0, 2.1.1, 2.1.2].
  • Can only install one of: zendframework/zend-stratigility[2.1.0, 1.3.3].
  • Can only install one of: zendframework/zend-stratigility[2.1.1, 1.3.3].
  • Can only install one of: zendframework/zend-stratigility[2.1.2, 1.3.3].
  • Installation request for zendframework/zend-stratigility (locked at 1.3.3) -> satisfiable by zendframework/zend-stratigility[1.3.3].

Installation failed, reverting ./composer.json to its original content.

NanaAruga commented 6 years ago

■報告したい内容(ざっくり日本語)

PHP 7.0.18環境でコンポーネントのインストールに失敗した。(zend-expressive-authentication-basic)

$ composer require zendframework/zend-expressive-authentication-basic を実行したところ

[InvalidArgumentException] Could not find package zendframework/zend-expressive-authentication-basic at any version matching your PHP version 7.0.18.0

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

という結果になった。

[version] PHP:7.0.18 OS:Windows 10

NanaAruga commented 6 years ago

■英訳 Installation failed

Execution composer require zendframework/zend-expressive-authentication-basic

Execution environment PHP:7.0.18 OS:Windows 10

Execution result [InvalidArgumentException] Could not find package zendframework/zend-expressive-authentication-basic at any version matching your PHP version 7.0.18.0

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

knokmki612 commented 6 years ago

おつかれさまでした!このページは一旦closeしますが、このまま作業を続けても大丈夫です!

直近の東京で開催されるOSS Gateのイベントは以下のとおりです!

12月の東京ミートアップに私も参加するので、もしよかったらミートアップで続きをするのも良いかもしれません! 今後もOSS Gateのイベントは開催されるので、是非また参加してみてください!