Cookiecutter template to kickstart new PHP projects.
- Automated Composer Setup
- Testing and linting setup with PHPStan, PHPUnit, Rector, PHP CS Fixer, Roave BC Check, and Composer Normalize (
composer test:all) - Ready-to-go GitHub Actions
$ pip install -U cookiecutter
# Or, on a mac with Homebrew
$ brew install cookiecutterGenerate a new PHP project:
$ cookiecutter gh:jeromegamez/cookiecutter-phpUse ant to generate test projects locally (non-interactive):
$ ant -f build.xml generate-test-project
$ ant -f build.xml generate-test-project-fixtureGenerated output:
tests/generated/my-library(fromgenerate-test-project, using defaults fromcookiecutter.json)tests/generated/example-tools-library(fromgenerate-test-project-fixture, using explicit fixture values)
Each target cleans tests/generated before generating output.
If you use this (or other) Cookiecutters a lot, you can override the defaults by having
a .cookiecutterrc file in your home directory:
default_context:
full_name: "My full name"
email: "me@example.com"
github_username: "mygithubusername"
github_repository_owner: "mygithubusername-or-org"
abbreviations:
php: https://github.com/jeromegamez/cookiecutter-phpgithub_repository_owner defaults to github_username and can be used when the repository lives under an organization while sponsor/funding metadata should still use your personal username.
You can find more information at https://cookiecutter.readthedocs.io/en/latest/advanced/user_config.html