Skip to content

Commit

Permalink
symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Feb 17, 2024
1 parent d1e3ba5 commit 30cdb43
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-->
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
push:
branches:
- "master"
- "[0-9]+.x"
- "[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.x"
Expand All @@ -15,6 +14,7 @@ jobs:
runs-on: "ubuntu-20.04"
env:
SYMFONY_DEPRECATIONS_HELPER: weak
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}

strategy:
fail-fast: false
Expand All @@ -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"
Expand All @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

3.0.2
-----

* Allow installation with Symfony 7.

3.0.1
-----

Expand Down
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/ChainRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/DynamicRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30cdb43

Please sign in to comment.