前回、訳も判らず七転八倒していたが、少し進んだ。
phpstanを入れたのだ。
phpstanはcomposer上で動くphp構文チェッカーです。
先ずcomposerを入れて、composerにphpstanを拡張する感じ。
何だかんだする(ここが面倒臭かった)とphpstanと打ち込むだけで降雨分チェックしてくれる。これは有り難い。
ただなぁ、include先を見てくれないらしく
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
------ --------------------------------------------------- Line index.php ------ --------------------------------------------------- 42 Variable $download_icon might not be defined. 🪪 variable.undefined 42 Variable $download_icon_url might not be defined. 🪪 variable.undefined 57 Variable $download_icon_url might not be defined. 🪪 variable.undefined 62 Variable $download_icon_url might not be defined. 🪪 variable.undefined 77 Variable $download_icon_url might not be defined. 🪪 variable.undefined ------ --------------------------------------------------- |
なんてのが沢山出てくる。
関係ないが「🪪」はなんでしょう?よく判らない。……小さくて見えないし。
因みに、一つひとつ修正していくと動くようになりそう。
ただねぇ、php5で動いていたからからねぇ。
php8で廃止になったのは置き換えで何とかなったが、php8でチェックがキツくなったのは難しい。
classの継承で親にある関数を子が参照すると「そんなの無いぞ」と言われてしまう。
phpstan.pharに何か指定すれば回避できるのか、無視して良いのか調べ中。
「動けばいいや」と作ってきたアプリが片端から止まったので大騒ぎです。
uploader直さないと仕事に支障が出てしまう。
困ったなぁ。

