Get started
Why?
I was in need of a no-nonsense, intuitive and easy-to-use skeleton to set up new projects.
What you'll need
You'll need to have Docker and Docker Compose installed to be able to develop and run this skeleton on your local development machine. See Docker setup for more details.
Installation
Be sure to choose the correct installation profile from the start as it can be tedious to change it afterwards.
- Default
- Full
The default installation profile has no examples. You should be using this profile if you know what's up and want to start with a clean slate.
composer create-project robiningelbrecht/php-slim-skeleton [app-name] --no-install --ignore-platform-reqs --stability=dev
# Build docker containers
docker-compose up -d --build
# Install dependencies
docker-compose run --rm php-cli composer install
Now you should be set to start developing and coding!
The full installation profile has a complete working example including
- CommandHandlers
- EventListeners
- Domain classes
- Repositories
- ...
They are there to showcase the possibilities.
composer create-project robiningelbrecht/php-slim-skeleton:dev-master-with-examples [app-name] --no-install --ignore-platform-reqs --stability=dev
# Build docker containers
docker-compose up -d --build
# Install dependencies
docker-compose run --rm php-cli composer install
# Initialize example
docker-compose run --rm php-cli composer example:init
# Start consuming the voting example queue
docker-compose run --rm php-cli bin/console app:amqp:consume add-vote-command-queue
Now you should be able to navigate to http://localhost:8080
where you can start exploring the example application:
Pick your favorite Pokémon Result page of all "votes"