From d845955f3e8ad6c24642d2649c15d06c492bedcd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 10 Oct 2026 01:03:34 +0000 Subject: [PATCH 1/2] build(deps-dev): Bump behat/behat in /tests/Integration Bumps [behat/behat](https://github.com/Behat/Behat) from 3.33.0 to 4.0.0. - [Release notes](https://github.com/Behat/Behat/releases) - [Changelog](https://github.com/Behat/Behat/blob/4.x/CHANGELOG.md) - [Commits](https://github.com/Behat/Behat/compare/v3.33.0...v4.0.0) --- updated-dependencies: - dependency-name: behat/behat dependency-version: 4.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- tests/Integration/composer.json | 2 +- tests/Integration/composer.lock | 138 ++++++++++++++++---------------- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/tests/Integration/composer.json b/tests/Integration/composer.json index 106fd7267..9eb3ff8ee 100644 --- a/tests/Integration/composer.json +++ b/tests/Integration/composer.json @@ -6,7 +6,7 @@ "sort-packages": true }, "require-dev": { - "behat/behat": "^3.33.0", + "behat/behat": "^4.0.0", "guzzlehttp/guzzle": "^8.2.0", "phpunit/phpunit": "^12.5.29" } diff --git a/tests/Integration/composer.lock b/tests/Integration/composer.lock index 4de32a44c..2b817ee7b 100644 --- a/tests/Integration/composer.lock +++ b/tests/Integration/composer.lock @@ -4,49 +4,48 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "64e0435bd4c73aacd62ba711e6f80684", + "content-hash": "136ba6255070912e66f05cf641817e98", "packages": [], "packages-dev": [ { "name": "behat/behat", - "version": "v3.33.0", + "version": "v4.0.0", "source": { "type": "git", "url": "https://github.com/Behat/Behat.git", - "reference": "a76fe078164e72d3183afc48224a6e8902dccaf0" + "reference": "3f65b57a8e52c7d2c45e219ecaf5900a995946bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Behat/zipball/a76fe078164e72d3183afc48224a6e8902dccaf0", - "reference": "a76fe078164e72d3183afc48224a6e8902dccaf0", + "url": "https://api.github.com/repos/Behat/Behat/zipball/3f65b57a8e52c7d2c45e219ecaf5900a995946bf", + "reference": "3f65b57a8e52c7d2c45e219ecaf5900a995946bf", "shasum": "" }, "require": { - "behat/gherkin": "^4.17.0", + "behat/gherkin": "^4.18.0", "composer-runtime-api": "^2.2", "composer/xdebug-handler": "^1.4 || ^2.0 || ^3.0", "cucumber/tag-expressions": "^11.0", "ext-mbstring": "*", - "nikic/php-parser": "^4.19.2 || ^5.2", "php": ">=8.2 <8.6", "psr/container": "^1.0 || ^2.0", - "symfony/config": "^5.4 || ^6.4 || ^7.0", - "symfony/console": "^5.4.9 || ^6.4 || ^7.0", - "symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", - "symfony/translation": "^5.4 || ^6.4 || ^7.0", - "symfony/yaml": "^5.4 || ^6.4 || ^7.0" + "symfony/config": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/console": "^5.4.9 || ^6.4 || ^7.0 || ^8.0", + "symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/translation": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/yaml": "^5.4 || ^6.4 || ^7.0 || ^8.0" }, "require-dev": { "opis/json-schema": "^2.5", "php-cs-fixer/shim": "^3.89", "phpstan/phpstan": "2.1.46", - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^11.5", "rector/rector": "2.3.9", - "sebastian/diff": "^4.0", - "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "sebastian/diff": "^6.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0 || ^8.0", "symfony/polyfill-php84": "^1.31", - "symfony/process": "^5.4 || ^6.4 || ^7.0" + "symfony/process": "^5.4 || ^6.4 || ^7.0 || ^8.0" }, "suggest": { "ext-dom": "Needed to output test results in JUnit format." @@ -94,7 +93,7 @@ ], "support": { "issues": "https://github.com/Behat/Behat/issues", - "source": "https://github.com/Behat/Behat/tree/v3.33.0" + "source": "https://github.com/Behat/Behat/tree/v4.0.0" }, "funding": [ { @@ -110,20 +109,20 @@ "type": "github" } ], - "time": "2026-09-07T14:37:47+00:00" + "time": "2026-09-28T16:13:53+00:00" }, { "name": "behat/gherkin", - "version": "v4.17.0", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "5c8b3149fac39b5a79942b64eeec59a5ee4001c0" + "reference": "496248b29d9d7848311a263c2d17c1860e4c7b6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c8b3149fac39b5a79942b64eeec59a5ee4001c0", - "reference": "5c8b3149fac39b5a79942b64eeec59a5ee4001c0", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/496248b29d9d7848311a263c2d17c1860e4c7b6c", + "reference": "496248b29d9d7848311a263c2d17c1860e4c7b6c", "shasum": "" }, "require": { @@ -131,11 +130,12 @@ "php": ">=8.1 <8.6" }, "require-dev": { - "cucumber/gherkin-monorepo": "dev-gherkin-v39.1.0", + "cucumber/gherkin-monorepo": "dev-gherkin-v42.0.1", "friendsofphp/php-cs-fixer": "^3.77", "mikey179/vfsstream": "^1.6", "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^2", + "phpstan/phpstan": "2.2.14", + "phpstan/phpstan-deprecation-rules": "^2.0", "phpstan/phpstan-phpunit": "^2", "phpunit/phpunit": "^10.5", "symfony/yaml": "^5.4 || ^6.4 || ^7.0" @@ -177,7 +177,7 @@ ], "support": { "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.17.0" + "source": "https://github.com/Behat/Gherkin/tree/v4.18.0" }, "funding": [ { @@ -193,7 +193,7 @@ "type": "github" } ], - "time": "2026-05-18T09:33:47+00:00" + "time": "2026-09-25T21:26:10+00:00" }, { "name": "composer/pcre", @@ -2733,16 +2733,16 @@ }, { "name": "symfony/console", - "version": "v7.4.19", + "version": "v7.4.20", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3a1973458b153f566a8d7499bc06ece323d60063" + "reference": "d7bca2fe05241dc7732d0c8b6d551b879f5d0a7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3a1973458b153f566a8d7499bc06ece323d60063", - "reference": "3a1973458b153f566a8d7499bc06ece323d60063", + "url": "https://api.github.com/repos/symfony/console/zipball/d7bca2fe05241dc7732d0c8b6d551b879f5d0a7d", + "reference": "d7bca2fe05241dc7732d0c8b6d551b879f5d0a7d", "shasum": "" }, "require": { @@ -2807,7 +2807,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.19" + "source": "https://github.com/symfony/console/tree/v7.4.20" }, "funding": [ { @@ -2827,20 +2827,20 @@ "type": "tidelift" } ], - "time": "2026-09-13T10:38:41+00:00" + "time": "2026-09-18T15:55:00+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.4.17", + "version": "v7.4.20", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f318ac9da5aba0be2cf43ecdd562c05a33bc11c0" + "reference": "a7faee783a87b55f27460fc571f8c639bf9d93a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f318ac9da5aba0be2cf43ecdd562c05a33bc11c0", - "reference": "f318ac9da5aba0be2cf43ecdd562c05a33bc11c0", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a7faee783a87b55f27460fc571f8c639bf9d93a2", + "reference": "a7faee783a87b55f27460fc571f8c639bf9d93a2", "shasum": "" }, "require": { @@ -2891,7 +2891,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.4.17" + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.20" }, "funding": [ { @@ -2911,7 +2911,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T17:40:08+00:00" + "time": "2026-09-29T12:35:16+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3304,16 +3304,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.41.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "bb899c1db0aa8127dc3afe8cda4a67eb24915f8d" + "reference": "5cac8f4db97208823aa353f59a01faad2da52c75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/bb899c1db0aa8127dc3afe8cda4a67eb24915f8d", - "reference": "bb899c1db0aa8127dc3afe8cda4a67eb24915f8d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5cac8f4db97208823aa353f59a01faad2da52c75", + "reference": "5cac8f4db97208823aa353f59a01faad2da52c75", "shasum": "" }, "require": { @@ -3362,7 +3362,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.41.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.43.0" }, "funding": [ { @@ -3382,20 +3382,20 @@ "type": "tidelift" } ], - "time": "2026-07-28T08:25:59+00:00" + "time": "2026-09-25T15:46:47+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.42.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "aa20edea75bd9c48cfecc8360922e5a6e5c44502" + "reference": "ebd57ccc7edb93d632e184efbe7693d2517bab3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/aa20edea75bd9c48cfecc8360922e5a6e5c44502", - "reference": "aa20edea75bd9c48cfecc8360922e5a6e5c44502", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/ebd57ccc7edb93d632e184efbe7693d2517bab3b", + "reference": "ebd57ccc7edb93d632e184efbe7693d2517bab3b", "shasum": "" }, "require": { @@ -3447,7 +3447,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.42.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.43.0" }, "funding": [ { @@ -3467,20 +3467,20 @@ "type": "tidelift" } ], - "time": "2026-08-07T06:33:24+00:00" + "time": "2026-09-23T22:02:09+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.38.2", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6" + "reference": "4d5d331bf731e0aedbc6b2f5e61135b7b7996a72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", - "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/4d5d331bf731e0aedbc6b2f5e61135b7b7996a72", + "reference": "4d5d331bf731e0aedbc6b2f5e61135b7b7996a72", "shasum": "" }, "require": { @@ -3532,7 +3532,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.43.0" }, "funding": [ { @@ -3552,20 +3552,20 @@ "type": "tidelift" } ], - "time": "2026-05-27T06:59:30+00:00" + "time": "2026-09-24T15:19:04+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.37.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" + "reference": "9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", - "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74", + "reference": "9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74", "shasum": "" }, "require": { @@ -3616,7 +3616,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.43.0" }, "funding": [ { @@ -3636,7 +3636,7 @@ "type": "tidelift" } ], - "time": "2026-04-10T16:19:22+00:00" + "time": "2026-09-25T15:50:05+00:00" }, { "name": "symfony/polyfill-php82", @@ -4161,16 +4161,16 @@ }, { "name": "symfony/yaml", - "version": "v7.4.18", + "version": "v7.4.20", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4cef939e55b8a21c5780418de0d98ab00d0736e1" + "reference": "0222bf4dfaa1e3ceb8fff579635d655f2950d5a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4cef939e55b8a21c5780418de0d98ab00d0736e1", - "reference": "4cef939e55b8a21c5780418de0d98ab00d0736e1", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0222bf4dfaa1e3ceb8fff579635d655f2950d5a7", + "reference": "0222bf4dfaa1e3ceb8fff579635d655f2950d5a7", "shasum": "" }, "require": { @@ -4213,7 +4213,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.4.18" + "source": "https://github.com/symfony/yaml/tree/v7.4.20" }, "funding": [ { @@ -4233,7 +4233,7 @@ "type": "tidelift" } ], - "time": "2026-08-30T00:47:26+00:00" + "time": "2026-09-26T06:31:10+00:00" }, { "name": "theseer/tokenizer", From 132fc916ca8ae130babe362a7a4a633f53d6b507 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 10 Oct 2026 15:38:11 +0200 Subject: [PATCH 2/2] test(behat): Update to behat 4 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Joas Schilling --- tests/Integration/behat.php | 32 +++++++++++++++++ tests/Integration/config/behat.yml | 19 ---------- .../features/bootstrap/CommandLineTrait.php | 36 ++++++------------- .../features/bootstrap/FeatureContext.php | 3 +- 4 files changed, 44 insertions(+), 46 deletions(-) create mode 100644 tests/Integration/behat.php delete mode 100644 tests/Integration/config/behat.yml diff --git a/tests/Integration/behat.php b/tests/Integration/behat.php new file mode 100644 index 000000000..29956e978 --- /dev/null +++ b/tests/Integration/behat.php @@ -0,0 +1,32 @@ +withProfile((new Profile('default', [ + 'autoload' => [ + '' => '%paths.base%/features/bootstrap', + ], + ])) + ->withFormatter((new JUnitFormatter()) + ->withOutputPath('%paths.base%/output')) + ->withFormatter((new PrettyFormatter()) + ->withOutputStyles([ + 'comment' => [ + 'bright-blue', + ], + ])) + ->withSuite((new Suite('default')) + ->addContext(FeatureContext::class) + ->withPaths('%paths.base%/features'))); diff --git a/tests/Integration/config/behat.yml b/tests/Integration/config/behat.yml deleted file mode 100644 index 68c4a7c63..000000000 --- a/tests/Integration/config/behat.yml +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2015 ownCloud, Inc. -# SPDX-License-Identifier: AGPL-3.0-or-later - -default: - formatters: - junit: - output_path: '%paths.base%/../output' - pretty: - output_styles: - comment: [ 'bright-blue' ] - autoload: - '': '%paths.base%/../features/bootstrap' - suites: - default: - paths: - - '%paths.base%/../features' - contexts: - - FeatureContext diff --git a/tests/Integration/features/bootstrap/CommandLineTrait.php b/tests/Integration/features/bootstrap/CommandLineTrait.php index b5bb88779..264128f5a 100644 --- a/tests/Integration/features/bootstrap/CommandLineTrait.php +++ b/tests/Integration/features/bootstrap/CommandLineTrait.php @@ -5,6 +5,8 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +use Behat\Step\Given; +use Behat\Step\Then; use PHPUnit\Framework\Assert; // The following attributes are expected to be available in the class that uses @@ -71,9 +73,7 @@ public function runOcc($args = [], $env = []) { return $this->lastCode; } - /** - * @Given /^invoking occ with "([^"]*)"$/ - */ + #[Given('/^invoking occ with "([^"]*)"$/')] public function invokingTheCommand(string $cmd, ?\Behat\Gherkin\Node\TableNode $table = null) { if ($cmd !== 'table') { if (str_contains($cmd, '{LAST_COMMAND_OUTPUT}')) { @@ -122,9 +122,7 @@ public function findExceptions() { return $exceptions; } - /** - * @Then /^the command was successful$/ - */ + #[Then('/^the command was successful$/')] public function theCommandWasSuccessful() { $exceptions = $this->findExceptions(); if ($this->lastCode !== 0) { @@ -144,16 +142,12 @@ public function theCommandWasSuccessful() { } } - /** - * @Then /^the command failed with exit code ([0-9]+)$/ - */ + #[Then('/^the command failed with exit code ([0-9]+)$/')] public function theCommandFailedWithExitCode(int $exitCode) { Assert::assertEquals($exitCode, $this->lastCode, 'The commands exit code did not match'); } - /** - * @Then /^the command failed with exception text "([^"]*)"$/ - */ + #[Then('/^the command failed with exception text "([^"]*)"$/')] public function theCommandFailedWithException($exceptionText) { $exceptions = $this->findExceptions(); if (empty($exceptions)) { @@ -165,10 +159,8 @@ public function theCommandFailedWithException($exceptionText) { } } - /** - * @Then /^the command output contains the text:$/ - * @Then /^the command output contains the text "([^"]*)"$/ - */ + #[Then('/^the command output contains the text:$/')] + #[Then('/^the command output contains the text "([^"]*)"$/')] public function theCommandOutputContainsTheText($text) { if ($this->lastStdOut === '' && $this->lastStdErr !== '') { Assert::assertStringContainsString($text, $this->lastStdErr, 'The command did not output the expected text on stdout'); @@ -178,16 +170,12 @@ public function theCommandOutputContainsTheText($text) { Assert::assertStringContainsString($text, $this->lastStdOut, 'The command did not output the expected text on stdout'); } - /** - * @Then /^the command output is empty$/ - */ + #[Then('/^the command output is empty$/')] public function theCommandOutputIsEmpty() { Assert::assertEmpty($this->lastStdOut, 'The command did output unexpected text on stdout'); } - /** - * @Then /^the command output contains the list entry '([^']*)' with value '([^']*)'$/ - */ + #[Then("/^the command output contains the list entry '([^']*)' with value '([^']*)'$/")] public function theCommandOutputContainsTheListEntry(string $key, string $value): void { if (preg_match('/^"ROOM\(([^"]+)\)"$/', $key, $matches)) { $key = '"' . self::$identifierToToken[$matches[1]] . '"'; @@ -202,9 +190,7 @@ public function theCommandOutputContainsTheListEntry(string $key, string $value) Assert::assertStringContainsString($text, $this->lastStdOut, 'The command did not output the expected text on stdout'); } - /** - * @Then /^the command error output contains the text "([^"]*)"$/ - */ + #[Then('/^the command error output contains the text "([^"]*)"$/')] public function theCommandErrorOutputContainsTheText($text) { if ($this->lastStdErr === '' && $this->lastStdOut !== '') { Assert::assertStringContainsString($text, $this->lastStdOut, 'The command did not output the expected text on stdout'); diff --git a/tests/Integration/features/bootstrap/FeatureContext.php b/tests/Integration/features/bootstrap/FeatureContext.php index 04cd9c61c..403e77bcc 100644 --- a/tests/Integration/features/bootstrap/FeatureContext.php +++ b/tests/Integration/features/bootstrap/FeatureContext.php @@ -7,7 +7,6 @@ require __DIR__ . '/../../vendor/autoload.php'; use Behat\Behat\Context\Context; -use Behat\Behat\Context\SnippetAcceptingContext; use Behat\Gherkin\Node\TableNode; use Behat\Hook\AfterScenario; use Behat\Hook\BeforeScenario; @@ -23,7 +22,7 @@ /** * Defines application features from the specific context. */ -class FeatureContext implements Context, SnippetAcceptingContext { +class FeatureContext implements Context { /** @var array[] */ protected $notificationIds;