Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Move xdebug/phpdbg warning to where actually needed - fixes #203 #254

Merged
merged 1 commit into from
May 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
fwrite(STDERR, 'You need to run "composer.phar install" to install Humbug.' . PHP_EOL);
exit(1);
}
if (PHP_SAPI !== 'phpdbg' && !defined('HHVM_VERSION') && !extension_loaded('xdebug')) {
fwrite(STDERR, 'You need to install and enable xdebug in order to allow for code coverage generation.' . PHP_EOL);
exit(1);
}

require_once HUMBUG_COMPOSER_INSTALL;

Expand Down
8 changes: 8 additions & 0 deletions src/Command/Humbug.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ class Humbug extends Command
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
if (PHP_SAPI !== 'phpdbg' && !defined('HHVM_VERSION') && !extension_loaded('xdebug')) {
$output->writeln(
'<error>You need to install and enable xdebug, or use phpdbg, '
. 'in order to allow for code coverage generation.</error>'
);
return 1;
}

Performance::upMemProfiler();

$this->validate($input);
Expand Down