Skip to content

v2.1.0

Latest
Compare
Choose a tag to compare
@olvlvl olvlvl released this 17 Jun 10:46

New Requirements

None

New features

  • #38 Attributes are now collected from interfaces and traits as well as classes. (@olvlvl)

  • #37 Parameter attributes are now collected. Use the method findTargetParameters() to find target parameters, and the method filterTargetParameters() to filter target parameters according to a predicate. (@staabm @olvlvl)

  • #39 The InheritsAttributes attribute can be used on classes that inherit their attributes from traits, properties, or methods, but don't use attributes themselves, and were previously ignored by the collection process. (@olvlvl)

    trait UrlTrait
    {
        #[UrlGetter]
        public function get_url(): string
        {
            return '/url';
        }
    }
    
    #[InheritsAttributes]
    class InheritedAttributeSample
    {
        use UrlTrait;
    }
  • #44 The collector automatically scans autoload paths of the root composer.json for a zero-configuration experience. (@olvlvl)

Deprecated Features

None

Backward Incompatible Changes

None

Other Changes

#35 The collector runs as a command to avoid clashes between packages used by Composer and those used by the application, such as incompatible signatures between different versions of the PSR Logger. (@olvlvl)

Added use cases for incompatible signature, Symfony, and Laravel.