Skip to content

Commit

Permalink
Removes dd workaround for frankenphp. (#945)
Browse files Browse the repository at this point in the history
Co-authored-by: a.stecher <[email protected]>
  • Loading branch information
AlliBalliBaba and a.stecher committed Sep 9, 2024
1 parent eef1549 commit d1acd65
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
8 changes: 0 additions & 8 deletions bin/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Laravel\Octane\Exceptions\DdException;
use Laravel\Octane\Octane;

ini_set('display_errors', 'stderr');
Expand All @@ -26,13 +25,6 @@
exit(11);
}

if (! function_exists('dd')) {
function dd(...$vars)
{
throw new DdException($vars);
}
}

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
Expand Down
2 changes: 2 additions & 0 deletions bin/roadrunner-worker
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use Spiral\Goridge\Relay;
use Spiral\RoadRunner\Http\PSR7Worker;
use Spiral\RoadRunner\Worker as RoadRunnerWorker;

require __DIR__.'/../fixes/fix-symfony-dd.php';

$basePath = require __DIR__.'/bootstrap.php';

/*
Expand Down
2 changes: 2 additions & 0 deletions bin/swoole-server
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ini_set('display_errors', 'stderr');

require_once __DIR__.'/../src/Stream.php';

require __DIR__.'/../fixes/fix-symfony-dd.php';

$bootstrap = fn ($serverState) => require __DIR__.'/bootstrap.php';

/*
Expand Down
10 changes: 10 additions & 0 deletions fixes/fix-symfony-dd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

use Laravel\Octane\Exceptions\DdException;

if (! function_exists('dd')) {
function dd(...$vars)
{
throw new DdException($vars);
}
}

0 comments on commit d1acd65

Please sign in to comment.