Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to PSR12 coding standard #20121

Merged
merged 11 commits into from
Mar 19, 2024
Merged
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: lint

on: [push, pull_request]

jobs:
phpcs:
runs-on: ubuntu-latest
name: PHP_CodeSniffer
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: cs2pr

- name: Install dependencies
run: composer install --prefer-dist

- name: Run phpcs
run: vendor/bin/phpcs -q --report=checkstyle framework/ | cs2pr
27 changes: 0 additions & 27 deletions .php_cs

This file was deleted.

9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@
"cweagans/composer-patches": "^1.7",
"phpunit/phpunit": "4.8.34",
"cebe/indent": "~1.0.2",
"friendsofphp/php-cs-fixer": "~2.2.3 | ^3.0",
"johnkary/phpunit-speedtrap": "^1.0"
"johnkary/phpunit-speedtrap": "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"yiisoft/yii2-coding-standards": "^3.0"
},
"repositories": [
{
Expand All @@ -104,15 +105,15 @@
},
"autoload-dev": {
"psr-4": {
"yii\\cs\\": "cs/src/",
"yii\\build\\": "build/",
"yiiunit\\": "tests/"
}
},
"config": {
"allow-plugins": {
"cweagans/composer-patches": true,
"yiisoft/yii2-composer": true
"yiisoft/yii2-composer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"bin": [
Expand Down
Loading
Loading