Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSS Gate Workshop: PHP Lovers: 2023-10-09: ast.: goodby/csv: Work log #1710

Closed
astandkaya opened this issue Oct 9, 2023 · 18 comments
Closed

Comments

@astandkaya
Copy link
Contributor

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}: ${ACCOUNT_NAME}: ${OSS_NAME}: Work log

タイトル例↓:

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

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

  • スライド:ワークショップの進行に使っているスライドがあります。
  • チャット:OSS開発に関することならなんでも相談できます。ワークショップが終わった後もオンラインで相談しながら継続的にOSSの開発に参加しましょう!
  • シナリオ:ワークショップの目的・内容・進め方の詳細が書いています。
  • 過去のビギナーの作業ログ:他の人の作業ログから学べることがいろいろあるはずです。
@astandkaya astandkaya changed the title OSS Gate Workshop PHP Lovers: 2023-10-09: name: ast.: Work log OSS Gate Workshop PHP Lovers: 2023-10-09: ast.: xxx: Work log Oct 9, 2023
@astandkaya
Copy link
Contributor Author

goodby/csvに決めました
https://packagist.org/packages/goodby/csv

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

ドキュメントページは無し
README.mdに使用方法などの記載があった
https://github.com/goodby/csv/blob/master/README.md#installation

@astandkaya
Copy link
Contributor Author

composerはインストールされているので、下記のcomposer.jsonファイルを作った

{
    "require": {
        "goodby/csv": "*"
    }
}

@astandkaya
Copy link
Contributor Author

ドキュメントにはphp composer.phar installを実行するように書いてあるが、すでにcomposerが入っているのでcomposer installを実行する。
(ここはちょっと不親切? それとも常に最新のcomposerを使ってほしいということ?)

@astandkaya
Copy link
Contributor Author

一旦成功した。(worningが出てる?)

全文

No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking goodby/csv (1.3.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
As there is no 'unzip' nor '7z' command installed zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
Installing 'unzip' or '7z' (21.01+) may remediate them.
  - Downloading goodby/csv (1.3.0)
  - Installing goodby/csv (1.3.0): Extracting archive
Generating autoload files

worning部分

As there is no 'unzip' nor '7z' command installed zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
Installing 'unzip' or '7z' (21.01+) may remediate them.

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

unzip7zが必要?

composerが必要としていただけだった
下記で解決
sudo apt install unzip

必須ではないっぽいのでrequirementsには書いてない(?)
https://github.com/goodby/csv#requirements

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

そういえばcomposer.jsonをわざわざ手動で作成しているがcomposer require goodby/csvコマンドでも良さそうな気がした

@astandkaya
Copy link
Contributor Author

exampleディレクトリがあった。
非常にありがたいです。
https://github.com/goodby/csv/tree/master/example

@astandkaya
Copy link
Contributor Author

通常のインストールは問題なさそうなので、contributing側を試す。

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

cloneしてくる
git clone https://github.com/goodby/csv.git

ドキュメントではhub clone goodby/csvと書いてある(?)

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

composer install --devする。

ドキュメントではcomposer.phar install --devと書いてある(composerはすでに入っているので個人的にはちょっと分かりにくい?)

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

composer install --devを実行してエラーが出た

In RootPackageLoader.php line 160:

  require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Please use mikey179/vfsstream instead.


update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

composer.jsonファイルのrequire-devにmikey179/vfsStreamと大文字を混ぜてしまっているため、mikey179/vfsstreamに修正

@astandkaya
Copy link
Contributor Author

astandkaya commented Oct 9, 2023

再度インストールして、無事通った。

Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 12 installs, 0 updates, 0 removals
  - Locking mikey179/vfsstream (v1.6.11)
  - Locking mockery/mockery (0.7.2)
  - Locking phpunit/php-code-coverage (1.2.18)
  - Locking phpunit/php-file-iterator (1.4.5)
  - Locking phpunit/php-text-template (1.2.1)
  - Locking phpunit/php-timer (1.0.8)
  - Locking phpunit/php-token-stream (1.2.2)
  - Locking phpunit/phpunit (3.7.38)
  - Locking phpunit/phpunit-mock-objects (1.2.3)
  - Locking suin/php-expose (1.0)
  - Locking symfony/polyfill-ctype (v1.28.0)
  - Locking symfony/yaml (v2.8.52)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 12 installs, 0 updates, 0 removals
  - Downloading mikey179/vfsstream (v1.6.11)
  - Downloading mockery/mockery (0.7.2)
  - Downloading phpunit/php-token-stream (1.2.2)
  - Downloading symfony/yaml (v2.8.52)
  - Downloading phpunit/php-text-template (1.2.1)
  - Downloading phpunit/phpunit-mock-objects (1.2.3)
  - Downloading phpunit/php-timer (1.0.8)
  - Downloading phpunit/php-file-iterator (1.4.5)
  - Downloading phpunit/php-code-coverage (1.2.18)
  - Downloading phpunit/phpunit (3.7.38)
  - Downloading suin/php-expose (1.0)
  - Installing mikey179/vfsstream (v1.6.11): Extracting archive
  - Installing mockery/mockery (0.7.2): Extracting archive
  - Installing phpunit/php-token-stream (1.2.2): Extracting archive
  - Installing symfony/polyfill-ctype (v1.28.0): Extracting archive
  - Installing symfony/yaml (v2.8.52): Extracting archive
  - Installing phpunit/php-text-template (1.2.1): Extracting archive
  - Installing phpunit/phpunit-mock-objects (1.2.3): Extracting archive
  - Installing phpunit/php-timer (1.0.8): Extracting archive
  - Installing phpunit/php-file-iterator (1.4.5): Extracting archive
  - Installing phpunit/php-code-coverage (1.2.18): Extracting archive
  - Installing phpunit/phpunit (3.7.38): Extracting archive
  - Installing suin/php-expose (1.0): Extracting archive
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

worningが出ている?

Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.

@astandkaya
Copy link
Contributor Author

phpunitが古い(?)

    "require-dev": {
        "phpunit/phpunit": "3.7.*",
        "mockery/mockery": "^0.7.2",
        "suin/php-expose": "^1.0",
        "mikey179/vfsstream": "^1.1"
    },

@astandkaya astandkaya changed the title OSS Gate Workshop PHP Lovers: 2023-10-09: ast.: xxx: Work log OSS Gate Workshop PHP Lovers: 2023-10-09: ast.: goodby/csv: Work log Oct 9, 2023
@astandkaya
Copy link
Contributor Author

いったん↓に関してのPRを作成する。
#1710 (comment)

@daipom
Copy link
Contributor

daipom commented Oct 9, 2023

いったん↓に関してのPRを作成する。 #1710 (comment)

goodby/csv#94

@daipom daipom changed the title OSS Gate Workshop PHP Lovers: 2023-10-09: ast.: goodby/csv: Work log OSS Gate Workshop: PHP Lovers: 2023-10-09: ast.: goodby/csv: Work log Oct 10, 2023
@github-actions
Copy link

おつかれさまでした!

ワークショップの終了にともないissueを閉じますが、このまま作業メモとして使っても構いません 👌

ワークショップの感想を集めています!

ブログなどに書かれた際は、このページへリンクの追加をお願いします 🙏

またの参加をお待ちしています!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants