diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 486fa18..10c4537 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_headless_test?serverVersion=5.7 DATABASE_CHARSET: utf8mb4 DATABASE_COLLATE: utf8mb4_unicode_ci @@ -111,6 +112,7 @@ jobs: runs-on: ubuntu-latest env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_headless_test?serverVersion=5.7 DATABASE_CHARSET: utf8mb4 DATABASE_COLLATE: utf8mb4_unicode_ci diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 5f576ef..63b65ee 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -18,7 +18,7 @@ class Configuration implements ConfigurationInterface { - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('sulu_headless'); $rootNode = $treeBuilder->getRootNode(); diff --git a/Tests/Functional/Controller/NavigationControllerTest.php b/Tests/Functional/Controller/NavigationControllerTest.php index 45557d7..f8f3f9f 100644 --- a/Tests/Functional/Controller/NavigationControllerTest.php +++ b/Tests/Functional/Controller/NavigationControllerTest.php @@ -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/'; } diff --git a/composer.json b/composer.json index 221ea29..096ac13 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -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" },