flightphp/core
Composer 安装命令:
composer require flightphp/core
包简介
Flight is a fast, simple, extensible framework for PHP. Flight enables you to quickly and easily build RESTful web applications. This is the maintained fork of mikecao/flight
README 文档
README
What is Flight?
Flight is a fast, simple, extensible framework for PHP. Flight enables you to quickly and easily build RESTful web applications. Flight also has zero dependencies.
Basic Usage
First install it with Composer
composer require flightphp/core
or you can download a zip of this repo. Then you would have a basic index.php file like the following:
// if installed with composer require 'vendor/autoload.php'; // or if installed manually by zip file // require 'flight/Flight.php'; Flight::route('/', function () { echo 'hello world!'; }); Flight::start();
Is it fast?
Yes! Flight is fast. It is one of the fastest PHP frameworks available. You can see all the benchmarks at TechEmpower
See the benchmark below with some other popular PHP frameworks. This is measured in requests processed within the same timeframe.
| Framework | Plaintext Requests | JSON Requests |
|---|---|---|
| Flight | 190,421 | 182,491 |
| Yii | 145,749 | 131,434 |
| Fat-Free | 139,238 | 133,952 |
| Slim | 89,588 | 87,348 |
| Phalcon | 95,911 | 87,675 |
| Symfony | 65,053 | 63,237 |
| Lumen | 40,572 | 39,700 |
| Laravel | 26,657 | 26,901 |
| CodeIgniter | 20,628 | 19,901 |
Skeleton App
You can also install a skeleton app. Go to flightphp/skeleton for instructions on how to get started!
Documentation
We have our own documentation website that is built with Flight (naturally). Learn more about the framework at docs.flightphp.com.
Community
Chat with us on Matrix IRC #flight-php-framework:matrix.org
Upgrading From v2
If you have a current project on v2, you should be able to upgrade to v3 with no issues depending on how your project was built. If there are any issues with upgrade, they are documented in the migrating to v3 documentation page. It is the intention of Flight to maintain longterm stability of the project and to not add rewrites with major version changes.
Requirements
Important
Flight requires PHP 7.4 or greater.
Note: PHP 7.4 is supported because at the current time of writing (2024) PHP 7.4 is the default version for some LTS Linux distributions. Forcing a move to PHP >8 would cause a lot of heartburn for those users.
The framework also supports PHP >8.
Roadmap
To see the current and future roadmap for the Flight Framework, visit the project roadmap
License
Flight is released under the MIT license.
flightphp/core 适用场景与选型建议
flightphp/core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 72.75k 次下载、GitHub Stars 达 2.87k, 最近一次更新时间为 2024 年 01 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 flightphp/core 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 flightphp/core 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 72.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2874
- 点击次数: 20
- 依赖项目数: 19
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-02