Skip to content

Commit

Permalink
fix cs, phpstan and spellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Jan 1, 2025
1 parent befa4b8 commit 307e24d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade setuptools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

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

- name: Cache Vendor
id: cache-vendor
Expand Down
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ sphinx-tabs
sphinxcontrib-phpdomain
sphinxcontrib-spelling
pyenchant

7 changes: 0 additions & 7 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,3 @@ parameters:
level: 1
paths:
- src
excludePaths:
analyseAndScan:
# contains code to support legacy phpunit versions
# TODO: clean up the code in this namespace and support fewer phpunit versions
- src/Test/*
# contains BC code to support Symfony 3.4 that would not work with never versions
- src/BaseEvent.php
2 changes: 1 addition & 1 deletion src/ProxyClient/Cloudflare.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Cloudflare extends HttpProxyClient implements ClearCapable, PurgeCapable,
public function __construct(
Dispatcher $dispatcher,
array $options = [],
?RequestFactoryInterface $requestFactory = null
?RequestFactoryInterface $requestFactory = null,
) {
if (!function_exists('json_encode')) {
throw new \Exception('ext-json is required for cloudflare invalidation');
Expand Down
2 changes: 1 addition & 1 deletion src/ProxyClient/Fastly.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Fastly extends HttpProxyClient implements ClearCapable, PurgeCapable, Refr
public function __construct(
Dispatcher $dispatcher,
array $options = [],
?RequestFactoryInterface $requestFactory = null
?RequestFactoryInterface $requestFactory = null,
) {
if (!function_exists('json_encode')) {
throw new \Exception('ext-json is required for fastly invalidation');
Expand Down
4 changes: 2 additions & 2 deletions src/Test/EventDispatchingHttpCacheTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class TestListener implements EventSubscriberInterface
public function __construct(
EventDispatchingHttpCacheTestCase $test,
CacheInvalidation $kernel,
Request $request
Request $request,
) {
$this->test = $test;
$this->kernel = $kernel;
Expand Down Expand Up @@ -480,7 +480,7 @@ class SimpleListener
public function __construct(
EventDispatchingHttpCacheTestCase $test,
CacheInvalidation $kernel,
Request $request
Request $request,
) {
$this->test = $test;
$this->kernel = $kernel;
Expand Down
2 changes: 2 additions & 0 deletions src/Test/PHPUnit/AbstractCacheConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public function __construct(
) {
}

abstract public function getValue(): string;

public function matches($other): bool
{
if (!$other instanceof ResponseInterface) {
Expand Down
3 changes: 3 additions & 0 deletions src/Test/Proxy/AbstractProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ protected function wait(int $timeout, callable $callback): bool
*/
protected function runCommand(string $command, array $arguments): void
{
if (!class_exists(Process::class)) {
throw new \RuntimeException('Running commands requires the symfony/process component');
}
$process = new Process(array_merge([$command], $arguments));
$process->run();

Expand Down

0 comments on commit 307e24d

Please sign in to comment.