Kevin Reniers 8ac587e621
feat: add support for hidden keys in yaml files (#2715)
* feat: add support for hidden keys in yaml files

During YAML loading the aliases are already resolved so there is no point in validating them or trying to execute them during import. That's why I've chosen to remove them completely after parsing.

I had to add the "# test.yaml" comment at the end because the importer checks for this, assuming a file will be passed to it. However, I wasn't sure where to put the file and keeping it isolated to the test seemed fine as well.

* fix: allow for future root-levels keys with dots in the name

* test: restore the Deployer input/output after test

This is necessary because the static instance gets set somewhere before TaskTest.php is executed, but gets overridden for the purposes of this test. Simply unsetting the deployer causes the instance to get garbage collected, which causes TaskTest.php to fail because it no longer exists.

I didn't really want to touch other code since it'd become pretty massive in scope, I think. As such, this was the quickest way to work around the current design of the code and how it interacts with tests.

Also, this may cause issues in other tests because the hosts I'm importing in this test will remain in the container, but I couldn't figure out how to remove hosts again after they've already been set. I tried extending the container with a new "hosts" value but that gave me a FrozenServiceException, as did directly overriding it, so I'm at a bit of a loss here. :)

Co-authored-by: Kevin R <22906111+cgkkevinr@users.noreply.github.com>
2021-11-03 19:59:51 +01:00
..
2021-09-24 16:49:47 +02:00
2021-10-21 21:32:26 +02:00
2021-10-21 21:14:30 +02:00
2021-10-11 22:03:43 +02:00