Comments (3)
@AliAmjid can you provide me sample project so I can take a look into it? thanks
from aop.
It's probably the same issue like this: #6
from aop.
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
use App\My\Annotations\myAnotation;
class myService {
/** @myAnotation(type=delete) */
protected function deleteResource() {
}
}
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 file
class aop_genereated_class_my_service extends myService {
/** @myAnotation(type=delete) */
protected function deleteResource() {
}
}
So in result when i will try read method annotation it would throw error cause of that missing "use.
$annotations = $this->annotationReader->getMethodAnnotations($beforeMethod->getTargetReflection());
I over-pass this by using full namspace of annotation like this
/** @App\My\Annotations\myAnootation(type=delete) */
from aop.
Related Issues (18)
- Introductions
- Advice on constructor throws Fatal Error
- Missing autoload for advised classes
- Annotations autoloader is registered too late
- Wrong usage of phpdoc generator
- Weawing doesn't support annotated targets with use statements HOT 11
- Joinpoint getter for annotation from *AnnotatedWith
- Aspect's config definition doesn't support arguments HOT 1
- Default arguments HOT 1
- Interface for proxy classes HOT 4
- Pointcuts on objects created via factory HOT 5
- New instance of aspect is created for each class HOT 2
- Parse error - compatibility with nette 2.3 HOT 2
- Kdyby/aop on presenters => autowire false skip HOT 1
- Tag release compatible with nette 2.3 HOT 1
- Release compatible with nette 2.4/ allow symfony/property-access newer versions HOT 1
- When i use AOP in presenter it takes wrong path to template HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aop.