Skip to content
Discussion options

You must be logged in to vote

This looks like a bug in the recipe importers, not in your config. The two hook types store tasks differently, but the importer handles a list the same way for both.

In src/Task/Task.php the two hook types insert at opposite ends:

public function addBefore(string $task): self
{
    array_unshift($this->before, $task);   // prepends
    return $this;
}

public function addAfter(string $task): self
{
    array_push($this->after, $task);       // appends
    return $this;
}

But src/Import/MamlRecipe.php (and YamlRecipe.php too) does the same thing for a list in both cases:

if (is_array($value)) {
    foreach (array_reverse($value) as $v) {
        after($key, $v);   // same array_reverse is …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joeshelton-wagento
Comment options

Answer selected by joeshelton-wagento
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Bugs
Labels
None yet
2 participants