Skip to content

Commit

Permalink
Add Symfony 7 support (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCadien authored Jul 3, 2024
1 parent 34ccb32 commit ef8b826
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-latest

env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DATABASE_URL: mysql://root:[email protected]:3306/su_headless_test?serverVersion=5.7
DATABASE_CHARSET: utf8mb4
DATABASE_COLLATE: utf8mb4_unicode_ci
Expand Down Expand Up @@ -111,6 +112,7 @@ jobs:
runs-on: ubuntu-latest

env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DATABASE_URL: mysql://root:[email protected]:3306/su_headless_test?serverVersion=5.7
DATABASE_CHARSET: utf8mb4
DATABASE_COLLATE: utf8mb4_unicode_ci
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('sulu_headless');
$rootNode = $treeBuilder->getRootNode();
Expand Down
7 changes: 6 additions & 1 deletion Tests/Functional/Controller/NavigationControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,13 @@ protected function setUp(): void
public function provideAttributes(): \Generator
{
$path = '';

$suluSuluVersion = \Composer\InstalledVersions::getVersion('sulu/sulu');

/* Todo Can be removed after ending support of sulu 2.5 */
if (\version_compare(\Composer\InstalledVersions::getVersion('sulu/sulu') ?? '999.999.999', '2.6.0', '<')
if ($suluSuluVersion
&& \version_compare($suluSuluVersion, '2.6.0', '<')
&& 0 !== \strpos($suluSuluVersion, 'dev-')
) {
$path = '/legacy/';
}
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"require": {
"php": "^7.3 || ^8.0",
"sulu/sulu": "^2.4 || ^2.5@dev",
"symfony/config": "^4.4 || ^5.0 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/http-foundation": "^4.4 || ^5.0 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0"
"symfony/config": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/framework-bundle": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/http-foundation": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/http-kernel": "^4.4 || ^5.4 || ^6.3 || ^7.0"
},
"require-dev": {
"coduo/php-matcher": "^5.0 || ^6.0",
"handcraftedinthealps/code-coverage-checker": "^0.2.1",
"handcraftedinthealps/zendsearch": "^2.0",
"jackalope/jackalope-doctrine-dbal": "^1.3.4",
"jackalope/jackalope-doctrine-dbal": "^1.3.4 || ^2.0",
"jangregor/phpstan-prophecy": "^1.0",
"php-cs-fixer/shim": "^3.0",
"phpspec/prophecy": "^1.8",
Expand All @@ -26,10 +26,10 @@
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^9.6",
"symfony/browser-kit": "^4.4 || ^5.0 || ^6.0",
"symfony/console": "^4.4 || ^5.0 || ^6.0",
"symfony/dotenv": "^4.4 || ^5.0 || ^6.0",
"symfony/error-handler": "^4.4 || ^5.0 || ^6.0",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/console": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/dotenv": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/error-handler": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/monolog-bundle": "^3.1",
"thecodingmachine/phpstan-strict-rules": "^1.0"
},
Expand Down

0 comments on commit ef8b826

Please sign in to comment.