LoginSignup
2
1

More than 3 years have passed since last update.

2019-06-11 時点では fzaninotto/Faker で image() を使ってて $faker->image() が false になるよ

Posted at

see https://github.com/fzaninotto/Faker/issues/1710

SSL Certs の有効期限エラー が起きるよ。 2019-06-11 09:20 JST 現在。

この原因は fzaninotto/Faker が https でリクエストを出してるから。

https://lorempixel.com/g/400/200/ とかで証明書のエラーが確認できるね。

原因は https://github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/Image.php#L33$baseUrl = "https://lorempixel.com/"; として、 https://lorempixel.com/ と言った具体に https がハードコートされてるから。(リンク先はそのうち更新されるかもね。)

かつ、 https://github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/Image.php#L84 (リンク先は同上) にて、 Options を設定できない実装だから。

こうなると、 SSL Certs の更新を待つのが良いかな。って。

evil な方法としては、 https://github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/Image.php#L33 を各自の vendor 配下で直接修正する方法で一時的バイパスできるよ。

その場合は、 Deploy とかにも気を回してあげねて。たぶん、特殊な対応を入れないといけないので、そこは頑張ろうね。

というメモです。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1