Closed mihaeu closed 3 years ago
As far as I can tell from http://fabien.potencier.org/symfony-service-container-using-xml-or-yaml-to-describe-services.html, Symfony should be able to convert back and forth between the formats.
That sounds interesting. I haven't decided yet if I
Why would you use regular expressions to parse XML?
Regex only as a proof of concept, because it's just easier to implement without requiring other dependencies. The proper implementation using XMLParser
for XML, ini_get
for .ini, json_decode
for JSON and some library for yaml.
I'm not sure however how far I want to take the support for various DIs myself. I'd prefer to have others write those and extract them into separate plugins/sub-projects.
Reconsidering this feature because dynamic analysis (introduced in v0.2.0) is more powerful and resilient towards change.
@mihaeu dynamic analysis is great feature, but this requires much more efforts.
I don't think that this project should handle framework specifics, but instead maybe it's will be useful to have some plugin system which allow to override return types dynamically. Then this will be developer's responsibility to property parse symfony's xml of build their own type mappings.
For inspiration you could look at phan's ReturnTypeOverrideCapability
. I made small plugin which allows me to gather type information for my current project.
I will stop using issues for my personal feature requests because it makes the project look more broken than it is :sweat_smile:
Start with: