-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mior Muhammad Zaki <[email protected]>
- Loading branch information
Showing
18 changed files
with
441 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,6 @@ jobs: | |
- 8.3 | ||
experimental: | ||
- true | ||
exclude: | ||
- php: '8.0' | ||
|
||
name: PHP:${{ matrix.php }} Code Audit | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
namespace Orchestra\Testbench\Foundation\Actions; | ||
|
||
use ErrorException; | ||
use Illuminate\Contracts\Foundation\Application; | ||
use Illuminate\Filesystem\Filesystem; | ||
|
||
use function Orchestra\Testbench\join_paths; | ||
use function Orchestra\Testbench\laravel_vendor_exists; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class CreateVendorSymlink | ||
{ | ||
/** | ||
* Construct a new action. | ||
* | ||
* @param string $workingPath | ||
*/ | ||
public function __construct( | ||
protected readonly string $workingPath | ||
) {} | ||
|
||
/** | ||
* Execute the command. | ||
* | ||
* @param \Illuminate\Contracts\Foundation\Application $app | ||
* @return void | ||
*/ | ||
public function handle(Application $app): void | ||
{ | ||
$filesystem = new Filesystem; | ||
|
||
$appVendorPath = $app->basePath('vendor'); | ||
|
||
$vendorLinkCreated = false; | ||
|
||
if (! laravel_vendor_exists($app, $this->workingPath)) { | ||
if ($filesystem->exists($app->bootstrapPath(join_paths('cache', 'packages.php')))) { | ||
$filesystem->delete($app->bootstrapPath(join_paths('cache', 'packages.php'))); | ||
} | ||
|
||
(new DeleteVendorSymlink)->handle($app); | ||
|
||
try { | ||
$filesystem->link($this->workingPath, $appVendorPath); | ||
|
||
$vendorLinkCreated = true; | ||
} catch (ErrorException $e) { | ||
// | ||
} | ||
} | ||
|
||
$app->flush(); | ||
|
||
$app->instance('TESTBENCH_VENDOR_SYMLINK', $vendorLinkCreated); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
src/Foundation/Bootstrap/SyncTestbenchConfigurationFiles.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.