Skip to content

Commit 353da7c

Browse files
razvanphpskepticspriggan
authored andcommitted
Upgrade to PSR12 coding standard (yiisoft#20121)
1 parent f23bab1 commit 353da7c

File tree

521 files changed

+1265
-2619
lines changed

Some content is hidden

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

521 files changed

+1265
-2619
lines changed

.github/workflows/lint.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
phpcs:
7+
runs-on: ubuntu-latest
8+
name: PHP_CodeSniffer
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Setup PHP
13+
uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: '8.2'
16+
tools: cs2pr
17+
18+
- name: Install dependencies
19+
run: composer install --prefer-dist
20+
21+
- name: Run phpcs
22+
run: vendor/bin/phpcs -q --report=checkstyle framework/ | cs2pr

.php_cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@
8585
"cweagans/composer-patches": "^1.7",
8686
"phpunit/phpunit": "4.8.34",
8787
"cebe/indent": "~1.0.2",
88-
"friendsofphp/php-cs-fixer": "~2.2.3 | ^3.0",
89-
"johnkary/phpunit-speedtrap": "^1.0"
88+
"johnkary/phpunit-speedtrap": "^1.0",
89+
"dealerdirect/phpcodesniffer-composer-installer": "*",
90+
"yiisoft/yii2-coding-standards": "^3.0"
9091
},
9192
"repositories": [
9293
{
@@ -104,15 +105,15 @@
104105
},
105106
"autoload-dev": {
106107
"psr-4": {
107-
"yii\\cs\\": "cs/src/",
108108
"yii\\build\\": "build/",
109109
"yiiunit\\": "tests/"
110110
}
111111
},
112112
"config": {
113113
"allow-plugins": {
114114
"cweagans/composer-patches": true,
115-
"yiisoft/yii2-composer": true
115+
"yiisoft/yii2-composer": true,
116+
"dealerdirect/phpcodesniffer-composer-installer": true
116117
}
117118
},
118119
"bin": [

0 commit comments

Comments
 (0)