You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# parsed_file.yml.php# has access to $contextDummy:
dummy0:
id: 0name: <?php echo $context['foo']; ?> # has to be followed by a blank line... ugly workaround# ...
I find this feature questionable and it requires some workaround to make it possible. Removing it would be much simpler. The only useful usage I found was in the code base to inject the loader itself to inject the parameters. Taking a look at this diagram, this could be handled in the Builder instead.
@theofidry Agreed - when I was reworking the library for v2, I found the loader injection to be quite confusing for a while. I think moving the step somehow to the Builder would be a great call.
After working on the parsers (#340), I noticed that a context, accessible in the parsed files, can be set at the parsers level.
For example:
In YAML it is a bit more tricky as you cannot use raw PHP. Instead you have to convert your yaml file into a PHP one first:
I find this feature questionable and it requires some workaround to make it possible. Removing it would be much simpler. The only useful usage I found was in the code base to inject the loader itself to inject the parameters. Taking a look at this diagram, this could be handled in the
Builder
instead.@tshelburne WDYT?
The text was updated successfully, but these errors were encountered: