You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
Im not sure if is this bug or i m just doing things in wrong way.
My problem is this:
/** * @Aop\Before("methodAnnotatedWith(app\Model\Anotations\Resource)") */publicfunctionresource(Aop\JoinPoint\BeforeMethod$beforeMethod) {
$annotations = $this->annotationReader->getMethodAnnotations($beforeMethod->getTargetReflection());
//Throws Err//[Semantical Error] The annotation "@resource" in method presenter::actionDefault() was never imported.// Did you maybe forget to add a "use" statement for this annotation?
}
When i try to get annotation from generated class i get error cause use namespace\to\Resource statement for annotation is missing in generated presenter
The text was updated successfully, but these errors were encountered:
Issue is in generated class by AOP, it copies annotation of method but it dosent copy "use statement of annotation".
for example like this:
i have a class sth. like this
useApp\My\Annotations\myAnotation;
class myService {
/** @myAnotation(type=delete) */protectedfunctiondeleteResource() {
}
}
And genereated class by aop will look sth like this
//And this is generated class//use App\My\Annotations\myAnotation; <--- this "use" is missing in generated fileclass aop_genereated_class_my_service extends myService {
/** @myAnotation(type=delete) */protectedfunctiondeleteResource() {
}
}
So in result when i will try read method annotation it would throw error cause of that missing "use.
Im not sure if is this bug or i m just doing things in wrong way.
My problem is this:
When i try to get annotation from generated class i get error cause
use namespace\to\Resource statement for annotation is missing in generated presenter
The text was updated successfully, but these errors were encountered: