Skip to content

Commit

Permalink
Added symfony 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Emelyanov committed Feb 16, 2024
1 parent 1fcf74d commit 0919c95
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
- { os: ubuntu-latest, php: 7.3, experimental: false}
- { os: ubuntu-latest, php: 7.4, experimental: false}
- { os: ubuntu-latest, php: 8.0, experimental: false}
- { os: ubuntu-latest, php: 8.1, experimental: true}
- { os: ubuntu-latest, php: 8.1, experimental: false }
- { os: ubuntu-latest, php: 8.2, packages: symfony/symfony=6.*, experimental: true }
- { os: ubuntu-latest, php: 7.1, packages: symfony/symfony=3.4.*, experimental: false}
- { os: ubuntu-latest, php: 7.1, packages: symfony/symfony=4.0.*, experimental: false}
- { os: ubuntu-latest, php: 8.0, packages: symfony/symfony=4.*, experimental: false}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ vendor/
build/
target/
.php_cs.cache
.idea/
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"doctrine/dbal": "^2.3",
"doctrine/doctrine-bundle": "~1.5 || ^2.0",
"doctrine/orm": "~2.4",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0 || ^10.0",
"predis/predis": "^1.1",
"symfony/browser-kit": "~2.8 || ~3.0 || ~4.0 || ^5.0",
"symfony/config": "~2.8 || ~3.0 || ~4.0 || ^5.0",
"symfony/dependency-injection": "~2.8 || ~3.0 || ~4.0 || ^5.0",
"symfony/framework-bundle": "~2.8 || ~3.0 || ~4.0 || ^5.0",
"symfony/http-kernel": "~2.8 || ~3.0 || ~4.0 || ^5.0",
"symfony/routing": "~2.8 || ~3.0 || ~4.0 || ^5.0",
"symfony/stopwatch": "~2.8 || ~3.0 || ~4.0 || ^5.0",
"symfony/yaml": "~2.8 || ~3.0 || ~4.0 || ^5.0"
"symfony/browser-kit": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0",
"symfony/config": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0",
"symfony/dependency-injection": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0",
"symfony/framework-bundle": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0",
"symfony/http-kernel": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0",
"symfony/routing": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0",
"symfony/stopwatch": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0",
"symfony/yaml": "~2.8 || ~3.0 || ~4.0 || ^5.0 || ^6.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Adapters/Redis/RedisConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function testAdjustMetric(): void
->expects($this->once())
->method('hincrbyfloat')
->with(self::METRICS_KEY, $expectedField, $value)
->willReturn(17);
->willReturn(17.0);

$actual = $this->redisConnection->adjustMetric('test', $value, ['severity' => 'high']);
self::assertEquals(17, $actual);
Expand Down
3 changes: 2 additions & 1 deletion tests/MetricBundle/AbstractMetricBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\KernelInterface;

abstract class AbstractMetricBundleTest extends WebTestCase
{
Expand All @@ -33,7 +34,7 @@ protected static function getEntityManager(): EntityManagerInterface
return static::$em;
}

protected static function createKernel(array $options = [])
protected static function createKernel(array $options = []): KernelInterface
{
$kernel = parent::createKernel($options);
$fs = new Filesystem();
Expand Down
10 changes: 5 additions & 5 deletions tests/MetricBundle/Fixtures/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
final class TestKernel extends Kernel
{
/** {@inheritdoc} */
public function registerBundles()
public function registerBundles(): iterable
{
return [
new FrameworkBundle(),
Expand All @@ -27,22 +27,22 @@ public function registerContainerConfiguration(LoaderInterface $loader)
$loader->load(__DIR__ . '/config.yml');
}

public function getRootDir()
public function getRootDir(): string
{
return __DIR__;
}

public function getProjectDir()
public function getProjectDir(): string
{
return __DIR__;
}

public function getCacheDir()
public function getCacheDir(): string
{
return __DIR__ . '/../../../build/cache';
}

public function getLogDir()
public function getLogDir(): string
{
return __DIR__ . '/../../../build/logs';
}
Expand Down

0 comments on commit 0919c95

Please sign in to comment.