Skip to content

Update assets method signature

Choose a tag to compare

@octoxan octoxan released this 24 Jul 14:52
· 9 commits to master since this release
9069850

Update assets method signature on CustomBlock class for greater flexibility and backward compatibility.

The Why?

When creating blocks through the cli before, by default it would create them with this method signature on assets.

public function assets(array $block): void

This would break if you tried to switch it to use CustomBlock unless you simplified it down to

public function assets($block)

Now both are valid formats, but do please prefer to upgrade any blocks you work in up to the new standard:

public function assets(array $block): void