Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ jobs:
symfony-version: '^6.0'
- php-version: '8.4'
symfony-version: '^7.0'
- php-version: '8.4'
symfony-version: '^8.0'
- php-version: '8.4'
symfony-version: 'latest'

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

## Unreleased

### Enhancements

* Add support for Symfony 8

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

This release should ensure compatibility with PHP 8.4 by removing the usage of certain
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/BugsnagExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Extension\Extension;

class BugsnagExtension extends Extension
{
Expand All @@ -17,7 +17,7 @@ class BugsnagExtension extends Extension
*
* @return void
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding return types won't work as long as this bundle still supports PHP 5.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I had to do it because it's mandatory since PHP 8.2 : https://3v4l.org/Pi1eW#vnull and added in the Symfony Interface since Symfony 8.0 (symfony/symfony#60697).

Maybe we can wrap this class in a condition (like this), so we can have two implementation?

WDYT?

EDIT: just tested https://3v4l.org/dZ4OT#v5.6.5 and the parser is still screaming:

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/dZ4OT on line 19

So it would needs to be handled by the autoloader somehow.

{
$config = $this->processConfiguration(new Configuration(), $configs);

Expand Down
2 changes: 1 addition & 1 deletion EventListener/BugsnagListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private function isMainRequest($requestType)
/**
* @return array<string, array{string, int}>
*/
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
$listeners = [
KernelEvents::REQUEST => ['onKernelRequest', 256],
Expand Down
2 changes: 1 addition & 1 deletion EventListener/BugsnagShutdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BugsnagShutdown implements EventSubscriberInterface, ShutdownStrategyInter
*
* @return array
*/
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
$listeners = [
KernelEvents::TERMINATE => ['onTerminate', 10],
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"require": {
"php": ">=5.5",
"bugsnag/bugsnag": "^3.29.0",
"symfony/config": "^2.7|^3|^4|^5|^6|^7",
"symfony/console": "^2.7|^3|^4|^5|^6|^7",
"symfony/dependency-injection": "^2.7|^3|^4|^5|^6|^7",
"symfony/http-foundation": "^2.7|^3|^4|^5|^6|^7",
"symfony/http-kernel": "^2.7|^3|^4|^5|^6|^7",
"symfony/security-core": "^2.7|^3|^4|^5|^6|^7"
"symfony/config": "^2.7|^3|^4|^5|^6|^7|^8",
"symfony/console": "^2.7|^3|^4|^5|^6|^7|^8",
"symfony/dependency-injection": "^2.7|^3|^4|^5|^6|^7|^8",
"symfony/http-foundation": "^2.7|^3|^4|^5|^6|^7|^8",
"symfony/http-kernel": "^2.7|^3|^4|^5|^6|^7|^8",
"symfony/security-core": "^2.7|^3|^4|^5|^6|^7|^8"
},
"require-dev": {
"graham-campbell/testbench-core": "^1.1",
Expand Down