tomzx / php-dependency-extractor
Scan directories to extract dependencies
dev-master / 0.1.x-dev
2015-09-19 05:23 UTC
Requires
- php: >=5.4
- herrera-io/phar-update: ~2.0
- nikic/php-parser: ~1.0.2
- phpunit/php-file-iterator: ~1.3
- symfony/console: ~2.6
Requires (Dev)
- phpunit/phpunit: ~4
This package is auto-updated.
Last update: 2024-11-10 07:37:51 UTC
README
#PHP Dependency Extractor
PHP Dependency Extractor
is a command line tool that will parse a directory of PHP source code to extract dependencies.
As it currently stands, PHP Dependency Extractor
will extract the list of namespaces used. This can allow you, for instance, to figure out which libraries are used (or not).
Getting started
- Install
php-dependency-extractor
through composer, either globally or locally:
Locally
php composer require --dev tomzx/php-dependency-extractor
Globally
php composer global require tomzx/php-dependency-extractor
See the example section for examples of how to use the tool.
Example
php bin/php-dependency-extractor extract --why target-path File_Iterator_Facade PHPDependencyExtractor\Console\Command\ExtractCommand PHPDependencyExtractor\Extractor PHPDependencyExtractor\Registry\Registry PHPDependencyExtractor\Visitor\TrackedNameResolver PhpParser\Lexer\Emulative PhpParser\Node PhpParser\NodeTraverser PhpParser\NodeVisitor\NameResolver PhpParser\Node\Stmt\UseUse PhpParser\Parser Symfony\Component\Console\Application Symfony\Component\Console\Command\Command Symfony\Component\Console\Helper\ProgressBar Symfony\Component\Console\Input\InputArgument Symfony\Component\Console\Input\InputInterface Symfony\Component\Console\Input\InputOption Symfony\Component\Console\Output\OutputInterface
License
The code is licensed under the MIT license. See LICENSE.