Skip to content

Commit 437ac55

Browse files
authored
Merge pull request #674 from bugsnag/next
PHP 3.29.2 release
2 parents 5b53e4a + 76a0d58 commit 437ac55

17 files changed

+346
-172
lines changed

.github/workflows/test-package.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
guzzle-version: ['^5.3', '^6.0']
1313
include:
1414
- php-version: '7.2'
15-
guzzle-version: '^7.0'
15+
guzzle-version: '<7.3'
1616
- php-version: '7.3'
1717
guzzle-version: '^7.0'
1818
- php-version: '7.4'
@@ -23,6 +23,10 @@ jobs:
2323
guzzle-version: '^7.0'
2424
- php-version: '8.2'
2525
guzzle-version: '^7.0'
26+
- php-version: '8.3'
27+
guzzle-version: '^7.0'
28+
- php-version: '8.4'
29+
guzzle-version: '^7.9'
2630

2731
steps:
2832
- uses: actions/checkout@v2

CHANGELOG.md

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

4+
## 3.29.2 (2025-01-13)
5+
6+
This release should ensure compatibility with PHP 8.4 by removing the usage of certain
7+
deprecated features by:
8+
- Removing `E_STRICT` from the error list in PHP 8.4+
9+
- Removing type annotations from parameters defaulting to `null`. Comment type annotations will continue to be present and accurate
10+
11+
### Fixes
12+
13+
* Ensure PHP 8.4 compatibility
14+
[#672](https://github.com/bugsnag/bugsnag-php/pull/672)
15+
16+
417
## 3.29.1 (2023-05-10)
518

619
### Fixes

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"guzzlehttp/guzzle": "^5.0|^6.0|^7.0"
1717
},
1818
"require-dev": {
19-
"guzzlehttp/psr7": "^1.3",
19+
"guzzlehttp/psr7": "^1.3|^2.0",
2020
"mtdowling/burgomaster": "dev-master#72151eddf5f0cf101502b94bf5031f9c53501a04",
2121
"phpunit/phpunit": "^4.8.36|^7.5.15|^9.3.10",
2222
"php-mock/php-mock-phpunit": "^1.1|^2.1",

src/Client.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ public static function make(
123123
*/
124124
public function __construct(
125125
Configuration $config,
126-
ResolverInterface $resolver = null,
127-
GuzzleHttp\ClientInterface $guzzle = null,
128-
ShutdownStrategyInterface $shutdownStrategy = null
126+
$resolver = null,
127+
$guzzle = null,
128+
$shutdownStrategy = null
129129
) {
130130
$guzzle = $guzzle ?: self::makeGuzzle();
131131

@@ -271,10 +271,10 @@ public function registerCallback(callable $callback)
271271
public function registerDefaultCallbacks()
272272
{
273273
$this->registerCallback(new GlobalMetaData($this->config))
274-
->registerCallback(new RequestMetaData($this->resolver))
275-
->registerCallback(new RequestSession($this->resolver))
276-
->registerCallback(new RequestUser($this->resolver))
277-
->registerCallback(new RequestContext($this->resolver));
274+
->registerCallback(new RequestMetaData($this->resolver))
275+
->registerCallback(new RequestSession($this->resolver))
276+
->registerCallback(new RequestUser($this->resolver))
277+
->registerCallback(new RequestContext($this->resolver));
278278

279279
return $this;
280280
}
@@ -327,7 +327,7 @@ public function clearBreadcrumbs()
327327
*
328328
* @return void
329329
*/
330-
public function notifyException($throwable, callable $callback = null)
330+
public function notifyException($throwable, $callback = null)
331331
{
332332
$report = Report::fromPHPThrowable($this->config, $throwable);
333333

@@ -343,7 +343,7 @@ public function notifyException($throwable, callable $callback = null)
343343
*
344344
* @return void
345345
*/
346-
public function notifyError($name, $message, callable $callback = null)
346+
public function notifyError($name, $message, $callback = null)
347347
{
348348
$report = Report::fromNamedError($this->config, $name, $message);
349349

@@ -360,7 +360,7 @@ public function notifyError($name, $message, callable $callback = null)
360360
*
361361
* @return void
362362
*/
363-
public function notify(Report $report, callable $callback = null)
363+
public function notify(Report $report, $callback = null)
364364
{
365365
$this->pipeline->execute($report, function ($report) use ($callback) {
366366
if ($callback) {
@@ -511,7 +511,7 @@ public function isBatchSending()
511511
*
512512
* @return $this
513513
*/
514-
public function setNotifyReleaseStages(array $notifyReleaseStages = null)
514+
public function setNotifyReleaseStages($notifyReleaseStages = null)
515515
{
516516
$this->config->setNotifyReleaseStages($notifyReleaseStages);
517517

src/Configuration.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Configuration implements FeatureDataStore
8585
*/
8686
protected $notifier = [
8787
'name' => 'Bugsnag PHP (Official)',
88-
'version' => '3.29.1',
88+
'version' => '3.29.2',
8989
'url' => 'https://bugsnag.com',
9090
];
9191

@@ -253,7 +253,7 @@ public function isBatchSending()
253253
*
254254
* @return $this
255255
*/
256-
public function setNotifyReleaseStages(array $notifyReleaseStages = null)
256+
public function setNotifyReleaseStages($notifyReleaseStages = null)
257257
{
258258
$this->notifyReleaseStages = $notifyReleaseStages;
259259

@@ -313,7 +313,7 @@ public function getFilters()
313313
*/
314314
public function setProjectRoot($projectRoot)
315315
{
316-
$projectRootRegex = $projectRoot ? '/^'.preg_quote($projectRoot, '/').'[\\/]?/i' : null;
316+
$projectRootRegex = $projectRoot ? '/^' . preg_quote($projectRoot, '/') . '[\\/]?/i' : null;
317317
$this->setProjectRootRegex($projectRootRegex);
318318
}
319319

@@ -327,7 +327,7 @@ public function setProjectRoot($projectRoot)
327327
public function setProjectRootRegex($projectRootRegex)
328328
{
329329
if ($projectRootRegex && @preg_match($projectRootRegex, '') === false) {
330-
throw new InvalidArgumentException('Invalid project root regex: '.$projectRootRegex);
330+
throw new InvalidArgumentException('Invalid project root regex: ' . $projectRootRegex);
331331
}
332332

333333
$this->projectRootRegex = $projectRootRegex;
@@ -355,7 +355,7 @@ public function isInProject($file)
355355
*/
356356
public function setStripPath($stripPath)
357357
{
358-
$stripPathRegex = $stripPath ? '/^'.preg_quote($stripPath, '/').'[\\/]?/i' : null;
358+
$stripPathRegex = $stripPath ? '/^' . preg_quote($stripPath, '/') . '[\\/]?/i' : null;
359359
$this->setStripPathRegex($stripPathRegex);
360360
}
361361

@@ -369,7 +369,7 @@ public function setStripPath($stripPath)
369369
public function setStripPathRegex($stripPathRegex)
370370
{
371371
if ($stripPathRegex && @preg_match($stripPathRegex, '') === false) {
372-
throw new InvalidArgumentException('Invalid strip path regex: '.$stripPathRegex);
372+
throw new InvalidArgumentException('Invalid strip path regex: ' . $stripPathRegex);
373373
}
374374

375375
$this->stripPathRegex = $stripPathRegex;
@@ -670,7 +670,7 @@ public function setErrorReportingLevel($errorReportingLevel)
670670
if (!$this->isSubsetOfErrorReporting($errorReportingLevel)) {
671671
$missingLevels = implode(', ', $this->getMissingErrorLevelNames($errorReportingLevel));
672672
$message =
673-
'Bugsnag Warning: errorReportingLevel cannot contain values that are not in error_reporting. '.
673+
'Bugsnag Warning: errorReportingLevel cannot contain values that are not in error_reporting. ' .
674674
"Any errors of these levels will be ignored: {$missingLevels}.";
675675

676676
error_log($message);

src/DateTime/Date.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
final class Date
88
{
99
/**
10+
* @param ClockInterface|null $clock
11+
*
1012
* @return string
1113
*/
12-
public static function now(ClockInterface $clock = null)
14+
public static function now($clock = null)
1315
{
1416
if ($clock === null) {
1517
$clock = new Clock();

0 commit comments

Comments
 (0)