dev-master
9999999-devConrete PHP Package Skeleton using Best-Practices
MIT
The Requires
- php >=7.0.0
The Development Requires
php skeleton package best-practice
Conrete PHP Package Skeleton using Best-Practices
This skeleton is a concrete example package based on PDS Skeleton. It uses the standard filesystem structure as proposed by PDS and adds some additional folders and files. The main idea is to create a project using this package and then remove the parts that are not used or not useful for your project., (*2)
To create a new project based on this skeleton package simply run the following command:, (*3)
$ composer create-project -s dev tebe/php-package-skeleton myproject
Now, remove the parts from the created project that are not used or not useful for your project., (*4)
The package contains the following root-level directories:, (*5)
Directory | Description |
---|---|
bin/ |
command-line executables |
config/ |
configuration files |
docs/ |
documentation files |
examples/ |
example files |
public/ |
web server files |
resources/ |
other resource files |
src/ |
PHP source code |
tests/ |
test code |
vendor/ |
vendor files managed by composer |
The package contains the following root-level files:, (*6)
Files | Description |
---|---|
CHANGELOG.md |
a log of changes between releases |
CONTRIBUTING.md |
guidelines for contributors |
LICENSE |
licensing information |
README.md |
information about the package itself |
The package contains the following scripts:, (*7)
Script | Description |
---|---|
composer test |
run minimal testsuite with phpunit and phpcs |
composer run |
start webserver from public directory |
composer phpunit |
run unit tests |
composer phpcs |
run php code sniffer |
composer docs:api |
build API documentation |
composer docs:build |
build project documentation |
composer docs:serve |
serve project documentation |
This is the root-level directory for command-line executable files. You are free to define the structure and contents of the directory., (*8)
This is the root-level directory for configuration files. You are free to define the structure and contents of the directory., (*9)
This is the root-level directory for documentation files written in Markdown., (*10)
The directory contains three subfolders:, (*11)
You are free to extend the structure and contents of the directory., (*12)
This is the root-level directory for example files. You are free to define the structure and contents of the directory., (*13)
This is the root-level directory for web server files. You are free to define the structure and contents of the directory., (*14)
This is the root-level directory for other resource files. You are free to define the structure and contents of the directory., (*15)
This is the root-level directory for PHP source code files. You are free to define the structure and contents of the directory., (*16)
This is the root-level directory for test files run by PHPunit., (*17)
The directory contains at least, (*18)
You are free to define the structure and contents of the directory., (*19)
This is the root-level directory managed by Composer., (*20)
This directory is generated and MUST NOT be touched., (*21)
You are free to add other root-level directories for purposes not used in this skeleton., (*22)
(TBD), (*23)
(TBD), (*24)
(TBD), (*25)
This is the root-level file with a list of changes since the last release or version. You are free to define the structure and contents of the file., (*26)
(TBD), (*27)
(TBD), (*28)
This is the root-level file that describes how to contribute to the package. You are free to define the structure and contents of the file., (*29)
This is the root-level file indicating the licensing and copyright terms of the package contents., (*30)
This is needed by package consumers which might be in violation of copyright law when copying unlicensed intellectual property., (*31)
You are free to define the structure and contents of the file., (*32)
(TBD), (*33)
(TBD), (*34)
(TBD), (*35)
This is the root-level file with information about the package itself. You are free to define the structure and contents of the file., (*36)
You are free to add other root-level files for purposes not used in this skeleton., (*37)
A script, in Composer's terms, is either a PHP callbacks or any command-line executable command.
They are defined in the root composer.json
package and are useful for executing a package's custom code or package-specific commands during the Composer execution process., (*38)
See CONTRIBUTING.md, (*39)
Conrete PHP Package Skeleton using Best-Practices
MIT
php skeleton package best-practice