Sylius/Sylius — pull request #1472 by pjedrzejewski (2014-05-07 23:16:32+00:00)
Title: Promotion rule using ExpressionLanguage

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -

This PR adds a new type of promotion rule, which allows user to enter an expression in the configuration. It is evaluated by the ExpressionLanguage component with `cart`, `order` and `user` context values.

I'd love to rewrite the Rules system with Ruler library or ExpressionLanguage, but still this is a good start and adds ton of flexibility for the promotions.

It has the drawbacks of course, someone who does not now EL, probably should not edit these rules... (non technical store managers, without training)

Let me know what do you think.