This template is based on my past history with developing MediaWiki software, and largely based on MediaWiki's own repository template for PHP projects.
However, this project can be used for any PHP project, not just MediaWiki.
I hope this template can be useful for you!
This repository makes it easier to develop a PHP application or library by providing a basic project structure, continuous integration (CI) configuration, and other tools.
- PHP 8.3+ support
- Unit testing with PHPUnit (official website)
- Validates PHP syntax with php-parallel-lint
- Lint and auto-format PHP code with PHP CodeSniffer (PHPCS)
- Continuous integration with GitHub Actions
- auto-generated documentation with phpDocumentor, GitHub Pages
- Composer dependency updates auto-managed with Dependabot
Choose a method:
- GitHub UI: Press the "Use this template" button in the top-right corner of this page.
- GitHub CLI: Install GitHub CLI. Then run one of the following:
gh repo create --template php-lights/php --public --clone {{repository}} # clone as public gh repo create --template php-lights/php --private --clone {{repository}} # clone as private
Using your text editor or IDE, find-and-replace the following placeholders:
author/package
: Replace with your own author and package name.php-lights/php
: Replace with the name of your GitHub repository.Neoncitylights\ExampleLibrary
: Replace with your own namespace.Neoncitylights\\ExampleLibrary\\
: Replace with your own namespace (escaped version using double backslashes).
Delete this README.md
, and rename LIBRARY.md
to README.md
.
Tool | File | Documentation |
---|---|---|
Composer package | composer.json |
docs, website, repo |
PHPCS (formatter + linter) | .phpcs.xml |
docs, repo |
PHPUnit (unit testing) | phpunit.xml.dist |
docs, website, repo |
phpdoc (documentation generator) | phpdoc.dist.xml |
docs, website, repo |
Dependabot | .github/dependabot.yml |
docs, website |
- Quick start to reStructuredText (
.rst
), markup language used for phpDocumentor
This software is licensed under the MIT license (LICENSE
or http://opensource.org/licenses/MIT).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.