Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce cache drivers #200

Merged
merged 4 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/composer-json-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: "composer-normalize --dry-run"

- name: "Check composer.json explicit dependencies"
run: "composer-require-checker check"
run: "composer-require-checker check --config-file=$(realpath composer-require-checker.json)"

- name: "Check composer.json unused dependencies"
run: "composer-unused"
3 changes: 2 additions & 1 deletion benchmark/Dispatching.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace FastRoute\Benchmark;

use FastRoute\Cache;
use FastRoute\DataGenerator;
use FastRoute\Dispatcher;
use Generator;
Expand Down Expand Up @@ -53,7 +54,7 @@ public function initializeDispatchers(): void
);
}

/** @param array<string, string> $options */
/** @param array{routeParser?: string, dataGenerator?: string, dispatcher?: string, routeCollector?: string, cacheDisabled?: bool, cacheKey?: string, cacheDriver?: string|Cache} $options */
abstract protected function createDispatcher(array $options = []): Dispatcher;

/** @return Generator<string, array<string, mixed>> */
Expand Down
18 changes: 18 additions & 0 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"symbol-whitelist" : [
"null", "true", "false",
"static", "self", "parent",
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", "mixed"
],
"php-core-extensions" : [
"Core",
"date",
"pcre",
"Phar",
"Reflection",
"SPL",
"standard",
"apcu"
],
"scan-files" : []
}
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^9.5"
},
"suggest": {
"ext-apcu": "To be able to use APCu cache driver"
},
"config": {
"preferred-install": "dist",
"sort-packages": true
Expand Down
Loading