Skip to content

Commit 60069d9

Browse files
committed
configs
1 parent 0cc327e commit 60069d9

13 files changed

+759
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This file tells which files and directories should be ignored and
2+
# NOT downloaded when using composer to pull down a project with
3+
# the --prefer-dist option selected. Used to remove development
4+
# specific files so user has a clean download.
5+
6+
# git files
7+
.gitattributes export-ignore
8+
.gitignore export-ignore
9+
10+
# Don't give admin files
11+
.github/ export-ignore
12+
admin/ export-ignore
13+
contributing/ export-ignore
14+
.editorconfig export-ignore
15+
.nojekyll export-ignore export-ignore
16+
CODE_OF_CONDUCT.md export-ignore
17+
CONTRIBUTING.md export-ignore
18+
19+
# They don't want our test files
20+
tests/AutoReview/ export-ignore
21+
tests/system/ export-ignore
22+
utils/ export-ignore
23+
deptrac.yaml export-ignore
24+
rector.php export-ignore
25+
phpunit.xml.dist export-ignore
26+
phpstan-baseline.neon.dist export-ignore
27+
phpstan.neon.dist export-ignore
28+
phpstan-bootstrap.php export-ignore
29+
.php-cs-fixer.dist.php export-ignore
30+
.php-cs-fixer.no-header.php export-ignore
31+
.php-cs-fixer.user-guide.php export-ignore
32+
33+
# The source user guide, either
34+
user_guide_src/ export-ignore
35+
phpdoc.dist.xml export-ignore

.gitignore

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
#-------------------------
2+
# Operating Specific Junk Files
3+
#-------------------------
4+
5+
# OS X
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
9+
10+
# OS X Thumbnails
11+
._*
12+
13+
# Windows image file caches
14+
Thumbs.db
15+
ehthumbs.db
16+
Desktop.ini
17+
18+
# Recycle Bin used on file shares
19+
$RECYCLE.BIN/
20+
21+
# Windows Installer files
22+
*.cab
23+
*.msi
24+
*.msm
25+
*.msp
26+
27+
# Windows shortcuts
28+
*.lnk
29+
30+
# Linux
31+
*~
32+
33+
# KDE directory preferences
34+
.directory
35+
36+
# Linux trash folder which might appear on any partition or disk
37+
.Trash-*
38+
39+
#-------------------------
40+
# Environment Files
41+
#-------------------------
42+
# These should never be under version control,
43+
# as it poses a security risk.
44+
.env
45+
.vagrant
46+
Vagrantfile
47+
48+
#-------------------------
49+
# Temporary Files
50+
#-------------------------
51+
writable/cache/*
52+
!writable/cache/index.html
53+
54+
writable/logs/*
55+
!writable/logs/index.html
56+
57+
writable/session/*
58+
!writable/session/index.html
59+
60+
writable/uploads/*
61+
!writable/uploads/index.html
62+
63+
writable/debugbar/*
64+
!writable/debugbar/.gitkeep
65+
66+
writable/**/*.db
67+
writable/**/*.sqlite
68+
69+
php_errors.log
70+
71+
#-------------------------
72+
# User Guide Temp Files
73+
#-------------------------
74+
user_guide_src/build/*
75+
76+
#-------------------------
77+
# Test Files
78+
#-------------------------
79+
tests/coverage*
80+
81+
# Don't save phpunit under version control.
82+
phpunit
83+
84+
#-------------------------
85+
# Composer
86+
#-------------------------
87+
vendor/
88+
composer.lock
89+
90+
#-------------------------
91+
# IDE / Development Files
92+
#-------------------------
93+
94+
# Modules Testing
95+
_modules/*
96+
97+
# phpenv local config
98+
.php-version
99+
100+
# Jetbrains editors (PHPStorm, etc)
101+
.idea/
102+
*.iml
103+
104+
# Netbeans
105+
nbproject/
106+
build/
107+
nbbuild/
108+
dist/
109+
nbdist/
110+
nbactions.xml
111+
nb-configuration.xml
112+
.nb-gradle/
113+
114+
# Sublime Text
115+
*.tmlanguage.cache
116+
*.tmPreferences.cache
117+
*.stTheme.cache
118+
*.sublime-workspace
119+
*.sublime-project
120+
.phpintel
121+
/api/
122+
123+
# Visual Studio Code
124+
.vscode/
125+
126+
/results/
127+
/phpunit*.xml
128+
/.phpunit.*.cache
129+
130+
/.php-cs-fixer.php

.php-cs-fixer.dist.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
use CodeIgniter\CodingStandard\CodeIgniter4;
4+
use Nexus\CsConfig\Factory;
5+
use PhpCsFixer\Finder;
6+
7+
$finder = Finder::create()
8+
->files()
9+
->in([
10+
__DIR__ . '/src/',
11+
__DIR__ . '/tests/',
12+
])
13+
->exclude('build')
14+
->append([__FILE__]);
15+
16+
$overrides = [];
17+
18+
$options = [
19+
'finder' => $finder,
20+
'cacheFile' => 'build/.php-cs-fixer.cache',
21+
];
22+
23+
return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Michal Sniatala
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

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: app/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: app/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: app/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)