You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So basically, problem we encountered is with schemas, which have some records declared in one default namespace, and then, the record is also used in another. Library seems to parse it without errors, but after cacheing it (AvroSchema is casted to string in registry library) , and then reading this schema again it throws errors. For example schema is loaded without any problems with initial call to schema registry:
In above example we can see ReasonCodeCommonData declared in default namespace org.nrf_arts.ixretail.namespace.avro.
It is also used in com.payment.data.repository.avro.SettleTenderPickupBase with full qualified name org.nrf_arts.ixretail.namespace.avro.ReasonCodeCommonData.
Now when we will cast $schema to string:
// $schema is object of type \AvroSchema from avro-php
(string) $schema
and above schema is wrong and below call will produce error:
// produces In schema.php line 398: ReasonCodeCommonData is not a schema we know about.
\AvroSchema::parse($aboveSchemaContents)
Reason of error is of course missing namespace which was mentioned in original json, and cut out after casting to string ( org.nrf_arts.ixretail.namespace.avro.ReasonCodeCommonData ).
Casting to string is widely used in flix-tech/confluent-schema-registry-api , where schema is casted before cache'ing it.
The text was updated successfully, but these errors were encountered:
Hello,
First of all thank you for development of this library, it helped us alot.
Issue is about version:
lock dependencies:
This issue is really for library https://github.com/flix-tech/avro-php which is used by avro-serde-php. I wanted to put issue there, but it seems issues option is turned off there.
So basically, problem we encountered is with schemas, which have some records declared in one default namespace, and then, the record is also used in another. Library seems to parse it without errors, but after cacheing it (AvroSchema is casted to string in registry library) , and then reading this schema again it throws errors. For example schema is loaded without any problems with initial call to schema registry:
In above example we can see ReasonCodeCommonData declared in default namespace org.nrf_arts.ixretail.namespace.avro.
It is also used in com.payment.data.repository.avro.SettleTenderPickupBase with full qualified name org.nrf_arts.ixretail.namespace.avro.ReasonCodeCommonData.
Now when we will cast $schema to string:
It produces:
and above schema is wrong and below call will produce error:
Reason of error is of course missing namespace which was mentioned in original json, and cut out after casting to string ( org.nrf_arts.ixretail.namespace.avro.ReasonCodeCommonData ).
Casting to string is widely used in flix-tech/confluent-schema-registry-api , where schema is casted before cache'ing it.
The text was updated successfully, but these errors were encountered: