Skip to content

Commit 4444037

Browse files
committed
merged origin with local
2 parents 42f261b + b429025 commit 4444037

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1005
-498
lines changed

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- uses: actions/checkout@v2
99
- name: "PHP-CS-Fixer"
10-
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0
10+
uses: docker://oskarstark/php-cs-fixer-ga:3.0.2
1111
with:
1212
args: --dry-run
1313
- name: "PSalm"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ $client->run('MATCH (x) WHERE x.slug in $listOrMap RETURN x', ['listOrMap' => []
296296
* ext-bcmath *
297297
* ext-sockets *
298298
* ext-json **
299-
* ext-ds ***
299+
* ext-ds (minimum version 1.3.0) ***
300300

301301
(*) Needed to implement the bolt protocol
302302

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"psr/http-factory": "^1.0",
3131
"psr/http-client": "^1.0",
3232
"php-http/message": "^1.0",
33-
"php-ds/php-ds": "1.*",
3433
"php-http/message-factory": "^1.0",
3534
"stefanak-michal/bolt": "^2.5.1",
3635
"symfony/polyfill-php80": "^1.2"
@@ -47,7 +46,7 @@
4746
"nyholm/psr7-server": "^1.0",
4847
"kriswallsmith/buzz": "^1.2",
4948
"vimeo/psalm": "^4.7",
50-
"friendsofphp/php-cs-fixer": "^3.0",
49+
"friendsofphp/php-cs-fixer": "3.0.2",
5150
"psalm/plugin-phpunit": "^0.15.1",
5251
"vlucas/phpdotenv": "^5.0"
5352
},

docker/Dockerfile-php-7.4

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ RUN apt-get update && apt-get install -y \
77
libzip-dev \
88
zip \
99
unzip \
10-
&& docker-php-ext-install -j$(nproc) gd sockets bcmath \
11-
&& pecl install ds \
12-
&& docker-php-ext-enable ds
10+
&& docker-php-ext-install -j$(nproc) gd sockets bcmath
1311

1412
ARG WITH_XDEBUG=false
1513

docker/Dockerfile-php-8.0

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ RUN apt-get update && apt-get install -y \
77
libzip-dev \
88
zip \
99
unzip \
10-
&& docker-php-ext-install -j$(nproc) gd sockets bcmath \
11-
&& pecl install ds \
12-
&& docker-php-ext-enable ds
10+
&& docker-php-ext-install -j$(nproc) gd sockets bcmath
1311

1412
ARG WITH_XDEBUG=false
1513

psalm.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
<directory name="src"/>
4242
</errorLevel>
4343
</DeprecatedInterface>
44+
<UnusedForeachValue>
45+
<errorLevel type="suppress">
46+
<directory name="tests"/>
47+
<directory name="src"/>
48+
</errorLevel>
49+
</UnusedForeachValue>
4450
</issueHandlers>
4551
<stubs>
4652
<file name="./vendor/vimeo/psalm/stubs/ext-ds.phpstub"/>

src/Authentication/BasicAuth.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,9 @@ public function authenticateBolt(Bolt $bolt, UriInterface $uri, string $userAgen
4646
{
4747
$bolt->init($userAgent, $this->username, $this->password);
4848
}
49+
50+
public function extractFromUri(UriInterface $uri): AuthenticateInterface
51+
{
52+
return $this;
53+
}
4954
}

src/Authentication/KerberosAuth.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,9 @@ public function authenticateBolt(Bolt $bolt, UriInterface $uri, string $userAgen
3838
$bolt->setScheme('kerberos');
3939
$bolt->init($userAgent, $this->token, $this->token);
4040
}
41+
42+
public function extractFromUri(UriInterface $uri): AuthenticateInterface
43+
{
44+
return $this;
45+
}
4146
}

src/Authentication/NoAuth.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ public function authenticateBolt(Bolt $bolt, UriInterface $uri, string $userAgen
3030
$bolt->setScheme('none');
3131
$bolt->init($userAgent, '', '');
3232
}
33+
34+
public function extractFromUri(UriInterface $uri): AuthenticateInterface
35+
{
36+
return $this;
37+
}
3338
}

src/Authentication/UrlAuth.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,18 @@ public function authenticateHttp(RequestInterface $request, UriInterface $uri, s
3535
}
3636

3737
public function authenticateBolt(Bolt $bolt, UriInterface $uri, string $userAgent): void
38+
{
39+
$this->extractFromUri($uri)->authenticateBolt($bolt, $uri, $userAgent);
40+
}
41+
42+
public function extractFromUri(UriInterface $uri): AuthenticateInterface
3843
{
3944
if (substr_count($uri->getUserInfo(), ':') === 1) {
4045
[$user, $pass] = explode(':', $uri->getUserInfo());
41-
Authenticate::basic($user, $pass)->authenticateBolt($bolt, $uri, $userAgent);
42-
} else {
43-
Authenticate::disabled()->authenticateBolt($bolt, $uri, $userAgent);
46+
47+
return Authenticate::basic($user, $pass);
4448
}
49+
50+
return Authenticate::disabled();
4551
}
4652
}

0 commit comments

Comments
 (0)