Skip to content

Commit

Permalink
Merge branch '8.x' into 9.x
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Aug 26, 2024
2 parents 0935d49 + 9518520 commit 9fe1c37
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG-8.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-core`.

## 8.27.0

Released: 2024-08-26

### Added

* Added `artisan` binary to Laravel skeleton.
* Added `Orchestra\Testbench\join_paths()` function.
* Added `Orchestra\Testbench\Attributes\UsesVendor` attribute class.
* Added `defineStashRoutes()` method to register adhoc route for test.

### Changes

* Improvements to `Orchestra\Testbench\default_skeleton_path()`, `Orchestra\Testbench\package_path()`, and `Orchestra\Testbench\workbench_path()` usage based on new `Orchestra\Testbench\join_paths()` function.

## 8.26.0

Released: 2024-08-14
Expand Down
13 changes: 13 additions & 0 deletions src/Concerns/HandlesRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@

trait HandlesRoutes
{
/**
* Indicates if we have made it through the requireApplicationCachedRoutes function.
*
* @var bool
*/
protected $requireApplicationCachedRoutesHasRun = false;

/**
* Setup routes requirements.
*
Expand Down Expand Up @@ -149,6 +156,10 @@ protected function defineCacheRoutes(Closure|string $route, bool $cached = true)
*/
protected function requireApplicationCachedRoutes(Filesystem $files, bool $cached): void
{
if ($this->requireApplicationCachedRoutesHasRun === true) {
return;
}

$this->afterApplicationCreated(function () use ($cached) {
$app = $this->app;

Expand All @@ -171,5 +182,7 @@ protected function requireApplicationCachedRoutes(Filesystem $files, bool $cache

sleep(1);
});

$this->requireApplicationCachedRoutesHasRun = true;
}
}

0 comments on commit 9fe1c37

Please sign in to comment.