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

InteractWithConfig.php中的@throws InvalidArgumentException注释需要修改 #2915

Closed
chanxiaoxi opened this issue Mar 28, 2025 · 0 comments · Fixed by #2916
Closed

InteractWithConfig.php中的@throws InvalidArgumentException注释需要修改 #2915

chanxiaoxi opened this issue Mar 28, 2025 · 0 comments · Fixed by #2916

Comments

@chanxiaoxi
Copy link

在文件 src/Kernel/Traits/InteractWithConfig.php 中,第20行的注释标注了 @throws InvalidArgumentException,但实际上代码并不会抛出这个异常,因为 Config 并没有配置 requiredKeys

这个注释会误导写单元测试时多一个 InvalidArgumentException 的测试。为了保持代码文档的准确性,建议移除或修改这个注释。

相关代码位置:
https://github.com/w7corp/easywechat/blob/6.x/src/Kernel/Traits/InteractWithConfig.php#L20

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

Successfully merging a pull request may close this issue.

1 participant