Skip to content
Open
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
37 changes: 37 additions & 0 deletions .github/workflows/php-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check for syntax errors on different PHP version

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php-versions }} Lint on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Check PHP Version
run: php -v

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-plugins

- name: Run lint
run: ./vendor/bin/phplint path src

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ phpunit.phar
/tests/docker
/tests/dockerids

/.phplint.cache
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["yii2", "authclient", "oauth", "gitlab"],
"homepage": "http://github.com/yiiauth/gitlab",
"require": {
"php": "~7.3 || 8.0",
"php": "~7.3 || ~8.0",
"yiisoft/yii2-authclient": "~2.1"
},
"license": "MIT",
Expand All @@ -24,5 +24,8 @@
"type": "composer",
"url": "https://asset-packagist.org"
}
]
],
"require-dev": {
"overtrue/phplint": "*"
}
}