Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/Codeception/Lib/Connector/Laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Illuminate\Foundation\Bootstrap\RegisterProviders;
use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile;
use Illuminate\Queue\Queue;
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelBrowser as Client;
Expand Down Expand Up @@ -177,6 +178,10 @@ private function initialize(SymfonyRequest $request = null): void
*/
private function loadApplication(): AppContract
{
// Booting the application appends callbacks that reference it to this static array,
// so it has to be cleared to let previous applications be garbage collected.
Queue::createPayloadUsing(null);

/** @var AppContract $app */
$app = require $this->module->config['bootstrap_file'];
if ($this->module->config['environment_file'] !== '.env') {
Expand Down