Add create_attribute()
create_attribute() is a new twig function in Drupal core 8.3.x https://www.drupal.org/node/2818293
The Attribute class contains a lot of logic, i am not sure if we should copy it, trim it down or maybe add drupal/core as a composer dependency and use it directly?
Hmm aleksip/plugin-data-transform has the necessary classes already.
Ideally these issues will land some day:
Meanwhile Data Transform Plugin has the required classes and is already a dependency of Pattern Lab Twig Standard Edition for Drupal, so maybe it could be added as a dependency here too.
are there any news on this one?
There's PR #8 but that won't work, needs to be a function
just added a create_attribute function in #10