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

Set namespaces for legacy apps #5

Closed mihaeu closed 8 years ago

mihaeu commented 8 years ago

Legacy apps are not using namespaces but instead use pseudo namespaced classes like My_Company_Package_Subpackage_Class.

For the generation of package scoped output (not outputting every single class) the user should be able to specify a namespace delimiter e.g. --namespace-delimiter="_"

mihaeu commented 8 years ago

Implemented in e1b03fc using a --underscore-namespaces or -u option.

Sample output for php -n bin/php-dependencies text vendor/phpunit/phpunit/src -u -d 2

PHPUnit\Util --> PHPUnit\Framework
PHPUnit\Util --> SebastianBergmann\Environment
PHPUnit\Util --> SebastianBergmann\Comparator
PHPUnit\Util --> PHPUnit\TextUI
PHPUnit\Util --> Symfony\Component
PHPUnit\Util --> File\Iterator
PHPUnit\Extensions --> PHPUnit\Framework
PHPUnit\Extensions --> File\Iterator
PHPUnit\Extensions --> PHPUnit\Util
PHPUnit\Framework --> SebastianBergmann\Comparator
PHPUnit\Framework --> SebastianBergmann\Diff
PHPUnit\Framework --> PHPUnit\Exception
PHPUnit\Framework --> SebastianBergmann\GlobalState
PHPUnit\Framework --> SebastianBergmann\Exporter
PHPUnit\Framework --> SebastianBergmann\ObjectEnumerator
PHPUnit\Framework --> Prophecy\Exception
PHPUnit\Framework --> Prophecy\Prophet
PHPUnit\Framework --> DeepCopy\DeepCopy
PHPUnit\Framework --> Text\Template
PHPUnit\Framework --> SebastianBergmann\CodeCoverage
PHPUnit\Framework --> SebastianBergmann\ResourceOperations
PHPUnit\Framework --> PHP\Invoker
PHPUnit\Framework --> PHPUnit\Util
PHPUnit\Framework --> PHPUnit\Extensions
PHPUnit\Framework --> PHPUnit\Runner
PHPUnit\TextUI --> SebastianBergmann\CodeCoverage
PHPUnit\TextUI --> SebastianBergmann\Environment
PHPUnit\TextUI --> PHPUnit\Runner
PHPUnit\TextUI --> PHPUnit\Framework
PHPUnit\TextUI --> PHPUnit\Extensions
PHPUnit\TextUI --> PHPUnit\Util
PHPUnit\Runner --> PHPUnit\Framework
PHPUnit\Runner --> File\Iterator
PHPUnit\Runner --> SebastianBergmann\Version
PHPUnit\Runner --> PHPUnit\Exception