php-kafka / php-avro-schema-generator

PHP avro subschema merger and experimental PHP Class avro schema generator
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Improve optimizer interface #21

Closed nick-zh closed 2 years ago

nick-zh commented 2 years ago

To leverage all the information we have about a template, we should probably chance the interface from

OptimizerInterface::optimize(string $definition): string

to

OptimizerInterface::optimize(SchemaTemplateInterface $schemaTemplate): SchemaTemplateInterface

This way the optimizers can leverage all the information from a SchemaTemplateInterface to optimize the schema. This will be a breaking change