-
-
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
Added workaround for #327 #328
Conversation
*/ | ||
$metadata = $args->getClassMetadata(); | ||
|
||
if (1 === preg_match(sprintf('/.+(%s)$/', AspectContainer::AOP_PROXIED_SUFFIX), $metadata->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.
Expected 1 newline after opening brace; 2 found
{ | ||
$traits = $this->getTraits($metadata->name); | ||
|
||
foreach ($traits as $trait) { |
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.
Expected 1 newline after opening brace; 2 found
/** | ||
* @var \ReflectionProperty $property | ||
*/ | ||
foreach ($trait->getProperties() as $property) { |
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.
Expected 1 newline after opening brace; 2 found
/** | ||
* @var ClassMetadata $metadata | ||
*/ | ||
foreach ($metadatas as $metadata) { |
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.
Expected 1 newline after opening brace; 2 found
} | ||
} | ||
|
||
trait SimpleTrait |
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.
Each class must be in a file by itself
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 can not fix this, except to pull out to separate files - however, this class is used only for this test suite, so usual practice is to place it inline within test suite.
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.
We can ignore this, ok
class Entity__AopProxied | ||
{ | ||
use SimpleTrait; | ||
} |
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.
Expected 1 blank line at end of file; 2 found
} | ||
|
||
|
||
class Entity__AopProxied |
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 can not fix this, except to pull out to separate files - however, this class is used only for this test suite, so usual practice is to place it inline within test suite.
Class name must stay same, that is clear.
* | ||
* Support for weaving Doctrine entities. | ||
* | ||
* @package Go\Bridge\Doctrine |
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.
Please, drop this auto-generated tag.
$metadata->isMappedSuperclass = true; | ||
$metadata->isEmbeddedClass = false; | ||
$metadata->table = []; | ||
$metadata->customRepositoryClassName = null; |
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.
it would be nice to have variables aligned.
} | ||
|
||
|
||
class Entity__AopProxied |
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.
- Each trait must be in a file by itself
- Class name
Entity__AopProxied
is not in camel caps format
private $mappedField; | ||
} | ||
|
||
class Entity__AopProxied |
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.
- Each trait must be in a file by itself
- Class name
Entity__AopProxied
is not in camel caps format
Squashed and merged, thanks! |
As discussed, here is the pull request with Doctrine entities weaving workaround. (see #327)
getTraits
is private, so it would be very hard to provide it. In original library, code has 100% code coverage, but I didn't wanted to add more dependencies)TODO: