Skip to content

Commit

Permalink
Upgrade to PSR12 coding standard (yiisoft#20121)
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanphp authored Mar 19, 2024
1 parent b0aa6ab commit e2a1670
Show file tree
Hide file tree
Showing 521 changed files with 1,265 additions and 2,619 deletions.
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

0 comments on commit e2a1670

Please sign in to comment.