Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

joshuaziering's avatar

Envoyer Choking With New Artisan Command Addition

Hi,

I have a command I just wrote:

<?php

namespace App\Console\Commands;
use ...;
class SendDigests extends Command
{

I have defined it in Kernel.php like so:

 protected $commands = [
        \App\Console\Commands\SendDigests::class,
    ];

However when I try to deploy my code with Envoyer I receive:

Generating autoload files
> php artisan clear-compiled

  [ReflectionException]                                  
  Class App\Console\Commands\SendDigests does not exist  

I even tried taking the declaration OUT of kernel.php, deploying, and then putting it back in with no luck. What's making artisan so unhappy about this command?

Thank you,

Josh

0 likes
3 replies
d3xt3r's avatar

Hmmm, double checked the filename and class declaration ???

joshuaziering's avatar

Does the filename need to include Command at the end of it? I notice that all my other files do. I used the make:command feature in artisan so Im guessing not but you never know.

Thanks everyone,

Josh

joshuaziering's avatar

Turns out it was PHP storm not including my new file in Git because I hit the wrong button. Always double check the source file is there if you're getting errors about it not being there.

:)

Please or to participate in this conversation.