use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class SampleCommand extends Command { protected function configure() { $this->setName('sample:command'); //Other methods for configuring the command } protected function execute(InputInterface $input, OutputInterface $output) { //Command execution code } }In this example, the `setName()` method is used to set the command name as `sample:command`. This command name can be used to execute the command using the console application. Package/Library: This code example uses the `Symfony\Component\Console` package/library, which provides components for creating console applications in PHP using Symfony.