Skip to content

Commit

Permalink
Add php 8.3 to ci chain and add scenario for it #15
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfausk committed Apr 17, 2024
1 parent 8f89aa0 commit 5965a0e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 12 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
symfony: ['symfony3', 'symfony4', 'symfony5']
include:
- php: '8.0'
symfony: 'symfony6'
- php: '8.1'
symfony: 'symfony6'
- php: '8.2'
symfony: 'symfony6'
- php: '8.3'
symfony: 'symfony6'
- php: '8.2'
symfony: 'symfony7'
- php: '8.3'
symfony: 'symfony7'
fail-fast: false
env:
MATRIX_PHP: ${{ matrix.php }}
Expand Down
10 changes: 5 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ symfony/config v3.4.47 MIT
symfony/console v4.4.49 MIT
symfony/css-selector v7.0.3 MIT
symfony/dependency-injection v3.4.47 MIT
symfony/deprecation-contracts v2.5.2 MIT
symfony/deprecation-contracts v2.5.3 MIT
symfony/dom-crawler v5.4.35 MIT
symfony/event-dispatcher v4.4.44 MIT
symfony/event-dispatcher-contracts v1.10.0 MIT
symfony/filesystem v4.4.42 MIT
symfony/http-client v5.4.37 MIT
symfony/http-client-contracts v2.5.2 MIT
symfony/http-client v5.4.38 MIT
symfony/http-client-contracts v2.5.3 MIT
symfony/panther v1.1.1 MIT
symfony/polyfill-ctype v1.29.0 MIT
symfony/polyfill-mbstring v1.29.0 MIT
symfony/polyfill-php80 v1.29.0 MIT
symfony/process v5.4.36 MIT
symfony/service-contracts v2.5.2 MIT
symfony/service-contracts v2.5.3 MIT
symfony/translation v4.4.47 MIT
symfony/translation-contracts v2.5.2 MIT
symfony/translation-contracts v2.5.3 MIT
symfony/yaml v5.3.14 MIT
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,49 @@ private function spin(\Closure $closure, ?int $tries = 25): ?NodeElement

## How to contribute?

Start docker-compose with php version of your choice. At the moment the following php versions can be used with docker-compose: php7.2, php7.3, php7.4, php8.0, php8.1 and php8.2.
Start docker-compose with php version of your choice. At the moment the following php versions can be used with docker-compose: `php7.2`, `php7.3`, `php7.4`, `php8.0`, `php8.1`, `php8.2` and `php8.3`.

E.g. you can start a container like this:

docker-compose up php8.2

Run phpunit tests
Upgrade scenario lock files:

docker-compose run php8.2 composer update

Run phpunit tests:

docker-compose run php8.2 vendor/bin/phpunit

If you want to start up all containers at once and keep them running in background then run the following:
```
docker-compose up -d php7.2
docker-compose up -d php7.3
docker-compose up -d php7.4
docker-compose up -d php8.0
docker-compose up -d php8.1
docker-compose up -d php8.2
docker-compose up -d php8.3
```

If you want to execute tests for scenario `symfony6` and `php8.2` then run the following:
```
docker-compose run php8.2 composer scenario symfony6
docker-compose run php8.2 vendor/bin/bdi detect drivers
docker-compose run php8.2 vendor/bin/behat --config=tests/Behat/behat.yml
docker-compose run php8.2 vendor/bin/phpunit
```

Or if you want to execute tests for scenario `symfony7` and `php8.3` then run the following:
```
docker-compose run php8.3 composer scenario symfony7
docker-compose run php8.3 vendor/bin/bdi detect drivers
docker-compose run php8.3 vendor/bin/behat --config=tests/Behat/behat.yml
docker-compose run php8.3 vendor/bin/phpunit
```

See also https://github.com/g1a/composer-test-scenarios for more information about scenarios.

## Credits

Created by Robert Freigang [robertfausk](https://github.com/robertfausk).
Expand Down
3 changes: 2 additions & 1 deletion tests/Behat/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ default:
contexts:
- Behat\MinkExtension\Context\MinkContext
extensions:
Robertfausk\Behat\PantherExtension: ~ # no configuration here
Robertfausk\Behat\PantherExtension: ~
Behat\MinkExtension:
browser_name: chrome
javascript_session: javascript_chrome
base_url: "" # needed cause of php8.2 with error "rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/friends-of-behat/mink-extension/src/Behat/MinkExtension/Context/RawMinkContext.php line 144"
sessions:
default:
panther:
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/features/simple.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Just a simple call to a php script

@javascript_chrome
@javascript
Scenario: I am on a php and see the echo response
And I am on "index.php"
Then I should see "Huhuuu!"

0 comments on commit 5965a0e

Please sign in to comment.