Skip to content

Commit

Permalink
Release v2.26.0
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Feb 16, 2023
2 parents 8a899a3 + 9f6af00 commit 333a912
Show file tree
Hide file tree
Showing 93 changed files with 3,227 additions and 61 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/maze-runner-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
laravel-fixture: laravel8
- php-version: '8.1'
laravel-fixture: laravel9
- php-version: '8.2'
laravel-fixture: laravel10
- php-version: '8.0'
laravel-fixture: lumen8

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ jobs:
laravel-version: '9.*'
- php-version: '8.2'
laravel-version: '9.*'
- php-version: '8.1'
laravel-version: '10.*'
- php-version: '8.2'
laravel-version: '10.*'

steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unstable-version-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
php-version: ['8.2']
laravel-version: ['9.x-dev', 'dev-master as 9']
laravel-version: ['10.x-dev as 10', 'dev-master as 10']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
matrix:
php-version: ['8.2']
laravel-fixture: [laravel-latest]
laravel-version: ['9.x-dev'] #, 'dev-master as 9'] # disabled pending package updates in Laravel's skeleton app (PLAT-7040)
laravel-version: ['10.x-dev as 10', 'dev-master as 10']

steps:
- uses: actions/checkout@v2
Expand All @@ -53,7 +53,7 @@ jobs:
- name: install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
ruby-version: '3.2'
bundler-cache: true

- name: install PHP
Expand All @@ -62,7 +62,7 @@ jobs:
php-version: ${{ matrix.php-version }}
coverage: none

- run: ./.ci/setup-laravel-dev-fixture.sh ${{ matrix.laravel-version }}
- run: ./.ci/setup-laravel-dev-fixture.sh "${{ matrix.laravel-version }}"

- run: bundle exec maze-runner --no-source
env:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

## v2.26.0 (2023-02-16)

### Enhancements

* Allow installation on Laravel 10 projects
[rubenvanerk](https://github.com/rubenvanerk)
[#518](https://github.com/bugsnag/bugsnag-laravel/pull/518)

## v2.25.1 (2023-01-17)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'

gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v7.9.0'
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v7.18.0'
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"php": ">=5.5",
"bugsnag/bugsnag": "^3.29.0",
"bugsnag/bugsnag-psr-logger": "^1.4|^2.0",
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0",
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"monolog/monolog": "^1.12|^2.0|^3.0"
},
"require-dev": {
"orchestra/testbench": "^3.1|^4.0|^5.0|^6.0|^7.0",
"orchestra/testbench": "^3.1|^4.0|^5.0|^6.0|^7.0|^8.0",
"phpunit/phpunit": "^4.8.36|^6.3.1|^7.5.15|^8.3.5|^9.3.10"
},
"autoload": {
Expand Down
20 changes: 20 additions & 0 deletions features/fixtures/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,26 @@ services:
- target: 8000
published: 61290

laravel10:
build:
context: laravel10
args:
- PHP_VERSION
environment:
- BUGSNAG_API_KEY
- BUGSNAG_ENDPOINT
- BUGSNAG_SESSION_ENDPOINT
- BUGSNAG_CAPTURE_SESSIONS
- BUGSNAG_USE_CUSTOM_GUZZLE
- BUGSNAG_REGISTER_OOM_BOOTSTRAPPER
- BUGSNAG_DISCARD_CLASSES
- BUGSNAG_REDACTED_KEYS
- BUGSNAG_QUERY
restart: "no"
ports:
- target: 8000
published: 61310

laravel-latest:
build:
context: laravel-latest
Expand Down
53 changes: 53 additions & 0 deletions features/fixtures/laravel10/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=sqlite

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
18 changes: 18 additions & 0 deletions features/fixtures/laravel10/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
23 changes: 23 additions & 0 deletions features/fixtures/laravel10/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ARG PHP_VERSION
FROM php:$PHP_VERSION

RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
unzip \
wget \
zip

WORKDIR /app

COPY . .
COPY --from=composer:2.2 /usr/bin/composer /usr/local/bin/composer

RUN cp .env.example .env
RUN composer install --no-dev
RUN php artisan key:generate

# create database & apply migrations
RUN touch database/database.sqlite && php artisan migrate --no-interaction

CMD php -S 0.0.0.0:8000 -t public
27 changes: 27 additions & 0 deletions features/fixtures/laravel10/app/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}

/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__.'/Commands');

require base_path('routes/console.php');
}
}
48 changes: 48 additions & 0 deletions features/fixtures/laravel10/app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace App\Exceptions;

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

class Handler extends ExceptionHandler
{
/**
* A list of exception types with their corresponding custom log levels.
*
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
*/
protected $levels = [
//
];

/**
* 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 to the session on validation exceptions.
*
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];

/**
* Register the exception handling callbacks for the application.
*/
public function register(): void
{
$this->reportable(function (Throwable $e) {
//
});
}
}
12 changes: 12 additions & 0 deletions features/fixtures/laravel10/app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
use AuthorizesRequests, ValidatesRequests;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace App\Http\Controllers;

use Bugsnag\BugsnagLaravel\Facades\Bugsnag;
use Exception;
use Illuminate\Routing\Controller as BaseController;

class TestController extends BaseController
{
public function unhandledException()
{
throw new Exception('Crashing exception!');
}

public function unhandledError()
{
foo();
}

public function handledException()
{
Bugsnag::notifyException(new Exception('Handled exception'));

return 'done';
}

public function handledError()
{
Bugsnag::notifyError('Handled error', 'This is a handled error');

return 'done';
}
}

0 comments on commit 333a912

Please sign in to comment.