geekcow/fony
Composer 安装命令:
composer require geekcow/fony
包简介
Fony PHP API framework installer
关键字:
README 文档
README
A Rapid development PHP API framework
Welcome to Fony API PHP framework. The whole idea of this project is to allow the fast development of APIs or PoC over data definitions.
Basic Installation
- Initialize your project using Composer:
$ composer init
- Add the fony dependency:
$ composer require geekcow/fony
- Add the installation script into the
composer.jsonfile:
"scripts": { "setup-fony": "Geekcow\\Fony\\Installer\\Setup::init" }
- Proceed to the installation script:
$ composer run-script setup-fony
Requirements:
Currently Fony API has support for apache and mysql. However there is work in progress for nginx and multiple DBMS (via dbCore)
Also need to have installed mod_rewrite module for Apache
Additionally, need to have the following changes in your directory configuration for your virtual server in Apache:
<Directory /var/www/yourfolderlocationforyourproject>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Note we removed the Indexes option from the directory, in order to not display the tree view.
PHP Built-in server
You can now run a local instance of your built API using a shell command in your root folder
$ ./fony-serve.sh {PORT}
The default port is 8080 but you can customize your own port
If you cannot execute the shell command, you can manually use the php command to serve your own application.
You need to be aware as Fony overrides the URL requests, you need to use the custom router for the built-in PHP server.
The router is included as a hidden file as .router.php in your root folder.
$ php -S localhost:8080 .router.php
Docker
There is some work creating a docker image to host your Fony implementation. That will be available soon.
Notes:
June 2020: There is still a lot of work to do.
- Unit tests are not done
- Tooling is still in progress
- I want to add a sample of a complete implementation in the Installer.
- Wiki only has titles.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
geekcow/fony 适用场景与选型建议
geekcow/fony 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 67 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 06 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「fony」 「fony-core」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 geekcow/fony 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 geekcow/fony 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 geekcow/fony 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Core classes for fony PHP API
Authentication module for Fony PHP
A lightweight plain-PHP framework for database-backed CRUD APIs.
Modern, strongly-typed, PSR-compliant PHP client for the WeFact v2 API.
PHP SDK for the Enconvert file conversion API
统计信息
- 总下载量: 67
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2020-06-19