Skip to content

Commit 0b2ecdb

Browse files
authored
Merge pull request #67 from 1ed/symfony-7.0
Symfony 7.0 support
2 parents f3a15f8 + 64e6bf0 commit 0b2ecdb

File tree

6 files changed

+23
-18
lines changed

6 files changed

+23
-18
lines changed

.github/workflows/ci.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ jobs:
1010
max-parallel: 10
1111
fail-fast: false
1212
matrix:
13-
php: ['8.0', '8.1', '8.2']
14-
sf_version: ['5.2.*', '5.4.*', '6.0.*']
13+
php: ['8.2', '8.3']
14+
sf_version: ['7.0.*']
15+
include:
16+
- php: '8.0'
17+
sf_version: '5.4.*'
18+
- php: '8.1'
19+
sf_version: '6.4.*'
1520

1621
steps:
1722
- name: Set up PHP

composer.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@
2424
"require": {
2525
"php": ">=8.0",
2626
"bref/bref": "^1.2|^2.0",
27-
"symfony/filesystem": "^5.2|^6.0",
28-
"symfony/http-kernel": "^5.2|^6.0",
29-
"symfony/psr-http-message-bridge": "^2.1",
30-
"symfony/runtime": "^5.2|^6.0"
27+
"symfony/filesystem": "^5.4|^6.0|^7.0",
28+
"symfony/http-kernel": "^5.4|^6.0|^7.0",
29+
"symfony/psr-http-message-bridge": "^2.1|^6.4|^7.0",
30+
"symfony/runtime": "^5.4|^6.0|^7.0"
3131
},
3232
"require-dev": {
3333
"mnapoli/hard-mode": "^0.3.0",
3434
"phpstan/phpstan": "^1.3",
3535
"phpunit/phpunit": "^8.5.22",
36-
"symfony/config": "^5.2|^6.0",
37-
"symfony/dependency-injection": "^5.2|^6.0",
38-
"symfony/framework-bundle": "^5.2|^6.0",
39-
"symfony/phpunit-bridge": "^6.0",
40-
"symfony/process": "^5.2|^6.0"
36+
"symfony/config": "^5.4|^6.0|^7.0",
37+
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
38+
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
39+
"symfony/phpunit-bridge": "^6.0|^7.0",
40+
"symfony/process": "^5.4|^6.0|^7.0"
4141
},
4242
"config": {
4343
"sort-packages": true,

src/BrefKernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getLogDir(): string
4141
*
4242
* @see https://github.com/brefphp/symfony-bridge/pull/37
4343
*/
44-
public function handle($request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true): Response
44+
public function handle($request, $type = HttpKernelInterface::MAIN_REQUEST, $catch = true): Response
4545
{
4646
$this->prepareCacheDir(parent::getCacheDir(), $this->getCacheDir());
4747

tests/Functional/App/src/Command/PingCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace App\Command;
44

5+
use Symfony\Component\Console\Attribute\AsCommand;
56
use Symfony\Component\Console\Command\Command;
67
use Symfony\Component\Console\Input\InputInterface;
78
use Symfony\Component\Console\Output\OutputInterface;
89

10+
#[AsCommand('app:ping')]
911
class PingCommand extends Command
1012
{
11-
protected static $defaultName = 'app:ping';
12-
13-
protected function execute(InputInterface $input, OutputInterface $output)
13+
protected function execute(InputInterface $input, OutputInterface $output): int
1414
{
1515
$output->writeln('Ok');
1616

tests/Functional/App/src/Command/WriteToCacheCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Command;
44

5+
use Symfony\Component\Console\Attribute\AsCommand;
56
use Symfony\Component\Console\Command\Command;
67
use Symfony\Component\Console\Input\InputInterface;
78
use Symfony\Component\Console\Output\OutputInterface;
@@ -10,10 +11,9 @@
1011
/**
1112
* This command tests writing to the system cache.
1213
*/
14+
#[AsCommand('write-to-cache')]
1315
class WriteToCacheCommand extends Command
1416
{
15-
protected static $defaultName = 'write-to-cache';
16-
1717
/** @var CacheInterface */
1818
private $systemCache;
1919

tests/Functional/App/src/Kernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function configureRoutes($routes): void
5757
*
5858
* It lets us detect whenever the compiled container is being rebuilt.
5959
*/
60-
protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass)
60+
protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass): void
6161
{
6262
echo "Symfony is compiling the container\n";
6363

0 commit comments

Comments
 (0)