-
Notifications
You must be signed in to change notification settings - Fork 363
Closed
Description
Hi
I'm currently faced an issue with $depth property in RefResolver. Also I would like to notice that we have cyclic references and this is fine for us.
Example:
$retriever = new UriRetriever();
$schema = $retriever->retrieve('file://1.json');
RefResolver::$maxDepth = 10;
$refResolver = new RefResolver($retriever);
try {
$refResolver->resolve($schema, 'file://schemas/');
} catch (JsonDecodingException $e) {}And for example we reached a depth. But we still need to resolve another file in our script:
$retriever = new UriRetriever();
$schema = $retriever->retrieve('file://2.json');
$refResolver = new RefResolver($retriever);
try {
$refResolver->resolve($schema, 'file://schemas/');
} catch (JsonDecodingException $e) {}So we already get $depth on the start of second resolving. And I don't get why you use this property as "protected static". May it would be better to use just protected property or even function scope property?
Metadata
Metadata
Assignees
Labels
No labels