tebe/php-package-skeleton
Composer 安装命令:
composer require tebe/php-package-skeleton
包简介
Conrete PHP Package Skeleton using Best-Practices
README 文档
README
PHP Package Skeleton
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.
Installation
To create a new project based on this skeleton package simply run the following command:
$ 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.
Summary
The package contains the following root-level directories:
| 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:
| 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:
| 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 |
Root-Level Directories
bin/
This is the root-level directory for command-line executable files. You are free to define the structure and contents of the directory.
config/
This is the root-level directory for configuration files. You are free to define the structure and contents of the directory.
docs/
This is the root-level directory for documentation files written in Markdown.
The directory contains three subfolders:
- api: the html api documentation generated by ApiGen.
- book: the markdown documentation for your project
- html: the html documentation generated by MkDocs
You are free to extend the structure and contents of the directory.
examples/
This is the root-level directory for example files. You are free to define the structure and contents of the directory.
public/
This is the root-level directory for web server files. You are free to define the structure and contents of the directory.
resources/
This is the root-level directory for other resource files. You are free to define the structure and contents of the directory.
src/
This is the root-level directory for PHP source code files. You are free to define the structure and contents of the directory.
tests/
This is the root-level directory for test files run by PHPunit.
The directory contains at least
- bootstrap.php: The bootstrap file used by PHPUnit
You are free to define the structure and contents of the directory.
vendor/
This is the root-level directory managed by Composer.
This directory is generated and MUST NOT be touched.
Other Directories
You are free to add other root-level directories for purposes not used in this skeleton.
Root-Level Files
.apigen.yml
(TBD)
.gitignore
(TBD)
.travis.yml
(TBD)
CHANGELOG.md
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.
.composer.json
(TBD)
.composer.lock
(TBD)
CONTRIBUTING.md
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.
LICENSE
This is the root-level file indicating the licensing and copyright terms of the package contents.
This is needed by package consumers which might be in violation of copyright law when copying unlicensed intellectual property.
You are free to define the structure and contents of the file.
mkdocs.yml
(TBD)
phpcs.xml
(TBD)
phpunit.xml
(TBD)
README.md
This is the root-level file with information about the package itself. You are free to define the structure and contents of the file.
Other Files
You are free to add other root-level files for purposes not used in this skeleton.
Scripts
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.
Contributing
See CONTRIBUTING.md
tebe/php-package-skeleton 适用场景与选型建议
tebe/php-package-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19 次下载、GitHub Stars 达 3, 最近一次更新时间为 2017 年 11 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「package」 「php」 「Skeleton」 「best-practice」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tebe/php-package-skeleton 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tebe/php-package-skeleton 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tebe/php-package-skeleton 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Simple ASCII output of array data
Slim starter / Slim skeleton package to boost your development with Slim framework
Base Skeleton for Laravel Application
An awesome skeleton for modern PHP development.
Alfabank REST API integration
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-26