Use AnnotationReader instead of SimpleAnnotationReader
- Dominant language
- PHP
- Stars
- 270
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
Hello i wanted to ask you why don't you use AnnotationReader instead of SimpleAnnotationReader. If you will use AnnotationReader you can do this:
```
use Dingo\Blueprint\Annotation as BP;
use Dingo\Blueprint\Annotation\Method as BPM;
/**
* @BP\Resource("Test")
*/
class TestController extends Controller
{
/**
* Ask for new service
*
* @BPM\Get("/test")
* @BP\Versions({"v1"})
*/
public function test(){
}
}
```
And you can also remove this ugly code from your registerAnnotationLoader() function:
```
$this->reader->addNamespace('Dingo\\Blueprint\\Annotation');
$this->reader->addNamespace('Dingo\\Blueprint\\Annotation\\Method');
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting registerAnnotationLoader() and the current SimpleAnnotationReader usage. Compare how AnnotationReader would handle the shown Resource, Get, and Versions annotations, then verify that the redundant namespace registrations can be removed without breaking annotation loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100