Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Removes dd() workaround for Frankenphp. #945

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}