src/Resolver/ExpressionResolverCache.php
public function registerResolver(ExpressionResolverInterface $resolver)
    {
        $this->cache = [];
        
        $priority = $resolver->getPriority();
        
        for ($size = \count($this->resolvers), $i = 0; $i < $size; $i++) {
            if ($priority > $this->resolvers[$i]->getPriority()) {
                \array_splice($this->resolvers, $i, 0, [
                    $resolver
                ]);
                
                return $resolver;
            }
        }
        
        return $this->resolvers[] = $resolver;
    }
public function registerResolver(ExpressionResolverInterface $resolver)
    {
        $this->cache = [];
        
        $priority = $resolver->getPriority();
        
        for ($size = \count($this->resolvers), $i = 0; $i < $size; $i++) {
            if ($priority > $this->resolvers[$i]->getPriority()) {
                \array_splice($this->resolvers, $i, 0, [
                    $resolver
                ]);
                
                return $resolver;
            }
        }
        
        return $this->resolvers[] = $resolver;
    }
Register a new expression resolver (purges existing cache).

@param ExpressionResolverInterface $resolver
@return ExpressionResolverInterface