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

Fixed processing of cyclic types that points to each other #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VEnis
Copy link

@VEnis VEnis commented Jan 16, 2014

In the class BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationClassLoader in method loadType we have recursive call

foreach ($loaded['properties'] as $name => $property) {
    $complexType->add($name, $this->loadType($property->getValue()), $property->isNillable());
}

But saving of the processed complex type is done after recursive call.

$this->typeRepository->addComplexType($complexType);

If in the annotations we have cyclic references then we have infinite loop while check

if (!$this->typeRepository->hasType($phpType)) {

is not work. When we moving line

$this->typeRepository->addComplexType($complexType);

before recursive call - it works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant