Skip to content

Commit

Permalink
fix: properly detect application (tempestphp#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt authored Sep 22, 2024
1 parent f466b7d commit ee84b94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Tempest/Core/src/GenericExceptionHandlerSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function setup(AppConfig $appConfig): void
}

// Console
if ($_SERVER['argv'] ?? null) {
if (PHP_SAPI === 'cli') {
(new Collision())->register();

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#[Singleton]
public function initialize(Container $container): Application
{
if (isset($_SERVER['argv'])) {
if (PHP_SAPI === 'cli') {
return new ConsoleApplication(
container: $container,
appConfig: $container->get(AppConfig::class),
Expand Down

0 comments on commit ee84b94

Please sign in to comment.