Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Extracted the DI loading of an array from the YamlFileLoader#11954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This allows to reuse the logic easily for other loaders needing to extractdata from an array.
cordoval commentedSep 19, 2014
exactly what i was thinking, this is very good@stof 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You should check if the keyresource exists
fabpot commentedSep 24, 2014
I'm 👎 as enabling the YAML conventions in an array loader looks like a non-sense to me. |
stof commentedSep 24, 2014
Yeah, this was the point where I was not sure about this. I agree that the string-based convention to reference services and others are a bit hackish. Closing this, and the PlainArrayLoader should not rely on such convention anymore |
This allows to reuse the logic easily for other loaders needing to extract data from an array.
Note that references and expressions are subject to the same syntax than in YAML files. the goal is to load arrays from a place where you might not be able to instantiate objects.
currently, only the YAMLFileLoader is using it, but the PlainArrayLoader (better named ArrayFileLoader btw) submitted in#11953 could reuse it as well. This would make it benefit from the safeguards added in#11374 as well.
I haven't added dedicated tests yet (but the code is executed by the YamlFileLoader tests). I can add some tests if there is an interest in merging this.