Giter Site home page Giter Site logo

Comments (3)

dakorpar avatar dakorpar commented on July 30, 2024

@AliAmjid can you provide me sample project so I can take a look into it? thanks

from aop.

AliAmjid avatar AliAmjid commented on July 30, 2024

It's probably the same issue like this: #6

from aop.

AliAmjid avatar AliAmjid commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.