diff --git a/Core/Executor/ReferenceExecutor.php b/Core/Executor/ReferenceExecutor.php index 81f9ef1b..949b43cf 100644 --- a/Core/Executor/ReferenceExecutor.php +++ b/Core/Executor/ReferenceExecutor.php @@ -59,7 +59,9 @@ protected function set($dsl, $context) if (!isset($dsl['value'])) { throw new \Exception("Invalid step definition: miss 'value' for setting reference"); } - $value = $dsl['value']; + // this makes sense since we started supporting embedded refs... + $value = $this->referenceResolver->resolveReference($dsl['value']); + /// @todo add support for eZ dynamic parameters too if (preg_match('/.*%.+%.*$/', $value)) { // we use the same parameter resolving rule as symfony, even though this means abusing the ContainerInterface $value = $this->container->getParameterBag()->resolveString($value); diff --git a/Core/ReferenceResolver/PrefixBasedResolverInterface.php b/Core/ReferenceResolver/PrefixBasedResolverInterface.php index 8f9edb7d..3f01259f 100644 --- a/Core/ReferenceResolver/PrefixBasedResolverInterface.php +++ b/Core/ReferenceResolver/PrefixBasedResolverInterface.php @@ -5,8 +5,6 @@ /** * At the moment this interface does nothing more than its parent. * *However* we assume that all classes implementing this interface do produce a regexp which starts with a left anchoring: /^.../ - * - * @deprecated in favour of EmbeddedReferenceResolverInterface */ interface PrefixBasedResolverInterface extends RegexpBasedResolverInterface { diff --git a/WHATSNEW.md b/WHATSNEW.md index 6723f228..37296d4f 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -22,6 +22,16 @@ Version 4.8 # we get remote_content_id = "something 99 times different" ``` +* New: it is now possible to create references with values that are generated from other references, such as: + + ``` + type: reference + mode: set + identifier: three + value: "[reference:one].[loop:two]" + + ``` + * New: when creating and updating ContentType definitions, it is possible to use a reference to define each field. The value of the reference must be an array with all the usual keys: 'name', 'searchable', etc... This makes it easy to define multiple ContentTypes sharing fields with the same definition such as f.e. the 'title'