Skip to content

Commit

Permalink
Add a check to ensure cached code/routes exist before including them
Browse files Browse the repository at this point in the history
  • Loading branch information
carnage committed Feb 26, 2024
1 parent e60a387 commit 89aa370
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public function register(): void
/** @return Builder[] */
private function instantiateBuilders(): array
{
if (!file_exists(config('membrane.routes_file')) || empty(config('membrane.additional_builders'))) {

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.1, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, lowest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.

Check failure on line 56 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPStan [8.3, latest], ubuntu-latest, laminas/laminas-continuous-integration-action@v1...

Function config not found.
return [];
}

/** @phpstan-ignore-next-line */ // config is a laravel framework helper method
$router = new Router(new RouteCollection(include config('membrane.routes_file')));

Expand Down

0 comments on commit 89aa370

Please sign in to comment.