Support versions v2 and v3 for nacos sdk. #7467
Merged
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.
Fixes #7461
适配高版本,修复在使用高版本时,请求api后,会提示接口弃用,导致请求处理成功了,但是在终端提示了error内容。
如果使用了nacos2.0及以上的版本时,可以在config/autoload/services.php 文件下,drivers.nacos.version 填写字符串"2","3"
例如:
可以参考例子上的drivers.nacos.version填写。如果不填写默认使用nacos v1的openapi
这个分支只是增加了v2和v3版本的内容,可以根据具体情况抽离interface增加ide提示。(nacos官方说到过,以后会更加规范openapi和grpc 这两个方式来使用。)