Skip to content

Commit 9cc1296

Browse files
committed
[fix] DataTransferObject/ib-writer
1 parent 4d05f5b commit 9cc1296

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

CHANGELOG.md

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

3+
## [4.2.2] - 2026-03-14
4+
5+
### Fixed
6+
7+
- Mark `DataTransferObject::__construct` as `final` to prevent
8+
unintended override in subclasses, aligning implementation with
9+
original design intent
10+
- Fix `@desc` annotation handling in ib-writer Markdown mode output:
11+
replaced `isset()` check with strict empty string comparison,
12+
preventing blank description lines from being written
13+
314
## [v4.2.1] - 2026-03-12
415

516
### Refactored

src/CLI/writer/Markdown.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static function contentBlocksGenerate(array $classMap, array $entry): arr
103103
}
104104
}
105105
$desc = match (true) {
106-
isset($propDocs['desc']) => $propDocs['desc'],
106+
$propDocs['desc'] !== '' => $propDocs['desc'],
107107
default => '-'
108108
};
109109
$default = '-';

src/Objects/DataTransferObject.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@
2121
*/
2222
abstract readonly class DataTransferObject extends ImmutableBase
2323
{
24+
final protected function __construct(array $data = [])
25+
{
26+
return parent::__construct($data);
27+
}
2428
}

0 commit comments

Comments
 (0)