-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Implementation of annotation getters for the ClassField joinpoint (#387) #388
[Feature] Implementation of annotation getters for the ClassField joinpoint (#387) #388
Conversation
Instead of those nasty tests, this is much better, we can introduce interface that should provide access to annotations. Much cleaner. |
Thanks for PR ) Should we drop support for 2.x? And concentrate support only on new 3.x (aka master)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix years in file docBlocks, all other stuff is correct
/* | ||
* Go! AOP framework | ||
* | ||
* @copyright Copyright 2014, Lisachenko Alexander <[email protected]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Year isn't correct :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did copy/paste of docBlock.
Different classes have different years, I checked.
To be honest - I am ok for having author and/or copyright annotation, but year in docblock does not have any particular value, we could just remove it - it poses only unnecessary maintenance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest - I am ok for having author and/or copyright annotation, but year in docblock does not have any particular value, we could just remove it - it poses only unnecessary maintenance.
Looks reasonable. Accepted, will do this for the master branch.
/** | ||
* Provides access to annotations from reflection class/property/method. | ||
*/ | ||
interface AnnotationAccess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for interface extraction refactoring
src/Aop/Support/AnnotationAccess.php
Outdated
interface AnnotationAccess | ||
{ | ||
/** | ||
* Gets a annotation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: aN annotation
, also in the child class
|
||
use Go\Aop\Support\AnnotationAccess; | ||
|
||
class ClassFieldAccessTest extends \PHPUnit_Framework_TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for the test case
AppVeyor is not working, crappy Windows shit... Couldn't install PHP7.2.1 from Chokolatey recipe due to unknown bug with KB packet. |
PHP 5.x seams dead/dying, and it is easier for us to maintain only one version. |
The inspection completed: No new issues |
Merged into master, thanks! |
NOTE: Due to singleton implementation of Kernel and access to Reader is done via service locator pattern and static access, it is hard to do a proper testing via injecting mock.
But, at least these tests would detect missing presence of methods which will warn us that we are introducing BC.