This project provides a starter CLI to complete exercises to practice coding in PHP.
- Fork this repo in GitHub to your personal GitHub
- Clone your new repo and open it in PhpStorm
- For this exercise, you'll run Docker from within PhpStorm. To do this, see the instructions below
- With your Docker container running execute
./cli.sh help
. You'll see an example command that can be run - Add a new file,
.env.local
to the root of your project and addSLACK_WEBHOOK_URL=''
to the file. You will populate that later on - Run
./cli.sh echo:name
- Create your own commands in the src/ folder
- Make sure to run
docker exec -it php-cli-exercise composer install
after adding a new command
Open the Services
tab:
If you haven't setup Docker before in PhpStorm, click the +
button and select "Docker Connection" and "Docker for Mac"
in the dialog window.
Ensure you have Docker Desktop running already (i.e. Cmd + space bar, then Docker.app
. You can close the window after
Docker Desktop starts up). Click the play button and you should now see this.