From 81de82d51c92dec9e4cd1ccb98a301f06864be99 Mon Sep 17 00:00:00 2001 From: Pavel Buchnev Date: Thu, 11 May 2023 14:41:36 +0400 Subject: [PATCH] AnnotatedBootloader should use default framework's attributes reader instead of custom one. (#71) --- src/Bootloader/AnnotatedBootloader.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Bootloader/AnnotatedBootloader.php b/src/Bootloader/AnnotatedBootloader.php index 7a791ed..ba0b45c 100644 --- a/src/Bootloader/AnnotatedBootloader.php +++ b/src/Bootloader/AnnotatedBootloader.php @@ -5,9 +5,9 @@ namespace Spiral\Cycle\Bootloader; use Cycle\Annotated; -use Spiral\Attributes\Factory; use Spiral\Attributes\ReaderInterface; use Spiral\Boot\Bootloader\Bootloader; +use Spiral\Bootloader\Attributes\AttributesBootloader; use Spiral\Tokenizer\Bootloader\TokenizerBootloader; use Spiral\Tokenizer\ClassesInterface; @@ -16,10 +16,10 @@ final class AnnotatedBootloader extends Bootloader protected const DEPENDENCIES = [ SchemaBootloader::class, TokenizerBootloader::class, + AttributesBootloader::class, ]; protected const BINDINGS = [ - ReaderInterface::class => [self::class, 'initReader'], Annotated\Embeddings::class => [self::class, 'initEmbeddings'], Annotated\Entities::class => [self::class, 'initEntities'], Annotated\MergeColumns::class => [self::class, 'initMergeColumns'], @@ -36,11 +36,6 @@ public function init(SchemaBootloader $schema): void $schema->addGenerator(SchemaBootloader::GROUP_RENDER, Annotated\MergeIndexes::class); } - private function initReader(): ReaderInterface - { - return (new Factory)->create(); - } - private function initEmbeddings(ClassesInterface $classes, ReaderInterface $reader): Annotated\Embeddings { return new Annotated\Embeddings($classes, $reader);