Comments (14)
神秘新特性难道是在
php7.x
跑php8.x
的官方注解?
你想多了,PHP 8.0 的注解真的丑,暂时不会考虑去支持……
打脸了,已经支持 PHP 8.0 原生注解(原注释写法依旧支持)
from imi.
一把梭现在还差一个微信开发的包,如果有微信开发的包,毕竟做微信开发的太多太多了,如果有那就更好了
https://github.com/overtrue/wechat
from imi.
提个建议: imi v2 建议增加一套 用于DB层、微服务层 等的快捷注解模块。(从java-express大型项目参考而来),代码效果类似以下:
一、DB层相关注解写法(伪代码,下同):
// 某个DB层的微服务类
class SomeDbService {
// 在DB层服务类内部靠前部分统一书写SQL
const String QUERY_SQL = "SELECT * FROM e_some_table WHERE id=:id,status IN(:statusList)";
// 该微服务向外暴露方法,以条件对象为入参,换取结果。外部不关心具体DB的内核如何实现。
@Query(QUERY_SQL)
List<SomePO> getList(SomeQO qo);
}
// 某个微服务的接口类, 根据不同的业务架构,可能有method的方式,也可能有通过pathRoute的方式,推荐method
@Service({ methodPre=“xxx.xxx.xxx”, path="/api/route/rest/someModule/someApi/someFunc.json" })
class SomeApiServie {
// 注入DB层服务
@Inject
private SomeDbService dbService;
// 对外公开的接口方法, 也可以省略注解,默认情况Service所有的public方法均公开。
@ServiceMethod({ name = "getList" })
public List<SomeDTO> getSomeList (SomeQO qo) {
// 这里我偷下懒,用伪代码大概表示下 数据转换。
return this.dbService.getList(qo).map(po => dto);
}
}
/************************************ 华丽分割 ***************************************/
以上伪代码,只是个人从项目开发经验出发提出的期望,存在不少超出底层框架应该做的事情, 但这里是个人的一个想法建议,期望大佬V2版本里,能略参考下我的这个想法,能从框架层面尽可能的 提供 实现方面的支持, 比如DB层框架提供原生SQL注解,开发人员也能继承去扩展实现等。
期待V2, 祝 越来越好。
from imi.
加油干
from imi.
加油大神
from imi.
等我能看懂你的代码了,大佬就后继有人了
from imi.
加油
from imi.
继续一把梭
from imi.
一把梭现在还差一个微信开发的包,如果有微信开发的包,毕竟做微信开发的太多太多了,如果有那就更好了
from imi.
神秘新特性难道是在php7.x
跑php8.x
的官方注解?
from imi.
还是强烈建议查询关联的时候可以单独指定条件,给一个查询器where,page,order,limit,参考laravel,tp等框架的关联预加载
from imi.
一切准备就绪,只等良辰吉日吉时的到来。
永远相信美好的事情即将发生~
from imi.
坐等发布
from imi.
imi 2.0 正式发布
https://wenda.swoole.com/detail/107855
https://www.zhihu.com/zvideo/1404410018154770432
https://www.bilibili.com/video/BV1Bv411E7ce/
from imi.
Related Issues (20)
- 移除旧的枚举,独立旧枚举组件
- 支持 Redis 多种驱动,引入 predis
- 模型字段增加 `@getter`、`@setter` 注解,不用写方法
- 模型字段值初始化处理、保存前处理、序列化处理
- 连接池默认配置修改,更加适合实际使用场景 HOT 1
- Bean 类默认禁止递归,防止偶发报错
- 废弃注释注解,全面拥抱原生注解
- v2.1 中已经标记为 deprecated 的在 v3.0 废弃
- 重构注解类写法
- imi-pgsql的ReplaceBuilder生成update语句错误
- [3.0] 全面使用 PHP 8.1 强类型
- 优化CacheManager用法
- 热重启会重复触发AOP HOT 1
- 引入连接中心代替旧的连接管理和连接池
- 新增 PHP 8.3 测试
- 重构事件,基于类 PSR-14 的接口设计
- Fail imi-swoole-pgsql-raw with PHP 8.3 in Techempower benchmark HOT 2
- 软删除字段默认值为null查询报错 HOT 4
- 在imi3.0中建议增加框架命名的Exception HOT 1
- 使用easywechat包报错 swoole_curl_setopt(): CURLOPT_HTTP_VERSION[3] is not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imi.