Skip to content

Commit

Permalink
Added Laravel 9, Lumen 9, Symfony 6 to build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed Feb 24, 2022
1 parent 14bf06c commit e75dd67
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/fixtures/laravel9-exception-handler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Exceptions;

use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;

class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array<int, class-string<Throwable>>
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];

/**
* Register the exception handling callbacks for the application.
*
* @return void
*/
public function register()
{
$this->reportable(function (Throwable $e) {
$this->container->make(\Scoutapm\ScoutApmAgent::class)->recordThrowable($e);
});
}
}
37 changes: 34 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
symfony-version:
- "4.*"
- "5.*"
- "6.*"
php-version:
- "7.1"
- "7.2"
Expand All @@ -160,9 +161,12 @@ jobs:
- "8.0"
- "8.1"
exclude:
- { php-version: "7.1", symfony-version: "5.*", "twig-version": "2.*" } # Symfony 5 (with Twig 2) requires 7.2+
- { php-version: "7.1", symfony-version: "5.*", "twig-version": "3.*" } # Symfony 5 (with Twig 3) requires 7.2+
- { php-version: "7.1", symfony-version: "4.*", "twig-version": "3.*" } # Twig 3 (on Symfony 4) requires 7.2+
- { symfony-version: "4.*", "twig-version": "3.*", php-version: "7.1" } # Twig 3 (on Symfony 4) requires 7.2+
- { symfony-version: "5.*", php-version: "7.1" } # Symfony 5 requires 7.2+
- { symfony-version: "6.*", php-version: "7.1" } # Symfony 6 requires 8.0+
- { symfony-version: "6.*", php-version: "7.2" } # Symfony 6 requires 8.0+
- { symfony-version: "6.*", php-version: "7.3" } # Symfony 6 requires 8.0+
- { symfony-version: "6.*", php-version: "7.4" } # Symfony 6 requires 8.0+
steps:
- uses: actions/checkout@v2
- name: "Install PHP"
Expand Down Expand Up @@ -207,6 +211,7 @@ jobs:
- "6.*"
- "7.*"
- "8.*"
- "9.*"
php-version:
- "7.1"
- "7.2"
Expand All @@ -229,6 +234,11 @@ jobs:
# Laravel 8 supports PHP 7.3 - 8.1
- {laravel-version: "8.*", php-version: "7.1"} # Laravel 8 requires 7.3+
- {laravel-version: "8.*", php-version: "7.2"} # Laravel 8 requires 7.3+
# Laravel 9 supports PHP 7.3 - 8.1
- {laravel-version: "9.*", php-version: "7.1"} # Laravel 9 requires 8.0+
- {laravel-version: "9.*", php-version: "7.2"} # Laravel 9 requires 8.0+
- {laravel-version: "9.*", php-version: "7.3"} # Laravel 9 requires 8.0+
- {laravel-version: "9.*", php-version: "7.4"} # Laravel 9 requires 8.0+
steps:
- uses: actions/checkout@v2
- name: "Install PHP"
Expand Down Expand Up @@ -269,6 +279,7 @@ jobs:
- "6.*"
- "7.*"
- "8.*"
- "9.*"
php-version:
- "7.1"
- "7.2"
Expand All @@ -291,6 +302,11 @@ jobs:
# Laravel 8 supports PHP 7.3 - 8.1
- {laravel-version: "8.*", php-version: "7.1"} # Laravel 8 requires 7.3+
- {laravel-version: "8.*", php-version: "7.2"} # Laravel 8 requires 7.3+
# Laravel 9 supports PHP 7.3 - 8.1
- {laravel-version: "9.*", php-version: "7.1"} # Laravel 9 requires 8.0+
- {laravel-version: "9.*", php-version: "7.2"} # Laravel 9 requires 8.0+
- {laravel-version: "9.*", php-version: "7.3"} # Laravel 9 requires 8.0+
- {laravel-version: "9.*", php-version: "7.4"} # Laravel 9 requires 8.0+
env:
SCOUT_APM_KEY: ${{ secrets.SCOUT_APM_KEY }}
steps:
Expand Down Expand Up @@ -327,6 +343,9 @@ jobs:
- name: "Configure error handler (Laravel 8)"
if: ${{ matrix.laravel-version == '8.*' }}
run: cd test-app && cp ../scout-apm-php/.github/fixtures/laravel8-exception-handler.php app/Exceptions/Handler.php
- name: "Configure error handler (Laravel 9)"
if: ${{ matrix.laravel-version == '9.*' }}
run: cd test-app && cp ../scout-apm-php/.github/fixtures/laravel9-exception-handler.php app/Exceptions/Handler.php
- name: "Add route to trigger error"
run: cd test-app && echo -e "Route::get('/e', function () { throw new \RuntimeException('fail'); });" >> routes/web.php
- name: "Configure Scout"
Expand Down Expand Up @@ -374,6 +393,7 @@ jobs:
- "6.*"
- "7.*"
- "8.*"
- "9.*"
php-version:
- "7.1"
- "7.2"
Expand All @@ -397,6 +417,11 @@ jobs:
# Lumen 8 supports PHP 7.3 - 8.1
- {lumen-version: "8.*", php-version: "7.1"} # Lumen 8 requires 7.3+
- {lumen-version: "8.*", php-version: "7.2"} # Lumen 8 requires 7.3+
# Lumen 9 supports PHP 7.3 - 8.1
- {lumen-version: "9.*", php-version: "7.1"} # Lumen 9 requires 8.0+
- {lumen-version: "9.*", php-version: "7.2"} # Lumen 9 requires 8.0+
- {lumen-version: "9.*", php-version: "7.3"} # Lumen 9 requires 8.0+
- {lumen-version: "9.*", php-version: "7.4"} # Lumen 9 requires 8.0+
steps:
- uses: actions/checkout@v2
- name: "Install PHP"
Expand Down Expand Up @@ -437,6 +462,7 @@ jobs:
- "6.*"
- "7.*"
- "8.*"
- "9.*"
php-version:
- "7.1"
- "7.2"
Expand All @@ -460,6 +486,11 @@ jobs:
# Lumen 8 supports PHP 7.3 - 8.1
- {lumen-version: "8.*", php-version: "7.1"} # Lumen 8 requires 7.3+
- {lumen-version: "8.*", php-version: "7.2"} # Lumen 8 requires 7.3+
# Lumen 9 supports PHP 7.3 - 8.1
- {lumen-version: "9.*", php-version: "7.1"} # Lumen 9 requires 8.0+
- {lumen-version: "9.*", php-version: "7.2"} # Lumen 9 requires 8.0+
- {lumen-version: "9.*", php-version: "7.3"} # Lumen 9 requires 8.0+
- {lumen-version: "9.*", php-version: "7.4"} # Lumen 9 requires 8.0+
env:
SCOUT_APM_KEY: ${{ secrets.SCOUT_APM_KEY }}
steps:
Expand Down

0 comments on commit e75dd67

Please sign in to comment.