Skip to content

Commit

Permalink
SUPPORT-86543 - add symfony 6 support (#11)
Browse files Browse the repository at this point in the history
* SUPPORT-86543 - add symfony 6 support

* SUPPORT-86543 - fixed PR comments

* SUPPORT-86543 - fixed PR comments

---------

Co-authored-by: Yuri Gaidoba <[email protected]>
  • Loading branch information
ypppa and Yuri Gaidoba authored Nov 24, 2023
1 parent 56ded27 commit 7a27e88
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.2.0
### Added
- Added Symfony ^6 support.

## 2.1.1 - 2023-04-13
### Fixed
- Fix support for Symfony 5.x
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
"sentry/sdk": "^3.1",
"sentry/sentry": "^3.1",
"sentry/sentry-symfony": "^4.0",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/expression-language": "^3.0 || ^4.0 || ^5.0",
"symfony/framework-bundle": "^3.4.26|^4.2.7|^5.0",
"symfony/http-kernel": "^3.4|^4.0|^5.0",
"symfony/config": "^3.4|^4.0|^5.0|^6.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0|^6.0",
"symfony/expression-language": "^3.0 || ^4.0 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^3.4.26|^4.2.7|^5.0|^6.0",
"symfony/http-kernel": "^3.4|^4.0|^5.0|^6.0",
"symfony/monolog-bundle": "^3.4|^5.0"
},
"require-dev": {
"doctrine/annotations": "^1.14",
"doctrine/doctrine-bundle": "~2.6.0",
"doctrine/orm": "^2.10",
"phpunit/phpunit": "^8.5",
"symfony/yaml": "^4.3"
"symfony/yaml": "^4.3|^5.0|^6.0"
},
"config": {
"bin-dir": "bin",
Expand Down
2 changes: 1 addition & 1 deletion example/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct()
parent::__construct('dev', true);
}

public function registerBundles()
public function registerBundles(): array
{
return [
new FrameworkBundle(),
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/Logger/TestDbalLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestDbalLogger extends DbalLogger
{
private $queryCount = 0;

public function startQuery($sql, array $params = null, array $types = null)
public function startQuery($sql, array $params = null, array $types = null): void
{
parent::startQuery($sql, $params, $types);
$this->queryCount++;
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(string $testCaseFile, string $commonFile = 'common.y
$this->commonFile = $commonFile;
}

public function registerBundles()
public function registerBundles(): array
{
return [
new FrameworkBundle(),
Expand Down
3 changes: 2 additions & 1 deletion tests/Functional/FunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
use Symfony\Contracts\Service\ResetInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -38,7 +39,7 @@ protected function tearDown(): void
{
$container = $this->kernel->getContainer();
$this->kernel->shutdown();
if ($container instanceof ResettableContainerInterface) {
if ($container instanceof ResettableContainerInterface || $container instanceof ResetInterface) {
$container->reset();
}
$filesystem = new Filesystem();
Expand Down

0 comments on commit 7a27e88

Please sign in to comment.