-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
split annotations into separate files #412
Conversation
Allow the phpcr annotations to be used without modifying the app/autoload.php file. The DoctrineAnnotations does a require_once to ensure existing projects can continue to function
* @Target("METHOD") | ||
*/ | ||
final class PostLoad {} | ||
require_once('./Document.php'); |
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.
think its necessary to use __DIR__
here
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.
so like?
require_once( __DIR__ .'/Document.php');
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.
yes. though I would prefer require_once __DIR__ .'/Document.php';
Looks good, I know the things I point out were there in the original code, but seems like a good time to fix them. |
*/ | ||
public $type = 'name'; | ||
} | ||
|
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.
Empty line at end of file
@@ -21,355 +21,41 @@ | |||
|
|||
use Doctrine\Common\Annotations\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.
this use statement can be removed. i propose that we add a comment in this file that its not needed to include this anymore as autoloading works. something like
/**
* Deprecated
*
* Including this file is no longer needed, as each annotation was moved into its own file
* supporting PSR-0 compatible autoloading.
* The file is kept for backwards compatibility and will be removed in a future version of phpcr-odm.
*/
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.
added that command directly in master. thanks again @gnat42
awesome! travis passing means there are most likely no mistakes in this. did you test this in a project too, or only with the tests? |
split annotations into separate files
Registering annotations should no longer be necessary. (doctrine/phpcr-odm#412)
Allow the phpcr annotations to be used without modifying the app/autoload.php
file. The DoctrineAnnotations does a require_once to ensure existing projects
can continue to function