"""Source for a minimal Laravel acceptance fixture with a real queue and schedule.""" BOOTSTRAP = """delete(); file_put_contents(getenv('FIXTURE_STATE').'/queue', $data['release']); } } $app = Application::configure(basePath: __DIR__) ->withRouting(using: function () { Route::get('/up', function () { if (DB::table('fixture')->count() !== 1) { abort(503); } return trim(file_get_contents(__DIR__.'/RELEASE')); }); }) ->withSchedule(function ($schedule) { $schedule->call(function () { file_put_contents(getenv('FIXTURE_STATE').'/scheduler', trim(file_get_contents(__DIR__.'/RELEASE'))); })->everySecond(); }) ->withExceptions() ->create(); $app->useStoragePath(getenv('FIXTURE_STATE').'/storage'); return $app; """ PUBLIC = """handleRequest(Illuminate\\Http\\Request::capture()); """ ARTISAN = """handleCommand(new Symfony\\Component\\Console\\Input\\ArgvInput)); """ DATABASE = """ 'sqlite', 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', 'database' => getenv('FIXTURE_DATABASE'), 'prefix' => '', 'foreign_key_constraints' => true, ], ], 'migrations' => ['table' => 'migrations'], ]; """ QUEUE = """ 'database', 'connections' => [ 'database' => [ 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', 'retry_after' => 10, ], ], 'failed' => ['driver' => 'null'], ]; """ MIGRATION = """id(); }); DB::table('fixture')->insert(['id' => 1]); Schema::create('jobs', function ($table) { $table->id(); $table->string('queue')->index(); $table->longText('payload'); $table->unsignedTinyInteger('attempts'); $table->unsignedInteger('reserved_at')->nullable(); $table->unsignedInteger('available_at'); $table->unsignedInteger('created_at'); }); } }; """ SOURCES = { "app.php": BOOTSTRAP, "artisan": ARTISAN, "public/index.php": PUBLIC, "config/database.php": DATABASE, "config/queue.php": QUEUE, "database/migrations/2026_01_01_000000_fixture.php": MIGRATION, "package.json": "{}\n", "package-lock.json": "{}\n", "public/build/manifest.json": "{}\n", }