GithubHelp home page GithubHelp logo

huaweicloud-sdk-php-obs's Introduction

Version 3.23.11

新特性:

  1. 新增对象标签相关接口;

资料&demo:

修复问题:

  1. 优化部分代码;

Version 3.23.5

新特性:

  1. 新增自定义域名相关接口;
  2. 新增上传回调参数;

资料&demo:

修复问题:

  1. 优化部分代码;

Version 3.22.6

新特性:

资料&demo:

修复问题:

  1. 修复三方依赖冲突的问题;

Version 3.19.9

新特性:

资料&demo:

修复问题:

  1. 修复OBS请求时,Host偶尔被异常替换的问题;
  2. 修复特殊场景下,日志模块无法正常工作的问题;
  3. 修复header中的正常特殊字符被url编码的问题;

Version 3.1.3 新特性:

资料&demo:

修复问题:

  1. 修复连接OBS服务超时时,解析request-id报错导致异常信息被截断的问题;

huaweicloud-sdk-php-obs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

huaweicloud-sdk-php-obs's Issues

psr/log版本太低了

psr/log 还是1.0.2的版本 这是个版本还是16年的。连laravel5.5这种好几年前的框架都没法集成。请升级psr/log到最新1.1.0的。

Deprecation Warning in PHP 7.4+ due to Dynamic Property Creation

Hello,

I am currently using the huaweicloud-sdk-php-obs SDK in a PHP 7.4+ environment and encountered a deprecation warning when using the CheckoutStream class.

The exact warning is:

PHP Deprecated: Creation of dynamic property Obs\Internal\Common\CheckoutStream::$stream is deprecated in /home/wp-content/plugins/dreams-huawei-obs-uploader/huaweicloud-sdk-php-obs/Obs/Internal/Common/CheckoutStream.php on line 31

Even though the $stream property is explicitly declared in the CheckoutStream class, the warning is being triggered. I suspect it might be related to how the $stream property is accessed or modified via the StreamDecoratorTrait from the GuzzleHttp\Psr7 package. It could be that the property is being accessed or modified in a way that's deprecated in PHP 7.4+.

Could you please investigate this issue and provide a fix or workaround? This deprecation warning could turn into a breaking change in future versions of PHP, and it's important for us to keep our environment up-to-date with the latest PHP version for security and performance reasons.

Thank you in advance for your time and help!


标题: 在 PHP 7.4+ 中因动态属性创建而出现弃用警告

正文:

您好,

我目前在 PHP 7.4+ 环境中使用 huaweicloud-sdk-php-obs SDK,并在使用 CheckoutStream 类时遇到了一个弃用警告。

准确的警告是:

PHP 已弃用:在 /home/wp-content/plugins/dreams-huawei-obs-uploader/huaweicloud-sdk-php-obs/Obs/Internal/Common/CheckoutStream.php 的第 31 行,创建动态属性 Obs\Internal\Common\CheckoutStream::$stream 已被弃用。

尽管 $stream 属性在 CheckoutStream 类中明确声明了,但是仍然触发了警告。我怀疑这可能与 $stream 属性通过 GuzzleHttp\Psr7 包中的 StreamDecoratorTrait 被访问或修改的方式有关。可能是以一种在 PHP 7.4+ 中已被弃用的方式访问或修改了属性。

您能否请调查此问题并提供解决方案或解决方法?这个弃用警告可能在未来的 PHP 版本中变成一个破坏性的变化,而我们需要保持我们的环境与最新的 PHP 版本同步,以保证安全性和性能。

提前感谢您的时间和帮助!

你们能把代码写得再复杂一点吗?

能把SDK写得复杂到无法调试, 也是牛逼啊!
一个Api请求套了一层一层又一层再一层
一个异常能抛出九千多行
一个配置数组能超过一千行
你是IO没有开销? CPU不用电?

难怪你们加班这么严重, 你们简直就是活该加班加到死

copyPartAsync has exception

Exception message:
#exceptionType: "client"
#exceptionCode: "InvalidArgument"
#exceptionMessage: "The x-amz-copy-source-range value must be of the form bytes=first-last where first and last are the zero-based offsets of the first and last bytes to copy"

建议将 Guzzle Http Client 作为一个选项暴露出来

ObsClient.php 里,又是 chooseHandler, 又是 createHttpClient 但实际上这两个方法,调用方并不能参与进去做一些深度的定制,建议将 Guzzlle Client 实例作为一个可选参数传入。

主要是以下几个原因:

  • 可以深度定制 guzzle,比如为 Guzzle 指定了某些中间件用于记录请求,或者请求速度分析等等。
  • 可以替换 guzzle 底层的实例,比如 handler 切换到 Hyperf 框架的 Hyperf\Guzzle\CoroutineHandler 或者适配 Amphp 的 \AmpGuzzle\HttpClientHandler,这样可以让 ObsClient 在这类协程客户端中利用上协程的并发无阻塞特性。
  • 某些情况出于资源占用考虑,会全局共用一个 guzzle 实例,暴露出来则可以实现这一点。

改动不大,但意义深远。

另外提一点建议,sdk 的实现太过复杂了,感觉深受 Java **屠毒。

第一个能把我气到的sdk

居然是华为的,重新让我认识了华为。有可能华为实在不重视php吧。最后还是自己封装接口写吧。

包版本问题

你好,请问能写包的版本时,可以不要给版本写死吗,因为项目中依赖的都是最新的包,像monolog/monolog | psr/log项目中用的都是最新版本,后续再安装您这个包就会出问题。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.