最近のコメント

    WindowsのVisualStudioCode で PHP CS Fixer 拡張を使用する

    WindowsのVisualStudioCode で PHP CS Fixer 拡張を使用する場合、
    php.exeが必要みたいです。

    このようなエラーに悩まされました。
    PHP CS Fixer: executablePath not found, please check your settings. It will set to built-in php-cs-fixer.phar. Try again!

    さて、下記が対処方法となります。
    ・ PHP CS Fixer 拡張をVisualStudioCode 上でインストール
    ・Windows版のPHPを下記よりダウンロードし
     https://windows.php.net/download/
     適当なパス 、例えば C:\php\ にZipの中身を設置します。
    ・さらに settings.json にパスを設定します。
     C:\Users\[ユーザ名]\AppData\Roaming\Code\User\settings.json に
        “php.validate.executablePath”: “C:\\php\\php.exe”,
     を追加します。
    これで動作するようになります。

    Comments are closed.