Skip to content
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/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
php-versions: ['8.2', '8.3', '8.4', '8.5']

name: php${{ matrix.php-versions }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.2', '8.3', '8.4', '8.5']

name: Psalm check

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
},
"require": {
"php": ">=8.1",
"guzzlehttp/guzzle": "^7.9",
"guzzlehttp/guzzle": "^7.10",
"phpunit/phpunit": "*",
"behat/behat": "^3.23",
"behat/behat": "^3.29",
"libresign/behat-builtin-extension": "^0.6.3",
"estahn/json-query-wrapper": "*"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"donatj/mock-webserver": "^2.8"
"bamarni/composer-bin-plugin": "^1.9",
"donatj/mock-webserver": "^2.9"
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
},
"optimize-autoloader": true,
"platform": {
"php": "8.1"
"php": "8.2"
}
},
"extra": {
Expand Down
7 changes: 6 additions & 1 deletion features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

require __DIR__ . '/../../vendor/autoload.php';

class FeatureContext extends NextcloudApiContext {
final class FeatureContext extends NextcloudApiContext {
protected MockWebServer $mockServer;
public function __construct(?array $parameters = []) {
parent::__construct($parameters);
Expand All @@ -24,6 +24,7 @@ public function __construct(?array $parameters = []) {
/**
* @inheritDoc
*/
#[\Override]
public function setCurrentUser(string $user): void {
parent::setCurrentUser($user);
Assert::assertEquals($this->currentUser, $user);
Expand All @@ -32,6 +33,7 @@ public function setCurrentUser(string $user): void {
/**
* @inheritDoc
*/
#[\Override]
public function assureUserExists(string $user): void {
parent::assureUserExists($user);
$lastRequest = $this->getLastREquest();
Expand All @@ -57,13 +59,15 @@ private function getLastRequest(): RequestInfo {
* necessary to consider that we haven't Nextcloud installed and mock
* the real path of files.
*/
#[\Override]
public static function findParentDirContainingFile(string $filename): string {
return __DIR__;
}

/**
* @inheritDoc
*/
#[\Override]
public function sendRequest(string $verb, string $url, $body = null, array $headers = [], array $options = []): void {
parent::sendRequest($verb, $url, $body, $headers, $options);
$lastRequest = $this->getLastRequest();
Expand Down Expand Up @@ -99,6 +103,7 @@ public function setTheResponseTo(PyStringNode $response): void {
/**
* @inheritDoc
*/
#[\Override]
public function theResponseShouldBeAJsonArrayWithTheFollowingMandatoryValues(TableNode $table): void {
$lastRequest = $this->getLastRequest();
$body = json_encode($lastRequest->getParsedInput());
Expand Down
2 changes: 1 addition & 1 deletion src/NextcloudApiContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
}
$fullUrl = $this->baseUrl . $url;
$client = new Client();
if (!is_null($this->currentUser)) {
if ($this->currentUser !== '') {
$options = array_merge(
['cookies' => $this->getUserCookieJar($this->currentUser)],
$options
Expand Down Expand Up @@ -544,7 +544,7 @@

#[Given('the output of the last command should contain the following text:')]
public static function theOutputOfTheLastCommandContains(PyStringNode $text): void {
Assert::assertStringContainsString((string) $text, self::$commandOutput, 'The output of the last command does not contain: ' . $text);

Check failure on line 547 in src/NextcloudApiContext.php

View workflow job for this annotation

GitHub Actions / Psalm check (8.2)

ImplicitToStringCast

src/NextcloudApiContext.php:547:130: ImplicitToStringCast: Right side of concat op expects string, 'Behat\Gherkin\Node\PyStringNode' provided with a __toString method (see https://psalm.dev/060)

Check failure on line 547 in src/NextcloudApiContext.php

View workflow job for this annotation

GitHub Actions / Psalm check (8.4)

ImplicitToStringCast

src/NextcloudApiContext.php:547:130: ImplicitToStringCast: Right side of concat op expects string, 'Behat\Gherkin\Node\PyStringNode' provided with a __toString method (see https://psalm.dev/060)

Check failure on line 547 in src/NextcloudApiContext.php

View workflow job for this annotation

GitHub Actions / Psalm check (8.5)

ImplicitToStringCast

src/NextcloudApiContext.php:547:130: ImplicitToStringCast: Right side of concat op expects string, 'Behat\Gherkin\Node\PyStringNode' provided with a __toString method (see https://psalm.dev/060)

Check failure on line 547 in src/NextcloudApiContext.php

View workflow job for this annotation

GitHub Actions / Psalm check (8.3)

ImplicitToStringCast

src/NextcloudApiContext.php:547:130: ImplicitToStringCast: Right side of concat op expects string, 'Behat\Gherkin\Node\PyStringNode' provided with a __toString method (see https://psalm.dev/060)
}

#[Given('the output of the last command should be empty')]
Expand Down
6 changes: 6 additions & 0 deletions vendor-bin/coding-standard/composer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"config": {
"platform": {
"php": "8.2"
},
"sort-packages": true
},
"require-dev": {
"nextcloud/coding-standard": "1.1.0"
}
Expand Down
Loading
Loading