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

php8でginqを使えるようにしてほしい #72

Open
ryo-sugawara-fi opened this issue Jan 22, 2024 · 1 comment
Open

php8でginqを使えるようにしてほしい #72

ryo-sugawara-fi opened this issue Jan 22, 2024 · 1 comment

Comments

@ryo-sugawara-fi
Copy link

試しにDockerfileで使用するイメージを以下に変更して、ローカルでコンテナを立ち上げて
FROM php:8.3.1-fpm-alpine

/ginq/composer.jsonのphpのrequire部分を以下に変更してユニットテストを実行しました。(vendor/bin/phpunit

    "require": {
        "php": "^5.3|^7|^8",

現状だと以下のエラーが発生しました。php8でもginqを使用したいです。

There was 1 error:

1) GinqTest::testGroupJoin
Trying to access array offset on null

/work/test/GinqTest.php:1566
/work/src/Ginq/JoinSelector/DelegateJoinSelector.php:46
/work/src/Ginq/Iterator/SelectManyWithJoinIterator.php:140
/work/src/Ginq/Iterator/SelectManyWithJoinIterator.php:102
/work/src/Ginq/Util/IteratorUtil.php:46
/work/src/Ginq/Ginq.php:204
/work/test/GinqTest.php:1569
@gunjiro
Copy link
Contributor

gunjiro commented Jan 23, 2024

エラー発生箇所からの推測ですが、こちらと同じ原因ではないでしょうか?

#69 (comment)

テストコードで「人名」と「電話番号」を関連付けたリストを作ろうとしてますが、Hiroshiの「電話番号」を関連付けるときにnull['phone']という不適切なアクセスが発生するコードになっています。

テストコードの記述の問題なので、気にしなければginq自体はそのまま使えるかもしれません。
気になるようであれば、テストコードを修正するのも良いと思います。

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