Skip to content

Commit

Permalink
Merge down and release PHP 8.4 support (#185)
Browse files Browse the repository at this point in the history
* remove PHP 8.4 depreciation warning

* fix test suite

* removed setup-php action

* updated version matrix

* remove checking of the HTTP response

* removed unsupported matrix combos

* increased memory limit in test

* Release 1.14.3 (#184)

Co-authored-by: Alex Moinet <[email protected]>

---------

Co-authored-by: Aleksander Grzegorzewski <[email protected]>
Co-authored-by: Aleksander <[email protected]>
Co-authored-by: Alex Moinet <[email protected]>
  • Loading branch information
4 people authored Jan 30, 2025
1 parent f3da228 commit 6d4b47a
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 30 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/maze-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.0']
symfony-version: [4, 5, 6]
include:
- php-version: '7.2'
symfony-version: 2
- php-version: '8.3'
symfony-version: 7
php-version: ['8.0', '8.1', '8.2', '8.3', '8.4']
symfony-version: [5, 6, 7]
exclude:
- php-version: 8.0
symfony-version: 7
- php-version: 8.1
symfony-version: 7

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
sudo apt-get -y install libcurl4-openssl-dev
sudo apt-get -y install net-tools
- name: install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: '3.2.3'
bundler-cache: true

- run: bundle exec maze-runner --no-source
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ jobs:
symfony-version: '^6.0'
- php-version: '8.3'
symfony-version: '^7.0'
- php-version: '8.3'
- php-version: '8.4'
symfony-version: '^5.0'
- php-version: '8.4'
symfony-version: '^6.0'
- php-version: '8.4'
symfony-version: '^7.0'
- php-version: '8.4'
symfony-version: 'latest'

steps:
Expand All @@ -120,7 +126,7 @@ jobs:
if: ${{ matrix.symfony-version == 'latest' }}
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.13'

- run: composer validate

Expand Down
2 changes: 1 addition & 1 deletion BugsnagBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ class BugsnagBundle extends Bundle
*
* @return string
*/
const VERSION = '1.14.2';
const VERSION = '1.14.3';
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Changelog
=========

## v1.14.3 (2025-01-30)

This release should ensure compatibility with PHP 8.4 by removing the usage of certain
deprecated features by:
- Removing type annotations from parameters defaulting to `null`. Comment type annotations will continue to be present and accurate

### Fixes

* Ensure PHP 8.4 compatibility
[#183](https://github.com/bugsnag/bugsnag-symfony/pull/183)

## 1.14.2 (2024-06-06)

### Bug Fixes
Expand Down
12 changes: 6 additions & 6 deletions DependencyInjection/ClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ class ClientFactory
*/
public function __construct(
SymfonyResolver $resolver,
TokenStorageInterface $tokens = null,
AuthorizationCheckerInterface $checker = null,
$tokens = null,
$checker = null,
$key = null,
$endpoint = null,
$callbacks = true,
Expand All @@ -278,12 +278,12 @@ public function __construct(
$root = null,
$env = null,
$stage = null,
array $stages = null,
array $filters = null,
ShutdownStrategyInterface $shutdownStrategy = null,
$stages = null,
$filters = null,
$shutdownStrategy = null,
$stripPathRegex = null,
$projectRootRegex = null,
GuzzleHttp\ClientInterface $guzzle = null,
$guzzle = null,
$memoryLimitIncrease = false,
array $discardClasses = [],
array $redactedKeys = [],
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'

gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v6.9.0'
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v9.22.0'
gem 'webrick'
2 changes: 1 addition & 1 deletion features/custom-guzzle.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Scenario: Custom Guzzle client is not used when config is not setup
When I navigate to the route "/unhandled/controller/exception"
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And the error "X-Custom-Guzzle" header is null
And the error "X-Custom-Guzzle" header is not present

Scenario: A custom Guzzle client can be used
Given I set environment variable "BUGSNAG_GUZZLE" to "custom_guzzle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function bigOom(): Response
*/
public function smallOom(): Response
{
ini_set('memory_limit', memory_get_usage() + (1024 * 1024 * 5));
ini_set('memory_limit', memory_get_usage() + (1024 * 1024 * 10));
ini_set('display_errors', true);

$i = 0;
Expand Down
9 changes: 5 additions & 4 deletions features/fixtures/symfony-6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ ENV BUGSNAG_DISCARD_CLASSES $BUGSNAG_DISCARD_CLASSES
ENV BUGSNAG_GUZZLE $BUGSNAG_GUZZLE
ENV BUGSNAG_FEATURE_FLAGS $BUGSNAG_FEATURE_FLAGS
ENV COMPOSER_GITHUB_TOKEN $COMPOSER_GITHUB_TOKEN
ENV BUGSNAG_MEMORY_LIMIT_INCREASE 10485760

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

COPY . .
COPY --from=composer:2.2 /usr/bin/composer /usr/local/bin/composer
Expand Down
6 changes: 2 additions & 4 deletions features/ooms.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Feature: Out of memory error support
Scenario: OOM from a single large allocation
Given I start the symfony fixture
When I navigate to the route "/oom/big"
Then the Symfony response matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
When I wait to receive an error
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And the exception "errorClass" equals "Symfony\Component\ErrorHandler\Error\OutOfMemoryError"
And the exception "message" matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
Expand All @@ -26,8 +25,7 @@ Scenario: OOM from many small allocations
Given I set environment variable "APP_DEBUG" to "0"
And I start the symfony fixture
When I navigate to the route "/oom/small"
Then the Symfony response matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
When I wait to receive an error
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And the exception "errorClass" equals "Symfony\Component\ErrorHandler\Error\OutOfMemoryError"
And the exception "message" matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
Expand Down

0 comments on commit 6d4b47a

Please sign in to comment.