- Issue created by @jurgenhaas
- Merge request !31Issue #3480140 by jurgenhaas: Encode plugin: add support for Yaml → (Merged) created by jurgenhaas
- 🇳🇱Netherlands megachriz
A good one to add!
Can you add two test cases for this to
Drupal\Tests\tamper\Unit\Plugin\Tamper\EncodeTest
? - 🇳🇱Netherlands megachriz
Maybe it would also be good to use a
switch()
statement here. Because now if some module or library would define the functionyaml_encode()
, then that would be called instead.I see also that the Tamper plugin would allow you to call any function that is defined in your config file, instead of only the ones provided by the option list. That doesn't sound like desirable functionality. Fixing that is technically out of scope for this issue, but by switching to
switch()
that side effect would be resolved as well. - 🇩🇪Germany jurgenhaas Gottmadingen
I've added 2 tests. BTW. the json encode and decode variations don't have tests either, maybe something for another follow-up. Just like the switch from #5
-
megachriz →
committed 744e03f4 on 8.x-1.x authored by
jurgenhaas →
Issue #3480140 by jurgenhaas: Encode plugin: added support for Yaml.
-
megachriz →
committed 744e03f4 on 8.x-1.x authored by
jurgenhaas →
- 🇳🇱Netherlands megachriz
Alright. Fair enough. I merged this and created a follow-up: 📌 Encode plugin: only call function from the available options Active .
Automatically closed - issue fixed for 2 weeks with no activity.