Skip to content

Commit

Permalink
Require PHP 8.1
Browse files Browse the repository at this point in the history
Signed-off-by: Luís Cobucci <[email protected]>
  • Loading branch information
lcobucci committed Jul 27, 2023
1 parent 6d4284b commit ea72851
Show file tree
Hide file tree
Showing 26 changed files with 631 additions and 1,108 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backwards-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
php-version: "8.1"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr
env:
Expand All @@ -32,8 +32,8 @@ jobs:
uses: "actions/cache@v3"
with:
path: ${{ steps.composer-cache.outputs.composer_cache_dir }}
key: "php-7.4-bc-break-check-${{ hashFiles('.github/workflows/backwards-compatibility.yml') }}"
restore-keys: "php-7.4-bc-break-check-"
key: "php-8.1-bc-break-check-${{ hashFiles('.github/workflows/backwards-compatibility.yml') }}"
restore-keys: "php-8.1-bc-break-check-"

- name: "Install dependencies"
run: composer global require roave/backward-compatibility-check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
dependencies:
- "highest"
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.1"
operating-system:
- "ubuntu-latest"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/composer-json-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
dependencies:
- "highest"
php-version:
- "7.4"
- "8.1"
operating-system:
- "ubuntu-latest"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- "locked"
- "development"
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.1"
operating-system:
- "ubuntu-latest"

Expand Down
8 changes: 4 additions & 4 deletions benchmark/Dispatching.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ public function initializeDispatchers(): void
[
'dataGenerator' => DataGenerator\GroupCountBased::class,
'dispatcher' => Dispatcher\GroupCountBased::class,
]
],
);
$this->dispatchers['char_count'] = $this->createDispatcher(
[
'dataGenerator' => DataGenerator\CharCountBased::class,
'dispatcher' => Dispatcher\CharCountBased::class,
]
],
);
$this->dispatchers['group_pos'] = $this->createDispatcher(
[
'dataGenerator' => DataGenerator\GroupPosBased::class,
'dispatcher' => Dispatcher\GroupPosBased::class,
]
],
);
$this->dispatchers['mark'] = $this->createDispatcher(
[
'dataGenerator' => DataGenerator\MarkBased::class,
'dispatcher' => Dispatcher\MarkBased::class,
]
],
);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmark/ManyRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static function (RouteCollector $routes): void {
$routes->addRoute('GET', '/abc{foo}/' . $i, ['name' => 'not-static-' . $i]);
}
},
$options
$options,
);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmark/RealLifeExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static function (RouteCollector $routes): void {
$routes->addRoute(['PUT', 'PATCH'], '/admin/category/{category_id:\d+}', ['name' => 'admin.category.update']);
$routes->addRoute('DELETE', '/admin/category/{category_id:\d+}', ['name' => 'admin.category.destroy']);
},
$options
$options,
);
}

Expand Down
46 changes: 23 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,33 @@
{
"name": "nikic/fast-route",
"description": "Fast request router for PHP",
"license": "BSD-3-Clause",
"keywords": [
"routing",
"router"
],
"license": "BSD-3-Clause",
"authors": [
{
"name": "Nikita Popov",
"email": "[email protected]"
}
],
"require": {
"php": ">=7.4.0"
"php": ">=8.1.0"
},
"require-dev": {
"doctrine/coding-standard": "^9.0",
"phpbench/phpbench": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^9.5"
"doctrine/coding-standard": "^12.0",
"phpbench/phpbench": "^1.2",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "^9.6"
},
"suggest": {
"ext-apcu": "To be able to use APCu cache driver"
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
}
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"FastRoute\\": "src/"
Expand All @@ -54,5 +41,18 @@
"FastRoute\\Benchmark\\": "benchmark/",
"FastRoute\\Test\\": "test/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
},
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
}
}
Loading

0 comments on commit ea72851

Please sign in to comment.