Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

看到 migration 尝试兼容新版的 phinx,提一个相对比较优雅的解决方案 #104

Closed
NHZEX opened this issue Sep 19, 2023 · 3 comments

Comments

@NHZEX
Copy link
Member

NHZEX commented Sep 19, 2023

利用php-scoperphinx的核心包进行命名空间隔离打包,我觉得操作起来会更省事,并且可以消除捆绑cakephp导致的全局函数污染问题,这个框架底层声明的全局函数和tp有冲突。

初步实验成功,代码在这个仓库:https://github.com/NHZEX/think-phinx

目录 third-party-src 是原生phinx包,经过scoper处理后输出到 third-party,完成捆绑发布。

执行构建的方法:
https://github.com/NHZEX/think-phinx/blob/4b816a5bfb56433f76823455011cb615315b879c/composer.json#L73-L79

cc @yunwuxin

@yunwuxin
Copy link
Member

3.1版本已经是使用的最新版的phinx了,并且支持自动更新了

@NHZEX
Copy link
Member Author

NHZEX commented Oct 19, 2023

目前这种兼容方法我认为稳定性不足,容易受外部影响。同时cakephp污染问题是隐患 cakephp/phinx#1647

不过只要还是用phinx方案,目前完美不了,只能看何时会脱钩 cakephp/phinx#1754

@NHZEX NHZEX closed this as completed Oct 19, 2023
@yunwuxin
Copy link
Member

你肯定没仔细看 只是在dev的时候依赖phinx 然后把文件复制到项目中 并不会加载cakephp/phinx的依赖项

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants