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

Throw exception if max depth exceeded #161

Merged
merged 1 commit into from Jul 14, 2015
Merged

Throw exception if max depth exceeded #161

merged 1 commit into from Jul 14, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jun 19, 2015

Rather than fail quietly, when the max depth is exceeded, an exception should be thrown. This tells very clearly what's wrong, and you do not spend hours searching for the fault in the schema.

@ghost
Copy link
Author

ghost commented Jun 25, 2015

@bighappyface One of the test failed because of a connection timeout while "composer self-update" :-\ Is it possible to trigger this test again?

see: https://travis-ci.org/justinrainbow/json-schema/jobs/67816242

\JsonSchema\RefResolver::$maxDepth = 0;
$resolver = new \JsonSchema\RefResolver($retriever);

$this->assertEquals($jsonSchema, $resolver->resolve($jsonSchema));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not just call the resolve method here without wrapping in an assertion? The @expectedException is the "assertion" for this test, no?

Copy link
Author

Choose a reason for hiding this comment

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

Oh, you are absolutely right. Should I change it or should I leave it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@f-go yes, please refactor the test and rebase to a single commit.

@Maks3w @alecsammon would you mind helping with a quick review?

@bighappyface
Copy link
Collaborator

@f-go Travis is all green. Thanks for the test.

@ghost
Copy link
Author

ghost commented Jul 6, 2015

@bighappyface Again the tests are failing due to a connection timeout :-/

@bighappyface
Copy link
Collaborator

@f-go the tests are green for me.

Here is a good article for rebasing/squashing down a PR. We are close to getting this PR merged in, just the squash and a peer review.

Thanks for your patience.

@ghost
Copy link
Author

ghost commented Jul 6, 2015

@bighappyface Thanks for the guide and Sorry, this was my first PR.

@bighappyface
Copy link
Collaborator

@f-go any chance to squash this PR down?

@ghost
Copy link
Author

ghost commented Jul 14, 2015

done. sorry for the delay.

@bighappyface
Copy link
Collaborator

+1

@localheinz @GrahamCampbell @Maks3w @alecsammon would you please take a look for community review?

@alecsammon
Copy link
Contributor

+1

bighappyface added a commit that referenced this pull request Jul 14, 2015
Throw exception if max depth exceeded
@bighappyface bighappyface merged commit 8dc9b9d into jsonrainbow:master Jul 14, 2015
@bighappyface
Copy link
Collaborator

@f-go good work!

@alecsammon thanks for the help 😺

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

Successfully merging this pull request may close these issues.

2 participants