Sylius/Sylius — pull request #2118 by Richtermeister (2014-11-06 22:31:53+00:00)
Title: [RFC] Dis-entangle number generator from sequence.

This is a request for comment on modifying the sequence bundle/component. It seems that we are currently mixing two concepts: (order-)number generation vs. sequence generation.

Currently the GeneratorInterface requires a Sequence entity to be passed, but looking at the HashGenerator it is obvious that there are generator strategies which don't require a sequence (hash, uuid, timestamp-based, pre-generated, etc), so I don't think the GeneratorInterface should mandate the use of a Sequence.

In this proposed change, only the SequentialGenerator relies on the Sequence. This also frees up the NumberListener from creating the Sequence, even though it may not be used..

Please note that I have not adjusted the tests yet, this is just a request for comments.

Thank you.