Skip to content

Commit 8925e21

Browse files
authored
Merge pull request #9 from fabiang/php82
Added support for PHP 8.2 (closes #8)
2 parents b278ad1 + 9654e05 commit 8925e21

Some content is hidden

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

46 files changed

+978
-1096
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[*]
2+
indent_size = 4
3+
indent_style = space
4+
tab_width = 4
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
[*.md]
9+
trim_trailing_whitespace = false
10+
11+
[*.yml]
12+
indent_size = 2
13+
14+
[Vagrantfile]
15+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.editorconfig export-ignore
12
.gitignore export-ignore
23
.gitattributes export-ignore
34
.scrutinizer.yml export-ignore

.github/workflows/behat.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
name: Integration Tests
22

3-
on:
4-
push:
5-
branches:
6-
- '*'
7-
pull_request:
8-
- '*'
3+
on: [push, pull_request]
94

105
jobs:
116
integrationtest:
127
runs-on: ubuntu-latest
13-
148
name: Behat
15-
169
steps:
17-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1811

1912
- name: Install PHP
2013
uses: shivammathur/setup-php@v2
2114
with:
22-
php-version: 8.1
15+
php-version: 8.2
2316

2417
- name: Cache Composer packages
2518
id: composer-cache
@@ -33,12 +26,21 @@ jobs:
3326
- name: Install dependencies
3427
run: composer install --prefer-dist --no-progress
3528

36-
- name: Build the stack
37-
run: docker-compose up -d
29+
- name: Run containers
30+
run: docker-compose up -d --quiet-pull
3831

39-
- name: Sleep for 10 minutes
40-
run: sleep 10m
41-
shell: bash
32+
- name: Wait for XMPP to become available
33+
uses: iFaxity/wait-on-action@v1
34+
with:
35+
resource: tcp:localhost:15222
36+
timeout: 1800000
37+
interval: 10000
38+
delay: 60000
39+
log: true
4240

4341
- name: Run test suite
4442
run: ./vendor/bin/behat
43+
44+
- name: Stop containers
45+
if: always()
46+
run: docker-compose down --volumes

.github/workflows/static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212

1313
- name: Psalm
1414
uses: docker://vimeo/psalm-github-actions
@@ -18,7 +18,7 @@ jobs:
1818
composer_ignore_platform_reqs: true
1919

2020
- name: Upload Security Analysis results to GitHub
21-
uses: github/codeql-action/upload-sarif@v1
21+
uses: github/codeql-action/upload-sarif@v2
2222
with:
2323
sarif_file: results.sarif
2424

.github/workflows/unit.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Unit Tests
22

3-
on:
4-
push:
5-
branches:
6-
- '*'
7-
pull_request:
8-
- '*'
3+
on: [push, pull_request]
94

105
jobs:
116
unittest:
@@ -43,7 +38,7 @@ jobs:
4338
coverage: false
4439
- version: 7.3
4540
phpunit: 9.5
46-
coverage: true
41+
coverage: false
4742
- version: 7.4
4843
phpunit: 9.5
4944
coverage: false
@@ -52,13 +47,16 @@ jobs:
5247
coverage: false
5348
- version: 8.1
5449
phpunit: 9.5
50+
coverage: true
51+
- version: 8.2
52+
phpunit: 10.0
5553
coverage: false
5654
prefer-lowest: ['', '--prefer-lowest']
5755

5856
name: Unit Tests - PHP ${{ matrix.php.version }} ${{ matrix.prefer-lowest }}
5957

6058
steps:
61-
- uses: actions/checkout@v2
59+
- uses: actions/checkout@v3
6260

6361
- name: Install PHP
6462
uses: shivammathur/setup-php@v2
@@ -71,7 +69,7 @@ jobs:
7169

7270
- name: Cache Composer packages
7371
id: composer-cache
74-
uses: actions/cache@v2
72+
uses: actions/cache@v3
7573
with:
7674
path: vendor
7775
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
@@ -95,11 +93,19 @@ jobs:
9593

9694
- name: Run test suite
9795
if: ${{ ! matrix.php.coverage }}
98-
run: ./vendor/bin/phpunit --verbose
96+
run: |
97+
./vendor/bin/phpunit \
98+
--no-configuration \
99+
tests/src/
99100
100101
- name: Run test suite with code coverage
101102
if: ${{ matrix.php.coverage }}
102-
run: ./vendor/bin/phpunit --verbose --coverage-clover=build/logs/clover.xml
103+
run: |
104+
./vendor/bin/phpunit \
105+
--no-configuration \
106+
--coverage-clover build/logs/clover.xml \
107+
--coverage-filter src/ \
108+
tests/src/
103109
env:
104110
XDEBUG_MODE: coverage
105111

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ php-coveralls.phar*
1313
codeclimate-test-reporter.phar
1414
codeclimate-test-reporter.phar*
1515
composer.phar
16+
composer.lock

.scrutinizer.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
imports:
2-
- php
2+
- php
33

44
filter:
5-
paths:
6-
- src/*
5+
paths:
6+
- src/*
77

88
checks:
9-
php: true
9+
php: true
1010

1111
tools:
12-
php_code_sniffer:
13-
config:
14-
standard: PSR2
15-
php_sim: true
16-
php_cpd: true
17-
php_loc: true
18-
php_hhvm: false
19-
php_mess_detector: true
20-
php_pdepend: true
21-
php_analyzer: true
22-
sensiolabs_security_checker: true
23-
php_changetracking: true
24-
external_code_coverage:
25-
runs: 2
26-
timeout: 120
12+
php_code_sniffer:
13+
config:
14+
standard: PSR2
15+
php_sim: true
16+
php_cpd: true
17+
php_loc: true
18+
php_hhvm: false
19+
php_mess_detector: true
20+
php_pdepend: true
21+
php_analyzer: true
22+
sensiolabs_security_checker: true
23+
php_changetracking: true
24+
external_code_coverage:
25+
runs: 2
26+
timeout: 120
2727

2828
build:
2929
environment:

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Modified BSD License
33

44
Copyright (c) 2002-2003 Richard Heyes,
55
2014 Jaussoin Timothée,
6-
2014-2022 Fabian Grutschus
6+
2014-2023 Fabian Grutschus
77
All rights reserved.
88

99
Redistribution and use in source and binary forms, with or without modification,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ docker-compose up -d
112112

113113
**Note:** ejabberd takes around *ten minutes* to start.
114114

115-
### Vagrant
115+
### Vagrant (Deprecated)
116116

117117
To launch the servers you can use the provided Vagrant box.
118118
Just [install Vagrant](https://www.vagrantup.com/downloads) and run:

behat.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
default:
2-
suites:
3-
authentication_features:
4-
paths: [ "%paths.base%/tests/features/" ]
5-
contexts:
6-
- Fabiang\Sasl\Behat\XmppContext:
7-
- localhost
8-
- 15222
9-
- ubuntu-xenial
10-
- testuser
11-
- testpass
12-
- "%paths.base%/tests/log/features/"
13-
- Fabiang\Sasl\Behat\Pop3Context:
14-
- localhost
15-
- 11110
16-
- vmail
17-
- pass
18-
- "%paths.base%/tests/log/features/"
19-
testers:
20-
strict: true
2+
suites:
3+
authentication_features:
4+
paths: [ "%paths.base%/tests/features/" ]
5+
contexts:
6+
- Fabiang\Sasl\Behat\XmppContext:
7+
- localhost
8+
- 15222
9+
- ubuntu-xenial
10+
- testuser
11+
- testpass
12+
- "%paths.base%/tests/log/features/"
13+
- Fabiang\Sasl\Behat\Pop3Context:
14+
- localhost
15+
- 11110
16+
- vmail
17+
- pass
18+
- "%paths.base%/tests/log/features/"
19+
testers:
20+
strict: true

0 commit comments

Comments
 (0)