Skip to content

Commit 9d88343

Browse files
authored
Merge pull request #60 from tattersoftware/retool
Support for CodeIgniter v4.4
2 parents 3193e14 + 5b13131 commit 9d88343

16 files changed

+279
-279
lines changed
File renamed without changes.

.github/workflows/infection.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up PHP
3232
uses: shivammathur/setup-php@v2
3333
with:
34-
php-version: '8.0'
34+
php-version: '8.2'
3535
tools: infection, phpunit
3636
extensions: intl, json, mbstring, gd, xml, sqlite3
3737
coverage: xdebug

.github/workflows/rector.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
php-versions: ['7.4', '8.0', '8.1']
29+
php-versions: ['7.4', '8.0', '8.1', '8.2']
3030

3131
steps:
3232
- name: Checkout
@@ -40,29 +40,25 @@ jobs:
4040
extensions: intl, json, mbstring, xml
4141
coverage: none
4242
env:
43-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444

4545
- name: Get composer cache directory
46-
id: composer-cache
47-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
46+
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
4847

4948
- name: Cache composer dependencies
5049
uses: actions/cache@v3
5150
with:
52-
path: ${{ steps.composer-cache.outputs.dir }}
51+
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
5352
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
5453
restore-keys: ${{ runner.os }}-composer-
5554

5655
- name: Install dependencies
5756
run: |
58-
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
5957
if [ -f composer.lock ]; then
6058
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
6159
else
6260
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
6361
fi
6462
6563
- name: Analyze for refactoring
66-
run: |
67-
composer global require --dev rector/rector:^0.12.16
68-
rector process --dry-run --no-progress-bar
64+
run: vendor/bin/rector process --dry-run --no-progress-bar

.php-cs-fixer.dist.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
->exclude('build')
1414
->append([__FILE__]);
1515

16-
$overrides = [];
16+
$overrides = [
17+
'php_unit_data_provider_return_type' => false,
18+
'php_unit_data_provider_name' => false,
19+
'php_unit_data_provider_static' => false,
20+
];
1721

1822
$options = [
1923
'finder' => $finder,

depfile.yaml

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

deptrac.yaml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
parameters:
2+
paths:
3+
- ./src/
4+
- ./vendor/codeigniter4/framework/system/
5+
exclude_files:
6+
- '#.*test.*#i'
7+
layers:
8+
- name: Model
9+
collectors:
10+
- type: bool
11+
must:
12+
- type: className
13+
regex: .*[A-Za-z]+Model$
14+
must_not:
15+
- type: directory
16+
regex: vendor/.*
17+
- name: Vendor Model
18+
collectors:
19+
- type: bool
20+
must:
21+
- type: className
22+
regex: .*[A-Za-z]+Model$
23+
- type: directory
24+
regex: vendor/.*
25+
- name: Controller
26+
collectors:
27+
- type: bool
28+
must:
29+
- type: className
30+
regex: .*\/Controllers\/.*
31+
must_not:
32+
- type: directory
33+
regex: vendor/.*
34+
- name: Vendor Controller
35+
collectors:
36+
- type: bool
37+
must:
38+
- type: className
39+
regex: .*\/Controllers\/.*
40+
- type: directory
41+
regex: vendor/.*
42+
- name: Config
43+
collectors:
44+
- type: bool
45+
must:
46+
- type: directory
47+
regex: src/Config/.*
48+
must_not:
49+
- type: className
50+
regex: .*Services
51+
- type: directory
52+
regex: vendor/.*
53+
- name: Vendor Config
54+
collectors:
55+
- type: bool
56+
must:
57+
- type: directory
58+
regex: vendor/.*/Config/.*
59+
must_not:
60+
- type: className
61+
regex: .*Services
62+
- name: Entity
63+
collectors:
64+
- type: bool
65+
must:
66+
- type: directory
67+
regex: src/Entities/.*
68+
must_not:
69+
- type: directory
70+
regex: vendor/.*
71+
- name: Vendor Entity
72+
collectors:
73+
- type: bool
74+
must:
75+
- type: directory
76+
regex: vendor/.*/Entities/.*
77+
- name: View
78+
collectors:
79+
- type: bool
80+
must:
81+
- type: directory
82+
regex: src/Views/.*
83+
must_not:
84+
- type: directory
85+
regex: vendor/.*
86+
- name: Vendor View
87+
collectors:
88+
- type: bool
89+
must:
90+
- type: directory
91+
regex: vendor/.*/Views/.*
92+
- name: Service
93+
collectors:
94+
- type: className
95+
regex: .*Services.*
96+
ruleset:
97+
Entity:
98+
- Config
99+
- Model
100+
- Service
101+
- Vendor Config
102+
- Vendor Entity
103+
- Vendor Model
104+
Config:
105+
- Service
106+
- Vendor Config
107+
Model:
108+
- Config
109+
- Entity
110+
- Service
111+
- Vendor Config
112+
- Vendor Entity
113+
- Vendor Model
114+
Service:
115+
- Config
116+
- Vendor Config
117+
118+
# Ignore anything in the Vendor layers
119+
Vendor Model:
120+
- Config
121+
- Service
122+
- Vendor Config
123+
- Vendor Controller
124+
- Vendor Entity
125+
- Vendor Model
126+
- Vendor View
127+
Vendor Controller:
128+
- Service
129+
- Vendor Config
130+
- Vendor Controller
131+
- Vendor Entity
132+
- Vendor Model
133+
- Vendor View
134+
Vendor Config:
135+
- Config
136+
- Service
137+
- Vendor Config
138+
- Vendor Controller
139+
- Vendor Entity
140+
- Vendor Model
141+
- Vendor View
142+
Vendor Entity:
143+
- Service
144+
- Vendor Config
145+
- Vendor Controller
146+
- Vendor Entity
147+
- Vendor Model
148+
- Vendor View
149+
Vendor View:
150+
- Service
151+
- Vendor Config
152+
- Vendor Controller
153+
- Vendor Entity
154+
- Vendor Model
155+
- Vendor View
156+
skip_violations:

0 commit comments

Comments
 (0)