flightphp/skeleton-simple
Composer 安装命令:
composer require flightphp/skeleton-simple
包简介
A Simpler Flight PHP framework skeleton app to get your new projects up and running ASAP
README 文档
README
Use this skeleton application to quickly setup and start working on a new Flight PHP application. This application uses the latest version of Flight PHP v3.
This skeleton application was built for Composer. You also could download a zip of this repo, downloading a zip of the flightphp/core repo, and manually autoload the files by running require('flight/autoload.php') in your app/config/bootstrap.php file.
Installation
Run this command from the directory in which you want to install your new Flight PHP application. (this will require PHP 7.4 or newer)
composer create-project flightphp/skeleton-simple cool-project-name
Replace cool-project-name with the desired directory name for your new application.
Note: If you are installing with PHP 8.0 or above and want to use tracy-extensions be sure to run composer require --dev flightphp/tracy-extensions "^0.2" after the project is created.
Simple Setup of the Application
This is basically a single file application. The only exception to this is the config file which is still in the app/config/ directory. This is a good starting point for smaller projects or projects that you don't anticipate will grow much.
With the simple setup, there is two very import security steps to be aware of.
- DO NOT SAVE SENSITIVE CREDENTIALS TO THE
index.phpFILE. - DO NOT COMMIT ANY TYPE OF SENSITIVE CREDENTIALS TO YOUR REPOSITORY.
This is what the config file is for. If you need to save sensitive credentials (API keys, database credentials, etc), save them to the config file and then reference them in the index.php file.
More Complex Application
If you want to build a more complex application, go to the flightphp/skeleton project for a more robust setup.
Running the Application
No Dependency Setup
To run the application in development, you can run these commands
cd cool-project-name
composer start
After that, open http://localhost:8000 in your browser.
Note: If you run into an error similar to this Failed to listen on localhost:8000 (reason: Address already in use) then you'll need to change the port that the application is running on. You can do this by editing the composer.json file and changing the port in the scripts.start key.
Docker Setup
You can install Docker and use docker-compose to run the app with docker, so you can run these commands:
cd cool-project-name docker-compose up -d # or if a newer version of docker docker compose up -d
After that, open http://localhost:8000 in your browser.
Vagrant Setup
You can install Vagrant and a provider like VirtualBox and use simple run the following command to bring up an environment with PHP/MariaDB already setup based on n0nag0n/firefly
cd cool-project-name
vagrant up
After that, open http://localhost:8000 in your browser.
Do it!
That's it! Go build something flipping sweet!
flightphp/skeleton-simple 适用场景与选型建议
flightphp/skeleton-simple 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 172 次下载、GitHub Stars 达 8, 最近一次更新时间为 2024 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「microframework」 「rest」 「boilerplate」 「Simple」 「Skeleton」 「lite」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 flightphp/skeleton-simple 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 flightphp/skeleton-simple 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 flightphp/skeleton-simple 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP class to extend when building a WordPress plugin allowing you to follow smart plugin setup standards.
Anax htmlform module.
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
A lightweight, secure-by-default PHP microframework built on Slim – providing Laravel-like features (ORM, authentication, migrations, caching) without the bloat. Perfect for building REST APIs and small-to-medium PHP applications.
Laravel 5.7 Boilerplate based on Bootstrap 4 and Tabler for Backend.
统计信息
- 总下载量: 172
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-23