Skip to content

Use AnnotationReader instead of SimpleAnnotationReader #52

@ghost

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');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions