Skip to content

Commit

Permalink
SUPPORT-86537 - added support of symfony 6 (#6)
Browse files Browse the repository at this point in the history
* SUPPORT-86537 - added support of symfony 6

* SUPPORT-86537 - fixed PR comments

* SUPPORT-86537 - fixed PR comments

---------

Co-authored-by: Yuri Gaidoba <[email protected]>
  • Loading branch information
ypppa and Yuri Gaidoba authored Nov 24, 2023
1 parent 87fc1be commit fe2d593
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ vendor/
composer.lock
bin/
phpunit.xml

.phpunit.result.cache
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).

## 1.3.0
### Added
- Support for Symfony 6

## 1.2.0
### Added
- Support for Symfony 5.4
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"require": {
"php": "^7.0 || ^8.0",
"paysera/lib-normalization": "^1.2",
"symfony/framework-bundle": "^3.4.26|^4.2.7|^5.4",
"symfony/framework-bundle": "^3.4.26|^4.2.7|^5.4|^6.0",
"paysera/lib-dependency-injection": "^1.3.0"
},
"require-dev": {
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 @@ -20,7 +20,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
5 changes: 3 additions & 2 deletions tests/Functional/FunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Paysera\Bundle\NormalizationBundle\Tests\Functional\Fixtures\TestKernel;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
use Symfony\Contracts\Service\ResetInterface;
use Symfony\Component\Filesystem\Filesystem;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

Expand All @@ -28,11 +29,11 @@ protected function tear_down()
{
$container = $this->kernel->getContainer();
$this->kernel->shutdown();
if ($container instanceof ResettableContainerInterface) {
if ($container instanceof ResettableContainerInterface || $container instanceof ResetInterface) {
$container->reset();
}

$filesystem = new Filesystem();
$filesystem->remove($this->kernel->getRootDir() . '/cache');
$filesystem->remove($this->kernel->getCacheDir());
}
}

0 comments on commit fe2d593

Please sign in to comment.