Basic template for small-sized PHP Projects with few most used utils with as few dependency as possible.
- Click on "Use this template" button on DJTommek/php-template Github repository page.
- Fill up necessary details as you creating new repository
- Run
composer install - Open
index.phpin browser
ℹ Note: composer install and composer update will automatically generate data/config.local.php if not exists. You can change and override default values which are extended from src/libs/DefaultConfig.php
composer test
Contains only one dummy test to show, how to create more tests. Quick info:
- folder structure should reflect
/src/libsas much as possible - class names must have same name as file name:
class DummyTest->DummyTest.php - file name and classnames must contain suffix Test:
DummyTest.phpandclass DummyTest - methods has to have prefix test:
function testDummyVariable().
See phpunit.de website for detailed info.
composer phpstan
Finding errors in app without running it and code style keeper.
See phpstan.org website for more info.