SensioLabs\DeprecationDetector\Console\Command\CheckCommand::configure PHP Method

configure() protected method

See also: Command
protected configure ( )
    protected function configure()
    {
        $this->setName('check')->setDefinition(array(new InputArgument('source', InputArgument::OPTIONAL, 'The path to the source files', 'src/'), new InputArgument('ruleset', InputArgument::OPTIONAL, 'The path to the composer.lock file, a rule set or source directory', 'composer.lock'), new InputOption('container-cache', null, InputOption::VALUE_REQUIRED, 'The path to symfony container cache', 'app/cache/dev/appDevDebugProjectContainer.xml'), new InputOption('no-cache', null, InputOption::VALUE_NONE, 'Disable rule set cache'), new InputOption('cache-dir', null, InputOption::VALUE_REQUIRED, 'Cache directory', '.rules/'), new InputOption('log-html', null, InputOption::VALUE_REQUIRED, 'Generate HTML report'), new InputOption('output', null, InputOption::VALUE_REQUIRED, 'Change the output mode'), new InputOption('filter-methods', null, InputOption::VALUE_OPTIONAL, 'Filter methods', ''), new InputOption('fail', null, InputOption::VALUE_NONE, 'Fails, if any deprecation is detected')))->setDescription('Check for deprecated usage')->setHelp(<<<EOF
The <info>%command.name%</info> command tries to find all usages of deprecated features and functions in your application.
The command will generate a rule set for deprecated classes, methods and interfaces based on your libraries, lock file or by loading an existing rule set.
After that the application is checked against this rule set or list of rule sets.

Execute the script with default behavior:

    <info>php %command.full_name%</info>

By default the command checks the folder src/ against the composer.lock, but you can easily specify other folders and files:

    <info>php %command.full_name% </info><comment>path/to/script/ path/to/library/</comment>

    - the first path argument defines the application source to check
    - the second path argument defines the rule set path:

The rule set path can have the following values:

    - path to composer.lock file
    - path to library sources (directory)
    - path to rule set file

After generating a rule set it is cached within the directory .rules, but you can use the caching options to change this behavior:

    - to disable caching use the option <comment>no-cache</comment>:

      <info>php %command.full_name% </info><comment>--no-cache</comment>

    - to change the cache directory use the option <comment>cache-dir</comment>:

      <info>php %command.full_name% </info><comment>--cache-dir=path/to/cache</comment>

To get additional runtime output for information about process progress use the option <comment>verbose</comment>:

    <info>php %command.full_name% </info><comment>--verbose</comment>
EOF
);
    }