-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added ModelRewriteInheritanceVisitor
to rewrite the model inheritance for command gen:model
.
#1328
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你要不先测试一下看看。。。 我感觉如果你模型里写了些新方法,这么修改,会导致新方法被覆盖 |
嗯,这个是需要考虑,我再看看 |
已更新代码,并已测试 php bin/hyperf.php --path=app/Model --uses="App\Model\Model" --inheritance=Model gen:model test
php bin/hyperf.php --path=app/Model --uses="App\Model\Model as TestModel" --inheritance=TestModel gen:model test
php bin/hyperf.php --path=app/Model --uses="App\Model\MyModel" --inheritance=MyModel gen:model test |
@kakuilan 你拉一下代码,然后把这个 Visitor 配置加上,再测试一下你的这几种情况,看看是否可以重写父类 |
limingxinleo
changed the title
fix 修复命令行创建模型,当模型类已存在时,重新指定uses继承其他父类,而该模型没有更新新父类的问题
Added Feb 11, 2020
ModelRewriteInheritanceVisitor
to rewrite the model inheritance for command gen:model
.
这个 changelog 怎么覆盖了? |
暂时被我删了。。我怕其他pr又修改了changelog,又要处理一次冲突。。合并代码前,加上
发自我的iPhone
…------------------ Original ------------------
From: 黄朝晖 <notifications@github.com>
Date: Tue,Feb 11,2020 9:38 PM
To: hyperf/hyperf <hyperf@noreply.github.com>
Cc: 李铭昕 <l@hyperf.io>, Comment <comment@noreply.github.com>
Subject: Re: [hyperf/hyperf] Added `ModelRewriteInheritanceVisitor` to rewrite the model inheritance for command `gen:model`. (#1328)
这个 changelog 怎么覆盖了?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
huangzhhui
approved these changes
Feb 11, 2020
@limingxinleo 测试没有问题,感谢优化代码 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复命令行创建模型,当模型类已存在时,重新指定uses继承其他父类,而该模型没有更新新父类的问题