Skip to content
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

Updated for AnnotationBuilder. #233

Merged
merged 14 commits into from
Jun 11, 2013
Merged

Updated for AnnotationBuilder. #233

merged 14 commits into from
Jun 11, 2013

Conversation

spiffyjr
Copy link

@spiffyjr spiffyjr commented Jun 5, 2013

  • Made it possible to use the relative path to the targetEntity by hooking into the class metadata.
  • Options are merged instead of overridden so you can do things like @Form\Options({"property":"name"}) to set options for the EntityObject's.
  • Added relevent tests.

Kyle Spraggs added 5 commits June 5, 2013 04:11
* Made it possible to use the relative path to the targetEntity by hooking into the class metadata.
* Options are merged instead of overridden so you can do things like @Form\Options({"property":"name"}) to set options for the EntityObject's.
* Added relevent tests.
@spiffyjr
Copy link
Author

spiffyjr commented Jun 6, 2013

@Ocramius This should be ready for merge once the tests are passing (coding standards).

@spiffyjr
Copy link
Author

spiffyjr commented Jun 7, 2013

Don't merge yet - noticed this doesn't work with non-annotation mappings (xml/yaml). Going to see if I can work around that.

@spiffyjr
Copy link
Author

Test pass - status set to READY.

*/
public function setAnnotationManager(AnnotationManager $annotationManager)
public function getObjectManager()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the getter required?

break;
/** @var \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata */
$metadata = $event->getParam('metadata');
if ($metadata && $metadata->isAssociationInverseSide($event->getParam('name'))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

directly return the result of this conditional instead of using an if

$inputSpec = $event->getParam('inputSpec');
$elementSpec = $event->getParam('elementSpec');

if ($metadata['type'] & ClassMetadataInfo::TO_MANY) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - these checks can be done via $classMetadata->isCollectionValuedAssociation($field)

@ghost ghost assigned Ocramius Jun 11, 2013
Ocramius added a commit that referenced this pull request Jun 11, 2013
[READY] Updated for AnnotationBuilder.
@Ocramius Ocramius merged commit 898713c into doctrine:master Jun 11, 2013
@spiffyjr spiffyjr deleted the pr/patch-1 branch June 11, 2013 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhacement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants