Skip to content

Commit

Permalink
Merge pull request #558 from bugsnag/next
Browse files Browse the repository at this point in the history
v2.29.0 Release
  • Loading branch information
Cawllec authored Feb 26, 2025
2 parents 9c34a06 + 36e5480 commit 5066f0a
Show file tree
Hide file tree
Showing 96 changed files with 3,677 additions and 64 deletions.
38 changes: 37 additions & 1 deletion .github/workflows/maze-runner-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
laravel-fixture: laravel11
- php-version: '8.4'
laravel-fixture: laravel11
- php-version: '8.3'
laravel-fixture: laravel12
- php-version: '8.4'
laravel-fixture: laravel12
- php-version: '8.0'
laravel-fixture: lumen8

Expand All @@ -49,8 +53,40 @@ jobs:
ruby-version: '3.1'
bundler-cache: true

- run: bundle exec maze-runner --no-source
- run: bundle exec maze-runner --no-source --exclude=features/octane
env:
PHP_VERSION: ${{ matrix.php-version }}
LARAVEL_FIXTURE: ${{ matrix.laravel-fixture }}
COMPOSER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test_octane:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: '8.4'
laravel-fixture: laravel11
- php-version: '8.4'
laravel-fixture: laravel12

steps:
- uses: actions/checkout@v2

- name: Install libcurl4-openssl-dev and net-tools
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install net-tools
- name: install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true

- run: bundle exec maze-runner --no-source ./features/octane
env:
PHP_VERSION: ${{ matrix.php-version }}
LARAVEL_FIXTURE: ${{ matrix.laravel-fixture }}
COMPOSER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,18 @@ jobs:
laravel-version: '10.*'
- php-version: '8.2'
laravel-version: '10.*'
- php-version: '8.2'
laravel-version: '11.*'
- php-version: '8.3'
laravel-version: '11.*'
- php-version: '8.4'
laravel-version: '11.*'
- php-version: '8.2'
laravel-version: '12.*'
- php-version: '8.3'
laravel-version: '12.*'
- php-version: '8.4'
laravel-version: '12.*'

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/.idea
Gemfile.lock
maze_output
maze-runner.log
.phpunit.result.cache
/features/fixtures/*/bugsnag-laravel
/features/fixtures/laravel-latest/*
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

## v2.29.0 (2025-02-26)

* Adds support for laravel 12 [#553](https://github.com/bugsnag/bugsnag-laravel/pull/553)
* Adds support for running laravel using octane:
- [#551](https://github.com/bugsnag/bugsnag-laravel/pull/551)
- [#552](https://github.com/bugsnag/bugsnag-laravel/pull/552)

## v2.28.1 (2025-01-13)

This release should ensure compatibility with PHP 8.4 by removing the usage of certain
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.18.0'
gem "bugsnag-maze-runner", "~> 9.14"
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"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|^10.0|^11.0",
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"monolog/monolog": "^1.12|^2.0|^3.0"
},
"require-dev": {
"orchestra/testbench": "^3.1|^4.0|^5.0|^6.0|^7.0|^8.0|^9.0",
"phpunit/phpunit": "^4.8.36|^6.3.1|^7.5.15|^8.3.5|^9.3.10|^10.0"
"orchestra/testbench": "^3.1|^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"phpunit/phpunit": "^4.8.36|^6.3.1|^7.5.15|^8.3.5|^9.3.10|^10.0|^11.0"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 12 additions & 0 deletions config/bugsnag.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@

'bindings' => env('BUGSNAG_QUERY_BINDINGS', false),

/*
|--------------------------------------------------------------------------
| Octane breadcrumbs
|--------------------------------------------------------------------------
|
| Enable this if you'd like us to automatically record breadcrumbs from
| octane events.
|
*/

'octane_breadcrumbs' => env('BUGSNAG_OCTANE_BREADCRUMBS', true),

/*
|--------------------------------------------------------------------------
| Release Stage
Expand Down
4 changes: 2 additions & 2 deletions features/discard_classes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Scenario: Exceptions can be discarded by name
Given I set environment variable "BUGSNAG_DISCARD_CLASSES" to "Exception"
And I start the laravel fixture
When I navigate to the route "/unhandled_controller_exception"
Then I should receive no requests
Then I should receive no error

Scenario: Exceptions can be discarded by regex
Given I set environment variable "BUGSNAG_DISCARD_CLASSES" to "/Exception$/"
And I start the laravel fixture
When I navigate to the route "/unhandled_controller_exception"
Then I should receive no requests
Then I should receive no error

Scenario: Exceptions will be delivered when discard classes does not match
Given I set environment variable "BUGSNAG_DISCARD_CLASSES" to "DifferentException,/^NotThatException$/"
Expand Down
83 changes: 83 additions & 0 deletions features/fixtures/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,89 @@ services:
- target: 8000
published: 61311

laravelrr:
build:
context: ${LARAVEL_FIXTURE} # Set to the base test fixture e.g. laravel11
dockerfile: Dockerfile-roadrunner
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: ${LARAVEL_FIXTURE_PORT} # Set to the published port of the base test fixture

laravelfp:
build:
context: ${LARAVEL_FIXTURE} # Set to the base test fixture e.g. laravel11
dockerfile: Dockerfile-frankenphp
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: ${LARAVEL_FIXTURE_PORT} # Set to the published port of the base test fixture

laravelsw:
build:
context: ${LARAVEL_FIXTURE} # Set to the base test fixture e.g. laravel11
dockerfile: Dockerfile-swoole
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: ${LARAVEL_FIXTURE_PORT} # Set to the published port of the base test fixture

laravel12:
build:
context: laravel12
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: 61312

laravel-latest:
build:
context: laravel-latest
Expand Down
29 changes: 29 additions & 0 deletions features/fixtures/laravel11/Dockerfile-frankenphp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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 /usr/bin/composer /usr/local/bin/composer

RUN curl https://frankenphp.dev/install.sh | sh
RUN mv frankenphp /usr/local/bin/

RUN cp .env.example .env
RUN docker-php-ext-install sockets pcntl posix
RUN composer install --no-dev
RUN composer require laravel/octane
RUN php artisan key:generate
RUN php artisan octane:install --server=frankenphp

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

CMD php -d variables_order=EGPCS artisan octane:start --server=frankenphp --host=0.0.0.0 --admin-port=2019 --port=8000
27 changes: 27 additions & 0 deletions features/fixtures/laravel11/Dockerfile-roadrunner
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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 /usr/bin/composer /usr/local/bin/composer

RUN cp .env.example .env
RUN docker-php-ext-install sockets pcntl posix
RUN composer install --no-dev
RUN composer require laravel/octane spiral/roadrunner-cli
RUN ./vendor/bin/rr get-binary
RUN php artisan key:generate
RUN php artisan octane:install --server=roadrunner

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

CMD php -d variables_order=EGPCS artisan octane:start --server=roadrunner --host=0.0.0.0 --rpc-port=6001 --port=8000
29 changes: 29 additions & 0 deletions features/fixtures/laravel11/Dockerfile-swoole
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG PHP_VERSION
FROM php:$PHP_VERSION

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

WORKDIR /app

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

RUN cp .env.example .env
RUN docker-php-ext-install sockets pcntl posix
RUN composer install --no-dev
RUN composer require laravel/octane
RUN pecl install swoole
RUN docker-php-ext-enable swoole
RUN php artisan key:generate
RUN php artisan octane:install --server=swoole

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

CMD php -d variables_order=EGPCS artisan octane:start --server=swoole --host=0.0.0.0 --rpc-port=6001 --port=8000
18 changes: 18 additions & 0 deletions features/fixtures/laravel12/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
Loading

0 comments on commit 5066f0a

Please sign in to comment.