Sebelum memulai pastikan WSL sudah terinstall dan dapat diakses.
Pertama-tama jalankan WSL. Kemudian, buat file baru di folder home current user.
nano ~/php-cs-fixer-docker.sh
Copy paste code dibawah ini
#!/bin/bash
# Mount the current working directory to the exact same path in the container
docker run --rm -i \
-u "$(id -u):$(id -g)" \
-v "$PWD:$PWD" \
-w "$PWD" \
ghcr.io/php-cs-fixer/php-cs-fixer:3.95.29-php8.5 "$@"
Kemudian ubah permission-nya supaya menjadi executable.
chmod +x ~/php-cs-fixer-docker.sh
Setelah itu install extension VS Code yang bernama PHP CS FIXER dari Junstyle.
Pada bagian php-cs-fixer executable isi
~/php-cs-fixer-docker.sh
- Baca juga:
- Mengatasi conflict di github.


