Skip to content

Commit

Permalink
AnnotatedBootloader should use default framework's attributes reader …
Browse files Browse the repository at this point in the history
…instead of custom one. (#71)
  • Loading branch information
butschster authored May 11, 2023
1 parent 5e23a3d commit 81de82d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Bootloader/AnnotatedBootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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'],
Expand All @@ -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);
Expand Down

0 comments on commit 81de82d

Please sign in to comment.