Skip to content

Commit 4c78ca8

Browse files
authoredMay 6, 2022
Merge pull request #43 from gjuric/psr_container_2
Allow psr/container 2.0 and Symfony 6
2 parents 2de0e6f + eb66248 commit 4c78ca8

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed
 

‎composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"require": {
66
"php": "~8.0.0 || ~8.1.0",
77
"phpunit/phpunit": "^9.0",
8-
"psr/container": "^1.0",
8+
"psr/container": "^1.0 || ^2.0",
99
"zalas/injector": "^2.0"
1010
},
1111
"require-dev": {
12-
"symfony/config": "^4.4.12 || ^5.3",
13-
"symfony/dependency-injection": "^4.4.12 || ^5.3",
14-
"symfony/http-kernel": "^4.4.12 || ^5.3",
12+
"symfony/config": "^4.4.12 || ^5.3 || ^6.0",
13+
"symfony/dependency-injection": "^4.4.12 || ^5.3 || ^6.0",
14+
"symfony/http-kernel": "^4.4.12 || ^5.3 || ^6.0",
1515
"zalas/phpunit-globals": "^2.0",
16-
"symfony/framework-bundle": "^4.4.12 || ^5.3",
16+
"symfony/framework-bundle": "^4.4.12 || ^5.3 || ^6.0",
1717
"zalas/phpunit-doubles": "^1.5",
1818
"phpspec/prophecy": "^1.9",
1919
"phpspec/prophecy-phpunit": "^2.0"

‎tests/Symfony/TestCase/Fixtures/FrameworkBundle/AnotherTestKernel.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212

1313
class AnotherTestKernel extends Kernel
1414
{
15-
public function registerBundles()
15+
public function registerBundles(): array
1616
{
1717
return [
1818
new FrameworkBundle(),
1919
];
2020
}
2121

22-
public function getCacheDir()
22+
public function getCacheDir(): string
2323
{
2424
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/FrameworkBundle/AnotherTestKernel/cache/'.$this->environment;
2525
}
2626

27-
public function getLogDir()
27+
public function getLogDir(): string
2828
{
2929
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/FrameworkBundle/AnotherTestKernel/logs';
3030
}

‎tests/Symfony/TestCase/Fixtures/FrameworkBundle/TestKernel.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ public function __construct(string $environment, bool $debug)
1818
parent::__construct($environment, $debug);
1919
}
2020

21-
public function registerBundles()
21+
public function registerBundles(): array
2222
{
2323
return [
2424
new FrameworkBundle(),
2525
];
2626
}
2727

28-
public function getCacheDir()
28+
public function getCacheDir(): string
2929
{
3030
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/FrameworkBundle/TestKernel/cache/'.$this->environment;
3131
}
3232

33-
public function getLogDir()
33+
public function getLogDir(): string
3434
{
3535
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/FrameworkBundle/TestKernel/logs';
3636
}

‎tests/Symfony/TestCase/Fixtures/NoFrameworkBundle/AnotherTestKernel.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414

1515
class AnotherTestKernel extends Kernel
1616
{
17-
public function registerBundles()
17+
public function registerBundles(): array
1818
{
1919
return [];
2020
}
2121

22-
public function getCacheDir()
22+
public function getCacheDir(): string
2323
{
2424
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/NoFrameworkBundle/AnotherTestKernel/cache/'.$this->environment;
2525
}
2626

27-
public function getLogDir()
27+
public function getLogDir(): string
2828
{
2929
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/NoFrameworkBundle/AnotherTestKernel/logs';
3030
}

‎tests/Symfony/TestCase/Fixtures/NoFrameworkBundle/TestKernel.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ public function __construct(string $environment, bool $debug)
1919
parent::__construct($environment, $debug);
2020
}
2121

22-
public function registerBundles()
22+
public function registerBundles(): array
2323
{
2424
return [];
2525
}
2626

27-
public function getCacheDir()
27+
public function getCacheDir(): string
2828
{
2929
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/NoFrameworkBundle/TestKernel/cache/'.$this->environment;
3030
}
3131

32-
public function getLogDir()
32+
public function getLogDir(): string
3333
{
3434
return \sys_get_temp_dir().'/ZalasPHPUnitInjector/NoFrameworkBundle/TestKernel/logs';
3535
}

‎tests/TestListener/ServiceInjectorListenerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function get($id)
7272
};
7373
}
7474

75-
public function has($id)
75+
public function has($id): bool
7676
{
7777
return \in_array($id, [Service1::class, 'foo.service2'], true);
7878
}

‎tests/phar/tests/PharTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function get($id)
3131
};
3232
}
3333

34-
public function has($id)
34+
public function has($id): bool
3535
{
3636
return \in_array($id, ['foo.service'], true);
3737
}

0 commit comments

Comments
 (0)
Please sign in to comment.