Sylius/Sylius — pull request #2098 by l3l0 (2014-11-03 10:21:10+00:00)
Title: [product] Add possibility to add associated products

This PR adds possibility to define association types and add associated products in different context (association types) to product. What I need for one of my clients.
PR includes product model changes and new Association like model.
We can add association to different kind of objects in systems using such configuration (right now only association to other product is implemented):

```
sylius_product:
product_association:
classes:
product: Sylius\Component\Product\Model\ProductAssociation
myOwn: MyOwn\SomeAssociation\Model\MyOwnAssociation
```
`MyOwnAssociation` needs to extends `Sylius\Component\Product\Model\Association` abstract class.
I done it using [Doctrine loadClassMetadata subscriber](https://github.com/l3l0/Sylius/blob/3531f50d09883fddbdeefccd6a8f6db418bef252/src/Sylius/Bundle/ProductBundle/Doctrine/EventListener/AssociationInheritanceMetadataSubscriber.php)

I added really simple collection form type in backend, so product can be associated from the product edit/create pages. GUI needs to be changed and improved probably, but right now I haven't time for that.

We need to find way which allows us to handle other kind of association in form type - right now product association type is hardcoded, and we need to way to make some kind of collection type with different types base on configuration and object in form (form data).

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | I hope no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | none yet