1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510
|
• Dec 7, 2024
5.6.1
Fix compatibility issue with phpstan 2.0 parser by @jaapio in #394
Thanks to @Furgas for reporting this issue in #393
• Nov 12, 2024
5.6.0
add support for phpstan/phpdoc-parser 2 by @xabbuh in #386
• Nov 6, 2024
5.5.1
Fixes regression introduced in 5.5.0 that triggered notices during parsing of docblocks. When the docblock contained indented lines.
• Nov 4, 2024
5.5.0
Improved method tag parameter rendering, by now the method tag parameters are correctly rendered when transforming a docblock back to string.
New supported tags:
@template
@template-covariant
@mixin
@implements & @template-implements
@extends & @template-extends
The template tags do not support all functionality needed to have full generic support as this requires some extra work. But for many situations this will already add value.
related pr's:
Fix typos by @szepeviktor in #371
Add new tags by @ahjdev in #373
Build on php 8.4 by @jaapio in #375
method parameter default value rendering by @GautierDele in #374
• May 21, 2024
5.4.1
Address multiple bugs with long tag descriptions
In the previous release a regression was introduced regarding multiline tag descriptions. Part of the description was lost and the indenting wasn't reduced as we did before 5.4. If your application relies on docblock tags and uses the descriptions it is highly recommended to update immediately. And block version 5.4.0 from the allowed versions in your composer.json
"conflict":
"phpdocumentor/reflection-docblock": "5.4.0"
Thanks to #365 by @szepeviktor and @IanDelMar
• Bugfix: resolve issue with multiline descriptions by @jaapio in #367
• Bugfix: docblock tag descriptions by @jaapio in #370
• Apr 11, 2024
5.4.0
More type support
Since the beginning of this package we have been working on our own parser. Mostly regular expressions spitting each part of a docblock and processing them separately in each tag. But since static analyzers became more popular it became a lot harder to cover all the new formats of types. In type-resolver 1.7 we already started using phpstan's parser to process types. And now in this release we also cover parts of the docblock parsing process with their parser. This will make it easier to keep up with all the new changes and allows us to support more complex type formats.
We do not support all types covered by phpstan. Generics are not fully supported on all notations, we will return an InvalidTag in those cases.
Deprecations
Param tag
We spend a lot of time to cover all the edge cases that we supported in docblocks for many years. However we also noticed that some notations do not really make sense. First notation added to the list is a @param tag without a variable.
@param MyType Here starts the description but $var is ommited
This notation is now deprecated, and support will be removed in the first release of v6.
Static factory interface
We introduced a new factory strategy to make it possible to have more complex factories for tags and keep the implementation simple. Due to this new system of creating tags we can now support external parser to cover the body of a tag to be handled. With this new system the older system of StaticFactories has become deprecated. And will be removed in v6.
Backward compatibility
We introduced all new functionality with backward compatibility in mind. There are no interface changes being made so consumers of the library will not notice anything from the internal changes. However since we introduced a large amount of new types you might notice issues depending on your implementation. Especially when your project reads the types provided by this library.
Other notable changes
• Fix PhpDoc in class Description by @WinterSilence in #317
• Optimize Description::render() by @WinterSilence in #318
• Test with multiple versions of the dependencies by @villfa in #319
• GH Actions: version update for ramsey/composer-install by @jrfnl in #321
• Send code coverage to Scrutinizer by @villfa in #320
• GH Actions: version update for various predefined actions by @jrfnl in #329
• Support reference in method tag by @villfa in #332
• Upgrade ci to standardized pipeline by @jaapio in #340
• PhpStan based tag parsing by @jaapio in #343
• Update .gitattributes by @williamdes in #344
• Test against php 8.3 by @sergiy-petrov in #356
• Fix rendering a description when it contains escaped chars and no tags by @AydinHassan in #357
• Add typeless parameter support. by @jaapio in #360
• Be more strict about type definitions on param by @jaapio in #363
• Added test for regression on invalid types by @jaapio in #364
• Oct 19, 2021
5.3.0
Added
• Get tags with type by name by @voku in #260
Fixed
• Tests: fix typo in test method name by @jrfnl in #279
• Tests: fix incorrect namespace by @jrfnl in #280
• Docblock/Tags/Author: fix typo in method docblock by @jrfnl in #283
• Tests: fix missing @covers tag by @jrfnl in #286
• Tests: mark test without assertions as such by @jrfnl in #285
• GH Actions: allow for manually triggering a workflow by @jrfnl in #281
• GH Actions: simplify Composer caching by @jrfnl in #282
• Composer: fix autoload-dev directive by @jrfnl in #289
• DocBlock/Tags/Source: remove redundant code by @jrfnl in #288
• Improve line-endings for windows. by @jaapio in #296
• Fix undefined index by @villfa in #298
• PHPUnit: update configuration by @jrfnl in #303
• Phive: upgrade used version of PHPUnit by @jrfnl in #292
• Remove deprecated StaticMethod and fix comment by @kea in #306
• Sep 17, 2020
5.2.2
Fixed
• Update Link.php #239, thanks to @Kasp42
• Param: fix phpdoc with reference hint #253, thanks to @voku
• Do not resolve types if it's not possible #254, thanks to @voku
• Aug 15, 2020
5.2.1
Fixed
• InvalidTag::flattenExceptionBacktrace() corrupts reference arguments #249, thanks to @nikic
• Fix modified backtrace #250, thanks to @jaapio
• Jul 20, 2020
5.2.0
Added
• php 8 support, #240 thanks to @DerManoMann
• improved php8 support, #242 thanks to @GrahamCampbell
• Feb 25, 2020
5.1.0
Added
• Improved psalm support, #212 thanks to @orklah
• BC check, thanks to @jaapio
Deprecated
• StaticMethod interface, #211 thanks to @orklah
Fixed
• ensure 'args' exist in trace, #202 thanks to @drupol
• don't rely on 'args' in trace, not available in 7.4, #205 thanks to @remicollet
• Restore support for long @method names, #203 thanks to @danrot and @rvanvelzen
• Feb 9, 2020
5.0.0
Added
• Support for tag specialization as described in PRS-5 using :, thanks to @jaapio
Deprecated
• restore [ to be allowed as the first character of tag body, thanks to @jaapio
• Jan 27, 2020
5.0.0-beta
Fixed
• Fix invalid return of null in standard tag factory, thanks to @jaapio
• Jan 16, 2020
5.0.0-alpha9
This patch release contains a fix to enable serialization of the refelected docblocks. Before release 5.0.0-alpha8 it was possible to serialize the
result of the docblock factory. With the introduction of the InvalidTag which contained an exception this option was broken. This new version
restores the option to serialize the docblock result. Which is recommended to do when you need to process a lot of docblocks for caching purposes.
Fixed
• Fix serialization error on InvalidTag, thanks to @jaapio
• Jan 13, 2020
5.0.0-alpha8
This patch release contains a breaking change for libraries/applications collecting exceptions from reflected docblocks. The library will now create
an InvalidTag type and adds that to the output. The InvalidTag object will contain full information about the tag that could not be processed and the
triggered exception during the processing of the tag.
Added
• InvalidTag tag. #198, thanks to @jaapio
Fixed
• Docblocks containing invalid / misused tags will now be processed, #198 thanks to @jaapio
• Dec 28, 2019
5.0.0-alpha7
This patch release fixes a BC break in the previous release of this series. Due to a change in the collection handling a different exception was
thrown when a generic type hint was read. array<string, string> this library will not support the generics notation. We just made sure that we are
behaving equally to what we did before.
Fixed
• Fixed invalid implementation on example tag #181, thanks to @mvriel
• Fixed breaking change of different exception thrown with generics, #186
• Travis build is back to green, thanks to @GrahamCampbell and @mvriel
• Dec 20, 2019
5.0.0-alpha6
Fixed
• @method Invalid method name with no arguments #174 thanks to @othercorey
• Jun 15, 2019
5.0.0-alpha5
Fixed
• Prevent invalid bodies for tags to break the whole parsing process. They are now silently ignored
• Apr 30, 2019
5.0.0-alpha4
Fixed
• Allow 0 for body of generic tag description #166, #167
• Jun 20, 2018
5.0.0-alpha3
fix init issue with example tag
• Jun 14, 2018
5.0.0-alpha2
bump type-resolver dependency to newest alpha
• Jan 31, 2018
5.0.0-alpha1
• bump to PHP 7.1 minimum
• add strict typing
• Jan 26, 2018
4.3.0
fix cs
• Nov 27, 2017
4.2.0
Added
• Added getTags method to Description
• Added removeTag method to Docblock
• Improved code analysis.
Fixed
• Improved validation of method tag.
• Aug 30, 2017
4.1.1
Fixed
• Namespace error in ExampleFinder
• Example tag is not returning its name
• Bug with @var tag in docblock #117 thanks to @Warxcell
• Aug 30, 2017
3.2.3
Fixed
• Namespace error in ExampleFinder
• Example tag is not returning its name
• Bug with @var tag in docblock #117 thanks to @Warxcell
• Aug 8, 2017
4.0.1
Fixed
• Notice when parsing annotation without description #111
• Aug 8, 2017
3.2.2
Check tag body has a value before trying to access it as an string array
• Aug 4, 2017
4.0.0
Please note that this version contains several BC breaks.
Type-resolver has some breaking changes when upgrading from 0.3 to 0.4.
And the constructor of the @see tag was changed to support urls and
fqsen. See #104 for more details.
Added
• Upgraded type-resolver to 0.4.0 to support more php 7.1 features.
• Allow see tag to url #104
Removed
• Drop php 5 support
• Drop hhvm support
• Aug 4, 2017
3.2.1
BC Hotfix release
Fixed
• Release 3.2.0 fails when parsing annotations #108
• 3.2.0 has breaking change #109
Removed
• Removed support for type resolver 0.4.0 since it contains a BC break.
• Jul 15, 2017
3.2.0
Added
• Custom tag formatter support #96
• Upgraded type-resolver to support more php 7.1 features.
Fixed
• Allow omitting method return type in method tag #103
• Mixed return types in method tag #103
• Improved author tag support #97
• Sep 30, 2016
3.1.1
Fix an unexpected behaviour with @deprecated tags
• Jun 10, 2016
3.1.0
PHP 7.1 Support
• Jun 10, 2016
3.0.3
Fix missing Example::__toString method
• Jun 6, 2016
3.0.2
Allow typed arrays in @method annotation.
• Feb 26, 2016
3.0.1
Add aliases for Context class because newer phpunit versions have a
global Context class
• Jan 28, 2016
3.0.0
Remove 3.0.x alias from composer.json before tagging 3.0.0
• Feb 3, 2015
2.0.4
Disable failing test before tagging
• Aug 9, 2014
2.0.3
Merge pull request #37 from alexkn/fix-error-display
Remove Error display at MethodTag
• Mar 28, 2014
2.0.2
Implement support for Variadic arguments
Fixes phpDocumentor/phpDocumentor2#629, in
this commit we add support for recognizing and displaying variadic
arguments as described in the Variadics RFC on Internals
(https://wiki.php.net/rfc/variadics).
This adds support for describing Variadics even before PHP 5.6, where
this feature is planned.
• Dec 5, 2013
2.0.1
Add support for Parsedown as a markdown parser
• Aug 7, 2013r
2.0.0
Merge pull request #24 from tommygnr/travis-5.5
Enable travis builds on php5.5
• Apr 16, 2013
2.0.0a3
Fixed the dot separation to match the latest PSR
(see phpDocumentor/phpDocumentor2#797)
• Dec 2, 2012
2.0.0a2
Added "scalar" as a recognized keyword (phpDocumentor/phpDocumentor2#694);
Changed the list of keywords to be static (for the purpose of reducing memory consumption);
Updated composer.lock with the latest dependencies (PHPUnit in particular).
• Nov 27, 2012
2.0.0a1
CS fixes.
• Nov 3, 2012
1.0.3
Change behaviour of @param parsing
In issue report phpDocumentor/phpDocumentor2#620 @bobef reported that when he
used just a Type as content of the @param that it would be recognized as
description instead of the Type.
According to the unit tests this is correct behaviour but after reviewing the
pattern of the output his version is more consistent. As such I have altered
the behaviour to act as following:
If only one word is found after an @param (word means white-space bounded
series of characters) then interpret that as the type and not description.
During this item several issues in unit tests were fixed and a new 'Type'
Collection was introduced that is capable of expanding types based on a given
namespace and series of aliases.
This should be re-used in phpDocumentor's Transformer as a duplication exists
there with the expanding of the Types.
Please note: the suggested format by @bobef is not valid according to the
PHPDoc Standard but is provided for convenience.
• Sep 10, 2012
1.0.2
Multiline @return statements were stripped from their newlines and indent
@return statements (and effectively others) were stripped from their newlines
and indentation. By tweaking the reflection a bit was this effect countered.
• Jul 26, 2012
1.0.1
Removed the prefixing slash in a class_exists call because the
autoloader of Composer dies on that occasionally.
• Jul 13, 2012
1.0.0
Fixing the other RegExes as well since they were also not using the
u modifier
• Jul 23, 2012
1.0.0-beta7
Namespace resolution did not work as intended
The algorithm to expand a class name into a FCQN contained several errors.
These are now gone and expansion should work as expected
• Jun 21, 2012
1.0.0-beta6
Added command to set the DocBlock onto the tags so that type expansion may
happen
• Jun 4, 2012
1.0.0-beta5
• Jun 2, 20123
1.0.0-beta4
Updated README to reflect submission to packagist
• Apr 7, 2012n
1.0.0-beta3
fixed autoloading error
• Apr 6, 2012
1.0.0-beta2
fixed error in composer file
• Apr 6, 2012
1.0.0-beta1
Imported DocBlock Reflection and transformed into a PHP 5.3 module
|