This is a skeleton application using the Zend Framework MVC layer and module systems. This application is meant to be used as a starting place for those looking to get their feet wet with Zend Framework.
Clone the repository
git clone https://github.com/mvlabs/zf3-skeleton.git
Enter in the folder
cd zf3-skeleton
Start up Docker
export UID; docker-compose up
Install dependencies with composer
docker run --rm -ti --volume $PWD:/app composer install
Check if it works
go to localhost:8080
docker run --rm -ti --volume="$PWD:/app" composer run-script development-enable
docker run --rm -ti --volume="$PWD:/app" composer run-script development-disable
docker run --rm -ti --volume="$PWD:/app" composer run-script development-status
docker run --rm -ti --volume="$PWD:/app" composer run-script test
The skeleton does not come with any QA tooling by default, but does ship with configuration for each of:
Additionally, it comes with some basic tests for the shipped
Application\Controller\IndexController
.
If you want to add these QA tools, execute the following:
$ docker run --rm -ti --volume="$PWD:/app" composer require --dev phpunit/phpunit squizlabs/php_codesniffer zendframework/zend-test
We provide aliases for each of these tools in the Composer configuration:
# Run CS checks:
$ docker run --rm -ti --volume="$PWD:/app" composer run-script cs-check
# Fix CS errors:
$ docker run --rm -ti --volume="$PWD:/app" composer run-script cs-fix
# Run PHPUnit tests:
$ docker run --rm -ti --volume="$PWD:/app" composer run-script test