[BUG] Hyperf\Crontab\Strategy->Executor->floatDiffInRealSeconds deprecate

未關閉 適合新手
#7,813 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

@sneycampos 已經在處理了。

開始於 2026年10月22日。

  • #7829 來自 @sneycampos —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
75/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
php
領域
backend

研究方向

從 Hyperf\Crontab\Strategy\Executor 開始,找出 issue 中提到的 floatDiffInRealSeconds 呼叫。檢查周圍的日期比較如何被使用,然後根據相關的 crontab 行為驗證替換為 diffInUTCSecond。完成的標準是已不再使用已棄用的方法,且警告不再出現在 log 中。

由索引模型根據 Issue 內容生成。

描述

bug

Writing to the log file failed: Use the method diffInUTCSecond instead to make it more explicit about what it does.
On next major version, "float" prefix will be removed (as all diff are now returning floating numbers) and "Real" methods will be removed in favor of "UTC" because what it actually does is to convert both dates to UTC timezone before comparison, while by default it does it only if both dates don't have exactly the same timezone (Note: 2 timezones with the same offset but different names are considered different as it's not safe to assume they will always have the same offset).
The exception occurred while attempting to log: [18.94]

主要語言
PHP
星號
6.9k
分支
1.3k
平均合併
1 小時 17 分鐘
30 天內合併 PR
3

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

hyperf/hyperf 的其他 Issue

查看 hyperf/hyperf 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。