Stolz / Vanilla

Skeleton for a vanilla PHP project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stolz/Vanilla

Skeleton for a vanilla PHP project. It does not contain any business logic other than the traditional 'Hello world'. However, several popular development tools have been installed and configured such:

For every tool there is an associated Composer script with a mnemonic name that will run the tool with sane defaults already applied.

Installation

Clone this repository

git clone git@github.com:Stolz/Vanilla.git my-project
cd my-project

Install dependencies in a development environment

composer build

Install dependencies in a production environment

composer build-prod

Usage

Start the application in the CLI

composer start-cli

Start the application in the PHP built-in web server at http://localhost:8000

composer start-web

Start the application in the interactive debugger console

composer cli

Testing tools

List available test suites and default test suites

composer test-list
composer test-list-default

Run all tests on the default suites

composer test       # no code coverage calculation
composer test-cover # code coverage calculation

Run all tests on a file

composer test tests/Unit/ExampleTest.php

Run all tests on a directory

composer test tests/Unit

Run a single test on a single file

composer test --filter testExample tests/Unit/ExampleTest.php

Run all tests on certain test suites only

composer test --testsuite Unit,Functional

Static code analysis tools

Check code with PHP linter

composer lint

Check code with CodeSniffer

composer sniff

Check code with Stan

composer stan

Check code with Mess Detector

composer mess

Fix code with CS Fixer and CodeSniffer

composer fix <pathToFile>

Misc tools

Get some stats about the code using Cloc

composer stats

Fix filesystem permissions and owner

composer secure

Delete obsolete files (editor backup files and Git merge conflicts remains)

composer clean

Lint + check standards + test

composer hook

License

The MIT License (MIT). Please see LICENSE file for more information.

About

Skeleton for a vanilla PHP project

License:MIT License


Languages

Language:Shell 66.2%Language:PHP 23.6%Language:Roff 10.2%