Skip to content

Releases: php-annotations/php-annotations

1.3.4

17 Feb 16:36

Choose a tag to compare

Fixed

  • Solved a notice about missing T_NAME_RELATIVE constant on PHP <8.0 with "phpdocumentor/type-resolver" package installed.

1.3.3

16 Jul 15:12

Choose a tag to compare

Changed

  • Ignore static analysis annotations (phpstan, psalm, codeCoverage) by [@dimtrovich].

PHP 8 compatibility

21 Jan 11:48
7e15472

Choose a tag to compare

You most likely want to move to attributes, but this release hopefully provides relief for those who wish to migrate gradually or stay with this library for other reasons.

Thanks for @jcheron for this contribution.

1.3.1

15 Jan 17:04

Choose a tag to compare

Added

  • Added missing "RangeAnnotation" to demo script by [@lsces].
  • Added "PropertyAnnotation" implementation by [@jcheron].

Changed

  • Added slash added before PHP global functions to improve namespace resolution speed by [@jcheron].

1.3.0

14 Feb 20:10

Choose a tag to compare

Added

  • Run tests on PHP 7 as well.
  • Trait property/method annotations are accessible as part of class annotations by [@benesch].
  • Allow trait introspection for annotations by [@benesch].

Fixed

  • The root namespace importing (e.g. "use PDO;") wasn't working by [@benesch].
  • Tests, that trigger notices/warnings were marked as passing by [@benesch].

1.2.0

30 Jun 14:46

Choose a tag to compare

Added

  • Added support for Composer.
  • The namespaced data types (e.g. in "@var" or "@return" annotations) are now supported.
  • Added "IAnnotationFileAware" interface to allow annotations accessing other data (e.g. namespace name) of file it was used in.
  • Added Scrutinizer CI integration.
  • Added Travis CI integration.
  • Added support for "@type" annotation.
  • Added support for "@Stop" annotation to prevent from getting annotations from parent class.
  • Added Gitter bagde.
  • Documentation moved from Wiki to ReadTheDocs.

Changed

  • Main namespace renamed from "Mindplay\Annotation" to "mindplay\annotations".
  • Annotation cache format changed. Need to delete existing cache manually.
  • Improved error message, when attempt get annotations from trait/interface is made.
  • Indexes in returned annotation array are now sequential.
  • Improved exception messages.

Fixed

  • The "type" in "@var" annotation was always lowercased.
  • The leading "" wasn't stripped from class name given to "getClassAnnotations", "getMethodAnnotations" and "getPropertyAnnotations" methods.
  • Don't attempt to get annotations from internal classes (e.g. "SplFileInfo").
  • Attempt to read annotations from non-existing class properties now ends up in exception.
  • Don't throw exception, when either of these annotations are encountered: "@api", "@source", "@Version".
  • No PHP notice is triggered, when malformed (no type) "@param" annotation is being used.
  • Inline annotations (e.g. "// @codeCoverageIgnore") were processed by mistake.

Removed

  • Standard annotation stubs (e.g. "@display", "@Format", "@Length", etc.) were removed.
  • Removed incomplete support for "@Usage" annotation inheritance.

1.1.0

14 Feb 18:39

Choose a tag to compare

Changed

  • Cache engine rewritten from scratch to increase performance.
  • Renamed protected "Annotation::_map" method into "Annotation::map" method.
  • Annotation cache format changed. Need to delete existing cache manually.
  • Don't write trailing ";" to cache files.

Removed

  • Removed APC support in caching layer.

1.0.0

14 Feb 18:38

Choose a tag to compare

Added

  • Initial release.