Skip to content

Commit 6d4b47a

Browse files
CawllecagrzegorzewskiAlex Moinet
authored
Merge down and release PHP 8.4 support (#185)
* 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]>
1 parent f3da228 commit 6d4b47a

File tree

10 files changed

+46
-30
lines changed

10 files changed

+46
-30
lines changed

.github/workflows/maze-runner.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php-version: ['8.0']
16-
symfony-version: [4, 5, 6]
17-
include:
18-
- php-version: '7.2'
19-
symfony-version: 2
20-
- php-version: '8.3'
21-
symfony-version: 7
15+
php-version: ['8.0', '8.1', '8.2', '8.3', '8.4']
16+
symfony-version: [5, 6, 7]
17+
exclude:
18+
- php-version: 8.0
19+
symfony-version: 7
20+
- php-version: 8.1
21+
symfony-version: 7
2222

2323
steps:
2424
- uses: actions/checkout@v2
2525

2626
- name: Install libcurl4-openssl-dev and net-tools
2727
run: |
2828
sudo apt-get update
29-
sudo apt-get install libcurl4-openssl-dev
30-
sudo apt-get install net-tools
29+
sudo apt-get -y install libcurl4-openssl-dev
30+
sudo apt-get -y install net-tools
3131
3232
- name: install Ruby
3333
uses: ruby/setup-ruby@v1
3434
with:
35-
ruby-version: '3.0'
35+
ruby-version: '3.2.3'
3636
bundler-cache: true
3737

3838
- run: bundle exec maze-runner --no-source

.github/workflows/test-package.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ jobs:
9696
symfony-version: '^6.0'
9797
- php-version: '8.3'
9898
symfony-version: '^7.0'
99-
- php-version: '8.3'
99+
- php-version: '8.4'
100+
symfony-version: '^5.0'
101+
- php-version: '8.4'
102+
symfony-version: '^6.0'
103+
- php-version: '8.4'
104+
symfony-version: '^7.0'
105+
- php-version: '8.4'
100106
symfony-version: 'latest'
101107

102108
steps:
@@ -120,7 +126,7 @@ jobs:
120126
if: ${{ matrix.symfony-version == 'latest' }}
121127
uses: actions/setup-python@v2
122128
with:
123-
python-version: '3.8'
129+
python-version: '3.13'
124130

125131
- run: composer validate
126132

BugsnagBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ class BugsnagBundle extends Bundle
1111
*
1212
* @return string
1313
*/
14-
const VERSION = '1.14.2';
14+
const VERSION = '1.14.3';
1515
}

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
Changelog
22
=========
33

4+
## v1.14.3 (2025-01-30)
5+
6+
This release should ensure compatibility with PHP 8.4 by removing the usage of certain
7+
deprecated features by:
8+
- Removing type annotations from parameters defaulting to `null`. Comment type annotations will continue to be present and accurate
9+
10+
### Fixes
11+
12+
* Ensure PHP 8.4 compatibility
13+
[#183](https://github.com/bugsnag/bugsnag-symfony/pull/183)
14+
415
## 1.14.2 (2024-06-06)
516

617
### Bug Fixes

DependencyInjection/ClientFactory.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ class ClientFactory
262262
*/
263263
public function __construct(
264264
SymfonyResolver $resolver,
265-
TokenStorageInterface $tokens = null,
266-
AuthorizationCheckerInterface $checker = null,
265+
$tokens = null,
266+
$checker = null,
267267
$key = null,
268268
$endpoint = null,
269269
$callbacks = true,
@@ -278,12 +278,12 @@ public function __construct(
278278
$root = null,
279279
$env = null,
280280
$stage = null,
281-
array $stages = null,
282-
array $filters = null,
283-
ShutdownStrategyInterface $shutdownStrategy = null,
281+
$stages = null,
282+
$filters = null,
283+
$shutdownStrategy = null,
284284
$stripPathRegex = null,
285285
$projectRootRegex = null,
286-
GuzzleHttp\ClientInterface $guzzle = null,
286+
$guzzle = null,
287287
$memoryLimitIncrease = false,
288288
array $discardClasses = [],
289289
array $redactedKeys = [],

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
source 'https://rubygems.org'
22

3-
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v6.9.0'
3+
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v9.22.0'
44
gem 'webrick'

features/custom-guzzle.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Scenario: Custom Guzzle client is not used when config is not setup
55
When I navigate to the route "/unhandled/controller/exception"
66
And I wait to receive an error
77
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
8-
And the error "X-Custom-Guzzle" header is null
8+
And the error "X-Custom-Guzzle" header is not present
99

1010
Scenario: A custom Guzzle client can be used
1111
Given I set environment variable "BUGSNAG_GUZZLE" to "custom_guzzle"

features/fixtures/symfony-5/src/Controller/OomController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function bigOom(): Response
2323
*/
2424
public function smallOom(): Response
2525
{
26-
ini_set('memory_limit', memory_get_usage() + (1024 * 1024 * 5));
26+
ini_set('memory_limit', memory_get_usage() + (1024 * 1024 * 10));
2727
ini_set('display_errors', true);
2828

2929
$i = 0;

features/fixtures/symfony-6/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ ENV BUGSNAG_DISCARD_CLASSES $BUGSNAG_DISCARD_CLASSES
1818
ENV BUGSNAG_GUZZLE $BUGSNAG_GUZZLE
1919
ENV BUGSNAG_FEATURE_FLAGS $BUGSNAG_FEATURE_FLAGS
2020
ENV COMPOSER_GITHUB_TOKEN $COMPOSER_GITHUB_TOKEN
21+
ENV BUGSNAG_MEMORY_LIMIT_INCREASE 10485760
2122

2223
RUN apt-get update && \
23-
apt-get install -y --no-install-recommends \
24-
git \
25-
zip \
26-
unzip
24+
apt-get install -y --no-install-recommends \
25+
git \
26+
zip \
27+
unzip
2728

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

features/ooms.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Feature: Out of memory error support
44
Scenario: OOM from a single large allocation
55
Given I start the symfony fixture
66
When I navigate to the route "/oom/big"
7-
Then the Symfony response matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
8-
When I wait to receive an error
7+
And I wait to receive an error
98
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
109
And the exception "errorClass" equals "Symfony\Component\ErrorHandler\Error\OutOfMemoryError"
1110
And the exception "message" matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
@@ -26,8 +25,7 @@ Scenario: OOM from many small allocations
2625
Given I set environment variable "APP_DEBUG" to "0"
2726
And I start the symfony fixture
2827
When I navigate to the route "/oom/small"
29-
Then the Symfony response matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
30-
When I wait to receive an error
28+
And I wait to receive an error
3129
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
3230
And the exception "errorClass" equals "Symfony\Component\ErrorHandler\Error\OutOfMemoryError"
3331
And the exception "message" matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"

0 commit comments

Comments
 (0)