Skip to content

Commit

Permalink
Optimization: Optimize the dynamic binding of MailCommand. (#703)
Browse files Browse the repository at this point in the history
* Optimization: Optimize the dynamic binding of MailCommand.

* Optimized

---------

Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
zds-s and huangdijia authored Aug 21, 2024
1 parent 0c98f2e commit 2fcd2b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace FriendsOfHyperf\Mail;

use Composer\InstalledVersions;
use Psr\Container\ContainerInterface;

class ConfigProvider
Expand All @@ -37,6 +38,11 @@ public function __invoke(): array
'destination' => BASE_PATH . '/storage/view/mail/',
],
],
'commands' => [
...InstalledVersions::isInstalled('hyperf/devtool') ? [
Command\MailCommand::class,
] : [],
],
];
}
}

0 comments on commit 2fcd2b5

Please sign in to comment.