Skip to content

Releases: sagittaracc/decorator

v3.0.1

22 Feb 07:49
Compare
Choose a tag to compare
  • Refactor

v3.0.0

22 Feb 07:36
Compare
Choose a tag to compare
  • Изменил логику применения декораторов класса (по аналогии с Python)

v2.0.1

21 Feb 13:54
Compare
Choose a tag to compare
  • Выпилил костыль ClassWrapper для property. Теперь все декораторы PythonDecorator можно применять и к методами класса и к его свойствам

v2.0.0

21 Feb 13:29
Compare
Choose a tag to compare
  • Переработка враппера декоратора. Расширение декоратора на свойства класса. Обобщение декоратора на метод

v1.14.1

21 Feb 11:44
Compare
Choose a tag to compare

PythonDecorator:

  • getMethod() -> getPropertyOrMethod()

v1.13.1

21 Feb 08:35
Compare
Choose a tag to compare

ClassWrapperInterface -> ClassWrapper

v1.12.5

16 Feb 21:35
Compare
Choose a tag to compare
  • Закончил реализацию DI контейнера здесь

v1.12.4

15 Feb 12:37
Compare
Choose a tag to compare

Why would anyone need a DI container?
You can inject dependencies thru php attributes attached to class properties like this:

class StoreService
{
    use Decorator;

    #[GeolocationService]
    private $geolocationService;

    public function getStoreCoordinates() {
        return $this->_geolocationService->getCoordinatesFromAddress();
    }
}

instead of

class StoreService
{
    private $geolocationService;

    function __construct(GeolocationService $geolocationService)
    {
        $this->geolocationService = $geolocationService;
    }

    public function getStoreCoordinates() {
        return $this->geolocationService->getCoordinatesFromAddress();
    }
}

v1.12.3

14 Feb 08:27
Compare
Choose a tag to compare
  • Add fast ORM implementation by using decorators only. See here

v1.12.2

12 Feb 09:45
Compare
Choose a tag to compare
  • Применение только декораторов класса