rainlab/blog-plugin

Composer PHP Dependency is wrong

Closed this issue · 3 comments

Since version 1.4.1 you have introduced arrow function syntax.

(Example, see here:

{% set categoryLinks = post.categories | map(c => "<a href=\"#{c.url}\">#{c.name}</a>") | join(', ') %}
)

Your composer php version, however, for version 1.4.1, is php >=7.0.

This is not advisable, as arrow functions were introduced in php 7.4. You should indicate 7.4 as a minimum at this point.

Not sure what you can do about this except maybe fix and re-tag your versions or mark as broken?

@nokios would you be willing to submit a PR to remove the arrow function? Not sure how I let that slip through, I don't like using them period. Also, I have no idea how Twig even permits that as valid syntax. @bennothommo any thoughts?

I will see if I have time at some point to submit a PR.

Rolled it back. Thanks