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
23 changes: 15 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,52 @@ jobs:
strategy:
fail-fast: false
matrix:
# Behat 3.31 only supports symfony/config ^5.4||^6.4||^7.0, so only Symfony 7.4 here
php-version:
- '8.3'
- '8.4'
- '8.5'
symfony-version:
- '7.4.*'
- '8.0.*'
- '8.1.*'
behat-version:
- '3.31.*'
experimental:
- false
include:
# Behat 4 + Symfony 7.4 (all PHP versions)
-
php-version: '8.3'
symfony-version: '7.4.*'
behat-version: '4.x-dev as 4.0.0'
experimental: true
-
php-version: '8.3'
symfony-version: '8.0.*'
php-version: '8.4'
symfony-version: '7.4.*'
behat-version: '4.x-dev as 4.0.0'
experimental: true
-
php-version: '8.3'
symfony-version: '8.1.*'
php-version: '8.5'
symfony-version: '7.4.*'
behat-version: '4.x-dev as 4.0.0'
experimental: true
# Behat 4 + Symfony 8.x requires PHP >=8.4
-
php-version: '8.4'
symfony-version: '7.4.*'
symfony-version: '8.0.*'
behat-version: '4.x-dev as 4.0.0'
experimental: true
-
php-version: '8.4'
symfony-version: '8.1.*'
behat-version: '4.x-dev as 4.0.0'
experimental: true
-
php-version: '8.5'
symfony-version: '8.0.*'
behat-version: '4.x-dev as 4.0.0'
experimental: true
-
php-version: '8.4'
php-version: '8.5'
symfony-version: '8.1.*'
behat-version: '4.x-dev as 4.0.0'
experimental: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock-behat-version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

cat <<< $(jq --indent 4 --arg version "$VERSION" '.require |= with_entries(if (.key == "behat/behat") then .value=$version else . end)' < composer.json) > composer.json
jq --indent 4 --arg version "$VERSION" '.require |= with_entries(if (.key == "behat/behat") then .value=$version else . end)' < composer.json > composer.json.tmp && mv composer.json.tmp composer.json
4 changes: 2 additions & 2 deletions .github/workflows/lock-symfony-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

cat <<< $(jq --indent 4 --arg version $VERSION '.require |= with_entries(if (.key|test("^symfony/") and (.key|test("-contracts$") | not)) then .value=$version else . end)' < composer.json) > composer.json
cat <<< $(jq --indent 4 --arg version $VERSION '."require-dev" |= with_entries(if (.key|test("^symfony/") and (.key|test("-contracts$") | not)) then .value=$version else . end)' < composer.json) > composer.json
jq --indent 4 --arg version "$VERSION" '.require |= with_entries(.key as $k | if ($k | test("^symfony/")) and ($k | test("-contracts$") | not) then .value=$version else . end)' < composer.json > composer.json.tmp && mv composer.json.tmp composer.json
jq --indent 4 --arg version "$VERSION" '."require-dev" |= with_entries(.key as $k | if ($k | test("^symfony/")) and ($k | test("-contracts$") | not) then .value=$version else . end)' < composer.json > composer.json.tmp && mv composer.json.tmp composer.json
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use PhpCsFixer\Finder;

$finder = Finder::create()
->in([__DIR__ . '/src', __DIR__ . '/tests'])
->in([__DIR__ . '/src'])
;

return (new Config())
Expand Down
20 changes: 8 additions & 12 deletions features/importing_files.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,21 @@ Feature: Importing files
$this->parameter = $parameter;
}

/**
* @Given the parameter was injected to the context
*/
public function theParameterWasInjectedToTheContext()
#[\Behat\Step\Given('the parameter was injected to the context')]
public function theParameterWasInjectedToTheContext(): void
{
if (null === $this->parameter) {
throw new \DomainException('No parameter was injected (or null one)!');
}
}

/**
* @Then it should contain :content
*/
public function itShouldContain($content)
{
if ($content !== $this->parameter) {
#[\Behat\Step\Then('it should contain :content')]
public function itShouldContain(string $content): void
{
if ($content !== $this->parameter) {
throw new \DomainException(sprintf('Expected to get "%s", got "%s"!', $content, $this->parameter));
}
}
}
}
}
"""
And a feature file "features/my.feature" containing:
Expand Down
Loading