File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+ ## [ v3.0.1] - 2025-10-16
4+
5+ - 新增測試情境
6+ - 簡化底層代碼
7+
38## [ v3.0.0] - 2025-10-13
49
510### ⚠️ 重大變更
2631- 建立完整測試(覆蓋率 100%),覆蓋所有核心行為與例外情境
2732
2833### 🧰 開發與持續整合
34+
2935- 新增 phpunit 自動化測試及產出報告 #範圍涵蓋 PHP 8.1 ~ 8.4
3036- 新增 FOSSA 相依與安全性檢測
3137- 新增 SONAR 品質檢測
Original file line number Diff line number Diff line change 2222
2323一個專為 ** 不可變物件(Immutable Object)** 設計的抽象基底類別,適用於 ** DTO(Data Transfer Object)** 、** VO(Value Object)** 等需要「一次初始化、不可更改」的場景。
2424
25- 此類別強調資料的** 不可變性(Immutability)** 、** 類型安全(Type Safety)** ,並可透過建構式快速初始化、內建型別自動轉換機制、淺層複製 (` with ` ) 以及自動序列化支援 (` toArray ` , ` jsonSerialize ` )。
25+ 此類別強調資料的** 不可變性(Immutability)** 、** 類型安全(Type Safety)** ,並可透過建構式快速初始化、內建型別自動轉換機制、淺層複製 (` with ` ) 以及序列化支援 (` toArray ` )。
2626
2727---
2828
3333- ✅ ** 支援 ` ReflectionUnionType ` 型別解析**
3434- ✅ ** 遞迴初始化巢狀 ImmutableBase 子類**
3535- ✅ ** 支援 ` with([...]) ` 複製模式,包含嵌套物件更新**
36- - ✅ ** 自動 ` toArray() ` 與 ` jsonSerialize() ` **
3736- ✅ ** 架構模式標註:` #[DataTransferObject] ` 、` #[ValueObject] ` 、` #[Entity] ` (必須)**
3837- ✅ ** 陣列自動實例化:` #[ArrayOf] ` 含類型驗證**
3938- ✅ ** 強制屬性訪問控制與型別安全**
4342## 測試
4443
4544### 單元測試
45+
4646``` bash
4747vendor/bin/phpunit tests
4848```
49+
4950### 效能測試
51+
5052``` bash
5153vendor/bin/phpbench run
5254```
@@ -272,10 +274,9 @@ $user = $user->with([
272274
273275---
274276
275- ### 自動 ` toArray() ` 與 ` jsonSerialize ()`
277+ ### ` toArray() `
276278
277279- 支援嵌套 ImmutableBase 物件的遞迴序列化
278- - ` json_encode() ` 等同於 ` toArray() ` 的輸出
279280
280281---
281282
You can’t perform that action at this time.
0 commit comments