Skip to content

Commit

Permalink
Merge pull request #67 from 1ed/symfony-7.0
Browse files Browse the repository at this point in the history
Symfony 7.0 support
  • Loading branch information
mnapoli authored Nov 30, 2023
2 parents f3a15f8 + 64e6bf0 commit 0b2ecdb
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ jobs:
max-parallel: 10
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2']
sf_version: ['5.2.*', '5.4.*', '6.0.*']
php: ['8.2', '8.3']
sf_version: ['7.0.*']
include:
- php: '8.0'
sf_version: '5.4.*'
- php: '8.1'
sf_version: '6.4.*'

steps:
- name: Set up PHP
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
"require": {
"php": ">=8.0",
"bref/bref": "^1.2|^2.0",
"symfony/filesystem": "^5.2|^6.0",
"symfony/http-kernel": "^5.2|^6.0",
"symfony/psr-http-message-bridge": "^2.1",
"symfony/runtime": "^5.2|^6.0"
"symfony/filesystem": "^5.4|^6.0|^7.0",
"symfony/http-kernel": "^5.4|^6.0|^7.0",
"symfony/psr-http-message-bridge": "^2.1|^6.4|^7.0",
"symfony/runtime": "^5.4|^6.0|^7.0"
},
"require-dev": {
"mnapoli/hard-mode": "^0.3.0",
"phpstan/phpstan": "^1.3",
"phpunit/phpunit": "^8.5.22",
"symfony/config": "^5.2|^6.0",
"symfony/dependency-injection": "^5.2|^6.0",
"symfony/framework-bundle": "^5.2|^6.0",
"symfony/phpunit-bridge": "^6.0",
"symfony/process": "^5.2|^6.0"
"symfony/config": "^5.4|^6.0|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
"symfony/phpunit-bridge": "^6.0|^7.0",
"symfony/process": "^5.4|^6.0|^7.0"
},
"config": {
"sort-packages": true,
Expand Down
2 changes: 1 addition & 1 deletion src/BrefKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function getLogDir(): string
*
* @see https://github.com/brefphp/symfony-bridge/pull/37
*/
public function handle($request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true): Response
public function handle($request, $type = HttpKernelInterface::MAIN_REQUEST, $catch = true): Response
{
$this->prepareCacheDir(parent::getCacheDir(), $this->getCacheDir());

Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/App/src/Command/PingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace App\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand('app:ping')]
class PingCommand extends Command
{
protected static $defaultName = 'app:ping';

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('Ok');

Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/App/src/Command/WriteToCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -10,10 +11,9 @@
/**
* This command tests writing to the system cache.
*/
#[AsCommand('write-to-cache')]
class WriteToCacheCommand extends Command
{
protected static $defaultName = 'write-to-cache';

/** @var CacheInterface */
private $systemCache;

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/App/src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function configureRoutes($routes): void
*
* It lets us detect whenever the compiled container is being rebuilt.
*/
protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass)
protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass): void
{
echo "Symfony is compiling the container\n";

Expand Down

0 comments on commit 0b2ecdb

Please sign in to comment.