mihaeu / dephpend

Detect flaws in your architecture, before they drag you down into the depths of dependency hell ...
https://dephpend.com
MIT License
530 stars 26 forks source link

Support for DI containers #7

Closed mihaeu closed 3 years ago

mihaeu commented 8 years ago

Start with:

spriebsch commented 8 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.

mihaeu commented 8 years ago

That sounds interesting. I haven't decided yet if I

spriebsch commented 8 years ago

Why would you use regular expressions to parse XML?

mihaeu commented 8 years ago

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.

mihaeu commented 8 years ago

Reconsidering this feature because dynamic analysis (introduced in v0.2.0) is more powerful and resilient towards change.

fesor commented 6 years ago

@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.

mihaeu commented 3 years ago

I will stop using issues for my personal feature requests because it makes the project look more broken than it is :sweat_smile: