Skip to content

Commit 41b3703

Browse files
committed
Update to phpdocumentor/reflection-docblock ^6
The current major, unlocked by the PHP 8.4 requirement, along with phpdocumentor/type-resolver 2.0. No API changes were needed; the exporter now also trims tag descriptions, which the legacy parser always did and which v6's tokenizer no longer does for @throws. Corpus differences against the v5 build are rendering fidelity improvements: generic types print with a space after commas as written in source (`array<string, string>`), `mixed[]` is no longer collapsed to `array`, complex nested generics in @PARAM tags parse into proper types/variable fields instead of leaking markup into tag content, and multi-line emphasis markers are preserved (`*Never*` renders as `<em>Never</em>` instead of the mangled `Never*`).
1 parent 8c4484c commit 41b3703

3 files changed

Lines changed: 29 additions & 25 deletions

File tree

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"php" : "^8.4",
2424
"composer/installers" : "^2.0",
2525
"nikic/php-parser" : "^5.7",
26-
"phpdocumentor/reflection-docblock" : "^5",
26+
"phpdocumentor/reflection-docblock" : "^6",
2727
"erusev/parsedown" : "~1.7",
2828
"scribu/lib-posts-to-posts": "dev-master@dev",
2929
"scribu/scb-framework" : "dev-master@dev",

‎composer.lock‎

Lines changed: 25 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/runner.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ function export_tag( $tag ) {
287287
$description = (string) $tag;
288288
}
289289

290+
// The legacy parser trimmed all tag descriptions.
291+
$description = trim( $description );
292+
290293
if ( $tag instanceof Tags\Link && '' === $description ) {
291294
// The legacy parser used the link itself as the description.
292295
$description = $tag->getLink();

0 commit comments

Comments
 (0)