Skip to content

Commit 90ea5c7

Browse files
committed
Move phpstan and rector to root composer.json
1 parent 8609136 commit 90ea5c7

12 files changed

+21
-43
lines changed

.github/workflows/reusable-coveralls.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
2018

2119
- name: Setup PHP
2220
uses: shivammathur/setup-php@v2

.github/workflows/reusable-phpunit-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ jobs:
150150
151151
- name: Checkout
152152
uses: actions/checkout@v4
153-
with:
154-
fetch-depth: 0
155153

156154
- name: Setup PHP
157155
uses: shivammathur/setup-php@v2

.github/workflows/reusable-serviceless-phpunit-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ jobs:
6262
6363
- name: Checkout
6464
uses: actions/checkout@v4
65-
with:
66-
fetch-depth: 0
6765

6866
- name: Setup PHP
6967
uses: shivammathur/setup-php@v2

.github/workflows/test-autoreview.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ jobs:
3737
steps:
3838
- name: Checkout
3939
uses: actions/checkout@v4
40-
with:
41-
fetch-depth: 0
4240

4341
- name: Setup PHP
4442
uses: shivammathur/setup-php@v2

.github/workflows/test-coding-standards.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
steps:
3535
- name: Checkout
3636
uses: actions/checkout@v4
37-
with:
38-
fetch-depth: 0
3937

4038
- name: Setup PHP
4139
uses: shivammathur/setup-php@v2

.github/workflows/test-deptrac.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
steps:
3939
- name: Checkout
4040
uses: actions/checkout@v4
41-
with:
42-
fetch-depth: 0
4341

4442
- name: Setup PHP
4543
uses: shivammathur/setup-php@v2

.github/workflows/test-phpstan.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ jobs:
4747
steps:
4848
- name: Checkout
4949
uses: actions/checkout@v4
50-
with:
51-
fetch-depth: 0
5250

5351
- name: Setup PHP
5452
uses: shivammathur/setup-php@v2
@@ -87,4 +85,4 @@ jobs:
8785
run: composer update --ansi --no-interaction
8886

8987
- name: Run static analysis
90-
run: utils/vendor/bin/phpstan analyse
88+
run: vendor/bin/phpstan analyse

.github/workflows/test-psalm.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ jobs:
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v4
32-
with:
33-
fetch-depth: 0
3432

3533
- name: Setup PHP
3634
uses: shivammathur/setup-php@v2

.github/workflows/test-rector.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ jobs:
4949
steps:
5050
- name: Checkout
5151
uses: actions/checkout@v4
52-
with:
53-
fetch-depth: 0
5452

5553
- name: Setup PHP
5654
uses: shivammathur/setup-php@v2
@@ -87,4 +85,4 @@ jobs:
8785
- run: mkdir -p /tmp/rector
8886

8987
- name: Run static analysis
90-
run: utils/vendor/bin/rector process --dry-run --no-progress-bar
88+
run: vendor/bin/rector process --dry-run --no-progress-bar

composer.json

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717
"psr/log": "^3.0"
1818
},
1919
"require-dev": {
20+
"codeigniter/phpstan-codeigniter": "^1.4",
2021
"fakerphp/faker": "^1.9",
2122
"kint-php/kint": "^5.0.4",
2223
"mikey179/vfsstream": "^1.6",
2324
"nexusphp/tachycardia": "^2.0",
25+
"phpstan/extension-installer": "^1.4",
26+
"phpstan/phpstan": "^1.11",
27+
"phpstan/phpstan-strict-rules": "^1.6",
2428
"phpunit/phpcov": "^9.0.2",
2529
"phpunit/phpunit": "^10.5.16",
26-
"predis/predis": "^1.1 || ^2.0"
30+
"predis/predis": "^1.1 || ^2.0",
31+
"rector/rector": "1.2.1"
2732
},
2833
"replace": {
2934
"codeigniter4/framework": "self.version"
@@ -61,10 +66,14 @@
6166
},
6267
"autoload-dev": {
6368
"psr-4": {
64-
"CodeIgniter\\": "tests/system/"
69+
"CodeIgniter\\": "tests/system/",
70+
"Utils\\": "utils/src/"
6571
}
6672
},
6773
"config": {
74+
"allow-plugins": {
75+
"phpstan/extension-installer": true
76+
},
6877
"optimize-autoloader": true,
6978
"preferred-install": "dist",
7079
"sort-packages": true
@@ -75,16 +84,16 @@
7584
}
7685
},
7786
"scripts": {
78-
"post-autoload-dump": [
79-
"@composer update --working-dir=utils"
80-
],
8187
"post-update-cmd": [
8288
"CodeIgniter\\ComposerScripts::postUpdate"
8389
],
90+
"post-autoload-dump": [
91+
"@composer update --working-dir=utils"
92+
],
8493
"analyze": [
8594
"Composer\\Config::disableProcessTimeout",
86-
"bash -c \"XDEBUG_MODE=off utils/vendor/bin/phpstan analyse\"",
87-
"utils/vendor/bin/rector process --dry-run"
95+
"bash -c \"XDEBUG_MODE=off vendor/bin/phpstan analyse\"",
96+
"vendor/bin/rector process --dry-run"
8897
],
8998
"cs": [
9099
"Composer\\Config::disableProcessTimeout",

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
])
8686
->withPHPStanConfigs([
8787
__DIR__ . '/phpstan.neon.dist',
88-
__DIR__ . '/utils/vendor/codeigniter/phpstan-codeigniter/extension.neon',
89-
__DIR__ . '/utils/vendor/phpstan/phpstan-strict-rules/rules.neon',
88+
__DIR__ . '/vendor/codeigniter/phpstan-codeigniter/extension.neon',
89+
__DIR__ . '/vendor/phpstan/phpstan-strict-rules/rules.neon',
9090
])
9191
// is there a file you need to skip?
9292
->withSkip([

utils/composer.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,20 @@
22
"require": {
33
"php": "^8.1",
44
"codeigniter/coding-standard": "^1.7",
5-
"codeigniter/phpstan-codeigniter": "^1.4",
6-
"codeigniter4/codeigniter4": "4.x-dev",
75
"ergebnis/composer-normalize": "^2.28",
86
"friendsofphp/php-cs-fixer": "^3.47.1",
97
"nexusphp/cs-config": "^3.6",
108
"phpmetrics/phpmetrics": "^2.8 || ^3.0rc6",
11-
"phpstan/extension-installer": "^1.3",
12-
"phpstan/phpstan": "^1.11",
13-
"phpstan/phpstan-strict-rules": "^1.6",
14-
"rector/rector": "1.2.1",
159
"vimeo/psalm": "^5.0"
1610
},
17-
"repositories": [
18-
{
19-
"type": "path",
20-
"url": "../"
21-
}
22-
],
2311
"autoload": {
2412
"psr-4": {
2513
"Utils\\": "src/"
2614
}
2715
},
2816
"config": {
2917
"allow-plugins": {
30-
"ergebnis/composer-normalize": true,
31-
"phpstan/extension-installer": true
18+
"ergebnis/composer-normalize": true
3219
},
3320
"optimize-autoloader": true,
3421
"preferred-install": "dist",

0 commit comments

Comments
 (0)