diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2fe5308..860c842 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -39,5 +39,5 @@ $ composer show --latest 'symfony-cmf/*' If it's an error message or piece of code, use code block tags, and make sure you provide the whole stack trace(s), not just the first error message you can see. - More details here: https://github.com/symfony-cmf/Routing/blob/master/CONTRIBUTING.md#issues + More details here: https://github.com/symfony-cmf/Routing/blob/3.x/CONTRIBUTING.md#issues --> diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0d8f7f7..297c24a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ | Q | A | ------------- | --- -| Branch? | "master" for new features / the branch of the current release for fixes +| Branch? | default branch for new features / the branch of the current release for fixes | Bug fix? | yes/no | New feature? | yes/no | BC breaks? | yes/no diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index fd4c9b8..eaa96de 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -4,7 +4,6 @@ on: pull_request: push: branches: - - "master" - "[0-9]+.x" - "[0-9]+.[0-9]+" - "[0-9]+.[0-9]+.x" @@ -15,6 +14,7 @@ jobs: runs-on: "ubuntu-20.04" env: SYMFONY_DEPRECATIONS_HELPER: weak + SYMFONY_REQUIRE: ${{ matrix.symfony-version }} strategy: fail-fast: false @@ -27,11 +27,13 @@ jobs: symfony-version: "6" - php-version: "8.1" - symfony-version: "6" + - php-version: "8.2" + - php-version: "8.3" + symfony-version: "7" steps: - name: "Checkout project" - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: "Install and configure PHP" uses: "shivammathur/setup-php@v2" @@ -40,12 +42,14 @@ jobs: extensions: "pdo, pdo_sqlite" tools: "composer:v2" - - name: "Require Specific Symfony Version" + - name: "Flex" if: "${{ matrix.symfony-version }}" - run: composer require --no-update symfony/flex && composer config extra.symfony.require ${{ matrix.symfony-version}} + run: | + composer global require --no-progress --no-scripts --no-plugins symfony/flex + composer global config --no-plugins allow-plugins.symfony/flex true - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v1" + uses: "ramsey/composer-install@v2" with: dependency-versions: "${{ matrix.dependencies }}" composer-options: "--prefer-dist" diff --git a/CHANGELOG.md b/CHANGELOG.md index 56ea42b..b532a2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +3.0.2 +----- + +* Allow installation with Symfony 7. + 3.0.1 ----- diff --git a/composer.json b/composer.json index 3a3edac..6841d24 100644 --- a/composer.json +++ b/composer.json @@ -16,16 +16,15 @@ ], "require": { "php": "^8.0", - "symfony/routing": "^6.0", - "symfony/http-kernel": "^6.0", + "symfony/routing": "^6.0 || ^7.0", + "symfony/http-kernel": "^6.0 || ^7.0", "psr/log": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "doctrine/annotations": "^1.5", - "symfony/phpunit-bridge": "^6.0", - "symfony/dependency-injection": "^6.0", - "symfony/config": "^6.0", - "symfony/event-dispatcher": "^6.0" + "symfony/phpunit-bridge": "^7.0.3", + "symfony/dependency-injection": "^6.0 || ^7.0", + "symfony/config": "^6.0 || ^7.0", + "symfony/event-dispatcher": "^6.0 || ^7.0" }, "suggest": { "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ^6.0" diff --git a/src/ChainRouter.php b/src/ChainRouter.php index 23dc1ca..6c39c97 100644 --- a/src/ChainRouter.php +++ b/src/ChainRouter.php @@ -279,11 +279,11 @@ public function setContext(RequestContext $context): void $this->context = $context; } - public function warmUp(string $cacheDir): array + public function warmUp(string $cacheDir, ?string $buildDir = null): array { foreach ($this->all() as $router) { if ($router instanceof WarmableInterface) { - $router->warmUp($cacheDir); + $router->warmUp($cacheDir, $buildDir); } } diff --git a/src/DynamicRouter.php b/src/DynamicRouter.php index 86e46e2..63cbabd 100644 --- a/src/DynamicRouter.php +++ b/src/DynamicRouter.php @@ -73,7 +73,7 @@ public function __construct( /** * {@inheritdoc} */ - public function getRouteCollection(): ?RouteCollection + public function getRouteCollection(): RouteCollection { if (!$this->routeCollection instanceof RouteCollection) { $this->routeCollection = $this->provider