Skip to content

Commit

Permalink
[1.x] Fixes CLI storage path for Laravel 11 (#253)
Browse files Browse the repository at this point in the history
* laravel 11 artisan replacements

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
joedixon and StyleCIBot authored Apr 19, 2024
1 parent fe7be96 commit d0030df
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit d0030df

Please sign in to comment.