greeflas / default-project
This is a default structure for PHP projects.
Installs: 184
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 5
Forks: 6
Open Issues: 4
Type:project
Requires
- php: >=7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-11-29 05:20:42 UTC
README
This is a default structure for PHP projects. With this template you can speed up the process of creating of new: open-source, proprietary, test, demo and etc. projects!
This template has basic configuration for PHPUnit and
PHP-CS-Fixer libraries, configured composer.json
with PSR-4 namespaces for source code and tests, .gitignore
with basic files and directories to exclude them from Git, changelog file
and README with cool badges :)
Installation
For creating new project based on this template just execute the following command
$ composer create-project greeflas/default-project project-name
NOTE: You can add
--no-dev
right aftercreate-project
flag if you don't want to install dev dependencies to your project
Usage
Main changes that you need to do:
-
Update
name
,description
,keywords
,authors
section of thecomposer.json
file, lines 2-4, 9-10. -
Update header template in
.php_cs.dist
file, lines 4-9. -
Update copyright in
LICENSE
file, line 3.
Other changes that you may do:
-
Change namespace for source code in
composer.json
, line 23 and for tests line 28. -
Change PHP version in
composer.json
line 16. -
Change rules for code style in
.php_cs.dist
file. -
Add some new files and directories to
.gitignore
file to exclude them from Git. -
Update readme according to your project
-
Update changelog according to your project
Code style fixer
To check the code style just run the following command
$ composer cs-check
to fix the code style run next command
$ composer cs-fix
Tests
You can run tests with composer command
$ composer tests
License
This project is released under the terms of the BSD-3-Clause license.
Copyright (c) 2018 - 2020, Volodymyr Kupriienko