Skip to content

Commit 894ebe1

Browse files
authored
Support ignoreAnnotations for Annotation Reader. (#4880)
1 parent abc6a7f commit 894ebe1

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(protected string $file)
4040
{
4141
$this->ast = new Ast();
4242
$this->config = $this->initScanConfig();
43-
$this->reader = new AnnotationReader();
43+
$this->reader = new AnnotationReader($this->config->getIgnoreAnnotations());
4444
$this->filesystem = new Filesystem();
4545
}
4646

src/Watcher.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Hyperf\Watcher;
1313

1414
use Hyperf\Contract\ConfigInterface;
15-
use Hyperf\Di\Annotation\AnnotationReader;
1615
use Hyperf\Di\ClassLoader;
1716
use Hyperf\Engine\Channel;
1817
use Hyperf\Utils\Codec\Json;
@@ -37,8 +36,6 @@ class Watcher
3736

3837
protected array $autoload;
3938

40-
protected AnnotationReader $reader;
41-
4239
protected ConfigInterface $config;
4340

4441
protected Standard $printer;
@@ -53,7 +50,6 @@ public function __construct(protected ContainerInterface $container, protected O
5350
$this->filesystem = new Filesystem();
5451
$json = Json::decode($this->filesystem->get(BASE_PATH . '/composer.json'));
5552
$this->autoload = array_flip($json['autoload']['psr-4'] ?? []);
56-
$this->reader = new AnnotationReader();
5753
$this->config = $container->get(ConfigInterface::class);
5854
$this->printer = new Standard();
5955
$this->channel = new Channel(1);

0 commit comments

Comments
 (0)