dev-master
9999999-dev
The Requires
The Development Requires
- phpunit/phpunit ^6.0
- satooshi/php-coveralls ^1.0
- mockery/mockery ^1.0.0
- brain/monkey ^2.0.2
- squizlabs/php_codesniffer ^3.2
- codedungeon/phpunit-result-printer ^0.4.4
- mikey179/vfsstream ^1.6
Wallogit.com
2017 © Pedro Peláez
, (*1)
composer require rareloop/hatchet
Once installed you need to copy the hatchet file into your Lumberjack theme directory., (*2)
It is assuming you're using Lumberjack inside Bedrock. If not, you may need to make some changes to paths in the hatchet file, (*3)
You can now access the Hatchet CLI from inside your Lumberjack theme directory:, (*4)
php hatchet list
For a given command called test:command you would run the following:, (*5)
php hatchet test:command
For a given command called test:command you would run the following:, (*6)
php hatchet help test:command
To add additional commands to Hatchet add them to config/hatchet.php (create the file if it doesn't exist)., (*7)
// config/hatchet.php
return [
'commands' => [
MyCommand::class,
],
];
Create a subclass of Rareloop\Hatchet\Commands\Command:, (*8)
namespace MyNamespace;
use Rareloop\Hatchet\Commands\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ControllerMake extends Command
{
protected $signature = 'test:command {paramName : The description of the parameter}';
protected $description = 'A description of the command';
protected function execute(InputInterface $input, OutputInterface $output)
{
// Command implementation
}
}
Hatchet uses the same $signature syntax as Laravel, see here for more information., (*9)
Hatchet Command is a subclass of Symfony's Command object, for more information on how to implement the execute() function see here., (*10)