Skip to content

Commit d1acd65

Browse files
AlliBalliBabaa.stecher
andauthored
Removes dd workaround for frankenphp. (#945)
Co-authored-by: a.stecher <[email protected]>
1 parent eef1549 commit d1acd65

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

bin/bootstrap.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
use Laravel\Octane\Exceptions\DdException;
43
use Laravel\Octane\Octane;
54

65
ini_set('display_errors', 'stderr');
@@ -26,13 +25,6 @@
2625
exit(11);
2726
}
2827

29-
if (! function_exists('dd')) {
30-
function dd(...$vars)
31-
{
32-
throw new DdException($vars);
33-
}
34-
}
35-
3628
/*
3729
|--------------------------------------------------------------------------
3830
| Register The Auto Loader

bin/roadrunner-worker

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use Spiral\Goridge\Relay;
1515
use Spiral\RoadRunner\Http\PSR7Worker;
1616
use Spiral\RoadRunner\Worker as RoadRunnerWorker;
1717

18+
require __DIR__.'/../fixes/fix-symfony-dd.php';
19+
1820
$basePath = require __DIR__.'/bootstrap.php';
1921

2022
/*

bin/swoole-server

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ ini_set('display_errors', 'stderr');
1515

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

18+
require __DIR__.'/../fixes/fix-symfony-dd.php';
19+
1820
$bootstrap = fn ($serverState) => require __DIR__.'/bootstrap.php';
1921

2022
/*

fixes/fix-symfony-dd.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
use Laravel\Octane\Exceptions\DdException;
4+
5+
if (! function_exists('dd')) {
6+
function dd(...$vars)
7+
{
8+
throw new DdException($vars);
9+
}
10+
}

0 commit comments

Comments
 (0)