Skip to content

Commit e088172

Browse files
committed
fix cs, phpstan and spellcheck
1 parent befa4b8 commit e088172

File tree

10 files changed

+12
-18
lines changed

10 files changed

+12
-18
lines changed

.github/workflows/spellcheck.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- name: Set up Python
1717
uses: actions/setup-python@v5
18-
with:
19-
python-version: 3.7
2018
- name: Install dependencies
2119
run: |
2220
python -m pip install --upgrade setuptools
@@ -25,7 +23,4 @@ jobs:
2523
run: |
2624
make -C doc/ spelling
2725
if [[ -s "doc/_build/spelling/output.txt" ]]; then echo "\nSpelling errors found\n" && cat "doc/_build/spelling/output.txt"; fi
28-
- name: Spellcheck
29-
run: |
30-
if [[ -s "doc/_build/spelling/output.txt" ]]; then cat "doc/_build/spelling/output.txt"; fi
3126
if [[ -s "doc/_build/spelling/output.txt" ]]; then false; fi

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@v4
1717

1818
- name: Pull in optional dependencies
19-
run: composer require --no-update phpunit/phpunit toflar/psr6-symfony-http-cache-store:^4.2
19+
run: composer require --no-update phpunit/phpunit toflar/psr6-symfony-http-cache-store:^4.2 symfony/process
2020

2121
- name: Cache Vendor
2222
id: cache-vendor

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@ doctest:
154154
"results in $(BUILDDIR)/doctest/output.txt."
155155

156156
spelling:
157-
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
157+
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) -w $(BUILDDIR)/spelling/output.txt $(BUILDDIR)/spelling
158158
@echo "Spelling report generated in $(BUILDDIR)/spelling/output.txt"

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ sphinx-tabs
44
sphinxcontrib-phpdomain
55
sphinxcontrib-spelling
66
pyenchant
7+

phpstan.neon.dist

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,3 @@ parameters:
22
level: 1
33
paths:
44
- src
5-
excludePaths:
6-
analyseAndScan:
7-
# contains code to support legacy phpunit versions
8-
# TODO: clean up the code in this namespace and support fewer phpunit versions
9-
- src/Test/*
10-
# contains BC code to support Symfony 3.4 that would not work with never versions
11-
- src/BaseEvent.php

src/ProxyClient/Cloudflare.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Cloudflare extends HttpProxyClient implements ClearCapable, PurgeCapable,
5454
public function __construct(
5555
Dispatcher $dispatcher,
5656
array $options = [],
57-
?RequestFactoryInterface $requestFactory = null
57+
?RequestFactoryInterface $requestFactory = null,
5858
) {
5959
if (!function_exists('json_encode')) {
6060
throw new \Exception('ext-json is required for cloudflare invalidation');

src/ProxyClient/Fastly.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Fastly extends HttpProxyClient implements ClearCapable, PurgeCapable, Refr
5050
public function __construct(
5151
Dispatcher $dispatcher,
5252
array $options = [],
53-
?RequestFactoryInterface $requestFactory = null
53+
?RequestFactoryInterface $requestFactory = null,
5454
) {
5555
if (!function_exists('json_encode')) {
5656
throw new \Exception('ext-json is required for fastly invalidation');

src/Test/EventDispatchingHttpCacheTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class TestListener implements EventSubscriberInterface
400400
public function __construct(
401401
EventDispatchingHttpCacheTestCase $test,
402402
CacheInvalidation $kernel,
403-
Request $request
403+
Request $request,
404404
) {
405405
$this->test = $test;
406406
$this->kernel = $kernel;
@@ -480,7 +480,7 @@ class SimpleListener
480480
public function __construct(
481481
EventDispatchingHttpCacheTestCase $test,
482482
CacheInvalidation $kernel,
483-
Request $request
483+
Request $request,
484484
) {
485485
$this->test = $test;
486486
$this->kernel = $kernel;

src/Test/PHPUnit/AbstractCacheConstraint.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public function __construct(
2121
) {
2222
}
2323

24+
abstract public function getValue(): string;
25+
2426
public function matches($other): bool
2527
{
2628
if (!$other instanceof ResponseInterface) {

src/Test/Proxy/AbstractProxy.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ protected function wait(int $timeout, callable $callback): bool
9393
*/
9494
protected function runCommand(string $command, array $arguments): void
9595
{
96+
if (!class_exists(Process::class)) {
97+
throw new \RuntimeException('Running commands requires the symfony/process component');
98+
}
9699
$process = new Process(array_merge([$command], $arguments));
97100
$process->run();
98101

0 commit comments

Comments
 (0)