Skip to content

Commit

Permalink
Merge pull request #674 from bugsnag/next
Browse files Browse the repository at this point in the history
PHP 3.29.2 release
  • Loading branch information
Cawllec authored Jan 13, 2025
2 parents 5b53e4a + 76a0d58 commit 437ac55
Show file tree
Hide file tree
Showing 17 changed files with 346 additions and 172 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
guzzle-version: ['^5.3', '^6.0']
include:
- php-version: '7.2'
guzzle-version: '^7.0'
guzzle-version: '<7.3'
- php-version: '7.3'
guzzle-version: '^7.0'
- php-version: '7.4'
Expand All @@ -23,6 +23,10 @@ jobs:
guzzle-version: '^7.0'
- php-version: '8.2'
guzzle-version: '^7.0'
- php-version: '8.3'
guzzle-version: '^7.0'
- php-version: '8.4'
guzzle-version: '^7.9'

steps:
- uses: actions/checkout@v2
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Changelog
=========

## 3.29.2 (2025-01-13)

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

### Fixes

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


## 3.29.1 (2023-05-10)

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"guzzlehttp/guzzle": "^5.0|^6.0|^7.0"
},
"require-dev": {
"guzzlehttp/psr7": "^1.3",
"guzzlehttp/psr7": "^1.3|^2.0",
"mtdowling/burgomaster": "dev-master#72151eddf5f0cf101502b94bf5031f9c53501a04",
"phpunit/phpunit": "^4.8.36|^7.5.15|^9.3.10",
"php-mock/php-mock-phpunit": "^1.1|^2.1",
Expand Down
22 changes: 11 additions & 11 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ public static function make(
*/
public function __construct(
Configuration $config,
ResolverInterface $resolver = null,
GuzzleHttp\ClientInterface $guzzle = null,
ShutdownStrategyInterface $shutdownStrategy = null
$resolver = null,
$guzzle = null,
$shutdownStrategy = null
) {
$guzzle = $guzzle ?: self::makeGuzzle();

Expand Down Expand Up @@ -271,10 +271,10 @@ public function registerCallback(callable $callback)
public function registerDefaultCallbacks()
{
$this->registerCallback(new GlobalMetaData($this->config))
->registerCallback(new RequestMetaData($this->resolver))
->registerCallback(new RequestSession($this->resolver))
->registerCallback(new RequestUser($this->resolver))
->registerCallback(new RequestContext($this->resolver));
->registerCallback(new RequestMetaData($this->resolver))
->registerCallback(new RequestSession($this->resolver))
->registerCallback(new RequestUser($this->resolver))
->registerCallback(new RequestContext($this->resolver));

return $this;
}
Expand Down Expand Up @@ -327,7 +327,7 @@ public function clearBreadcrumbs()
*
* @return void
*/
public function notifyException($throwable, callable $callback = null)
public function notifyException($throwable, $callback = null)
{
$report = Report::fromPHPThrowable($this->config, $throwable);

Expand All @@ -343,7 +343,7 @@ public function notifyException($throwable, callable $callback = null)
*
* @return void
*/
public function notifyError($name, $message, callable $callback = null)
public function notifyError($name, $message, $callback = null)
{
$report = Report::fromNamedError($this->config, $name, $message);

Expand All @@ -360,7 +360,7 @@ public function notifyError($name, $message, callable $callback = null)
*
* @return void
*/
public function notify(Report $report, callable $callback = null)
public function notify(Report $report, $callback = null)
{
$this->pipeline->execute($report, function ($report) use ($callback) {
if ($callback) {
Expand Down Expand Up @@ -511,7 +511,7 @@ public function isBatchSending()
*
* @return $this
*/
public function setNotifyReleaseStages(array $notifyReleaseStages = null)
public function setNotifyReleaseStages($notifyReleaseStages = null)
{
$this->config->setNotifyReleaseStages($notifyReleaseStages);

Expand Down
14 changes: 7 additions & 7 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Configuration implements FeatureDataStore
*/
protected $notifier = [
'name' => 'Bugsnag PHP (Official)',
'version' => '3.29.1',
'version' => '3.29.2',
'url' => 'https://bugsnag.com',
];

Expand Down Expand Up @@ -253,7 +253,7 @@ public function isBatchSending()
*
* @return $this
*/
public function setNotifyReleaseStages(array $notifyReleaseStages = null)
public function setNotifyReleaseStages($notifyReleaseStages = null)
{
$this->notifyReleaseStages = $notifyReleaseStages;

Expand Down Expand Up @@ -313,7 +313,7 @@ public function getFilters()
*/
public function setProjectRoot($projectRoot)
{
$projectRootRegex = $projectRoot ? '/^'.preg_quote($projectRoot, '/').'[\\/]?/i' : null;
$projectRootRegex = $projectRoot ? '/^' . preg_quote($projectRoot, '/') . '[\\/]?/i' : null;
$this->setProjectRootRegex($projectRootRegex);
}

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

$this->projectRootRegex = $projectRootRegex;
Expand Down Expand Up @@ -355,7 +355,7 @@ public function isInProject($file)
*/
public function setStripPath($stripPath)
{
$stripPathRegex = $stripPath ? '/^'.preg_quote($stripPath, '/').'[\\/]?/i' : null;
$stripPathRegex = $stripPath ? '/^' . preg_quote($stripPath, '/') . '[\\/]?/i' : null;
$this->setStripPathRegex($stripPathRegex);
}

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

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

error_log($message);
Expand Down
4 changes: 3 additions & 1 deletion src/DateTime/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
final class Date
{
/**
* @param ClockInterface|null $clock
*
* @return string
*/
public static function now(ClockInterface $clock = null)
public static function now($clock = null)
{
if ($clock === null) {
$clock = new Clock();
Expand Down
Loading

0 comments on commit 437ac55

Please sign in to comment.