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

[1.x] Fixes CLI storage path for Laravel 11 #253

Merged
merged 2 commits into from
Apr 19, 2024
Merged
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
14 changes: 14 additions & 0 deletions src/BuildProcess/ConfigureArtisan.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,25 @@ protected function configure($file)
'<?php',
"\$app = require_once __DIR__.'/bootstrap/app.php';",
"require __DIR__.'/vendor/autoload.php';",
<<<'EOF'

// Bootstrap Laravel and handle the command...
$status = (require_once __DIR__.'/bootstrap/app.php')
->handleCommand(new ArgvInput);
EOF
],
[
'<?php'.PHP_EOL."ini_set('display_errors', '1');".PHP_EOL.'error_reporting(E_ALL);'.PHP_EOL,
"\$app = require_once __DIR__.'/bootstrap/app.php';".PHP_EOL.'$app->useStoragePath(Laravel\Vapor\Runtime\StorageDirectories::PATH);'.PHP_EOL,
Manifest::shouldSeparateVendor($this->environment) ? "require '/tmp/vendor/autoload.php';".PHP_EOL : "require __DIR__.'/vendor/autoload.php';".PHP_EOL,
<<<EOF
// Bootstrap Laravel...
\$app = require_once __DIR__.'/bootstrap/app.php';
\$app->useStoragePath(Laravel\Vapor\Runtime\StorageDirectories::PATH);

// Handle the command...
\$status = \$app->handleCommand(new ArgvInput);
EOF
],
file_get_contents($file)
);
Expand Down