Skip to content

Commit

Permalink
Fixed PHP version compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Jan 2, 2024
1 parent 96a5756 commit 0ce9eee
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 24 deletions.
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This is the top-most .editorconfig file; do not search in parent directories.
root = true

# All files.
[*]
end_of_line = LF
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.php]
indent_size = 2

[*.{json,lock}]
indent_size = 4

[*.{yml,yaml}]
indent_size = 2

[*.{sh,bash,bats}]
indent_size = 2

[*.xml]
indent_size = 4
8 changes: 5 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Ignore files for distribution archives.
/.cirleci export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpcs.xml export-ignore
/.gitattributes export-ignore
/phpmd.xml export-ignore
/phpstan.neon export-ignore
/tests export-ignore
/renovate.json export-ignore
17 changes: 0 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,3 @@ jobs:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-php:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
- name: Get Tag Name
id: get-version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ on:
jobs:
test-php:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- run: composer install
- run: composer lint
- run: composer test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ composer lint:fix
```bash
composer test
```

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"issues": "https://github.com/drevops/behat-phpserver/issues",
"source": "https://github.com/drevops/behat-phpserver"
},
"require": {
"require": {
"php": ">=8.1",
"behat/behat": "^3.13"
},
Expand All @@ -30,7 +30,7 @@
"phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^1.10",
"squizlabs/php_codesniffer": "^3.8",
"symfony/http-client": "^7.0"
"symfony/http-client": "^6 || ^7.0"
},
"replace": {
"integratedexperts/behat-phpserver": "self.version"
Expand All @@ -48,7 +48,7 @@
"scripts": {
"lint": [
"phpcs",
"phpmd --exclude vendor,vendor-bin,node_modules . text phpmd.xml",
"phpmd --exclude vendor . text phpmd.xml",
"phpstan"
],
"lint:fix": "phpcbf",
Expand Down

0 comments on commit 0ce9eee

Please sign in to comment.