Skip to content

Commit b64c050

Browse files
committed
[hotfix] 反射
1.修復 PHP 8.2 取得反射屬性名稱失敗bug
1 parent dfc9ca8 commit b64c050

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## [v3.0.3] - 2025-10-17
4+
5+
- 修復 PHP 8.2 取得反射屬性名稱失敗 bug
6+
37
## [v3.0.2] - 2025-10-17
48

59
- 重構核心邏輯優化性能

src/ImmutableBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private function constructInitialize()
113113
{
114114
$this->ref ??= self::getReflection($this);
115115
foreach ($this->ref->getAttributes() as $attr) {
116-
$set[$attr->name] = true;
116+
$set[$attr->name ?? $attr->getName()] = true;
117117
}
118118
$this->mode ??= match (true) {
119119
isset($set[DataTransferObject::class]) => 1,

0 commit comments

Comments
 (0)