Skip to content

Commit d54c84b

Browse files
committed
feat(devkit): initialize unified PHP 8.4 DevKit scaffold with Docker Compose & Makefile
- Add docker-compose.yml using kariricode/php-api-stack as the single base image - Introduce professional Makefile with common dev/QA targets - Add install.sh bootstrapper (interactive composer.json + skeleton generation) - Provide quality tools config: PHP-CS-Fixer (.php-cs-fixer.php), PHPStan (phpstan.neon), PHPUnit (phpunit.xml), Rector (rector.php), PHPMD rules (devkit/.config/phpmd/ruleset.xml) - Include runtime configs: error-reporting.ini, xdebug.ini, opcache.ini (under devkit/.config/php/) - Add project metadata and templates: README.md, .env.example, .gitattributes, .gitignore - Add base composer.json for components
1 parent 2d238e2 commit d54c84b

17 files changed

Lines changed: 3343 additions & 15 deletions

.config/php/error-reporting.ini

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,6 @@ session.gc_maxlifetime = 1440
100100
session.sid_length = 48
101101
session.sid_bits_per_character = 6
102102

103-
; ============================================================================
104-
; OPCACHE (disabled for development)
105-
; ============================================================================
106-
; Disable opcache for development to see code changes immediately
107-
opcache.enable = 0
108-
opcache.enable_cli = 0
109-
110-
; If enabled, use these settings for development:
111-
; opcache.validate_timestamps = 1
112-
; opcache.revalidate_freq = 0
113-
; opcache.max_accelerated_files = 10000
114-
; opcache.memory_consumption = 128
115-
; opcache.interned_strings_buffer = 16
116-
; opcache.fast_shutdown = 1
117-
118103
; ============================================================================
119104
; REALPATH CACHE
120105
; ============================================================================

.env.example

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# ============================================================================
2+
# KaririCode DevKit - Environment Configuration
3+
# ============================================================================
4+
# IMPORTANTE: Copie este arquivo para .env e ajuste conforme necessário
5+
# cp .env.example .env
6+
# ============================================================================
7+
8+
# ============================================================================
9+
# PROJECT CONFIGURATION
10+
# ============================================================================
11+
APP_NAME=kariricode-devkit
12+
APP_ENV=development
13+
APP_DEBUG=true
14+
APP_PORT=8089
15+
16+
# Health Check Installation (optional)
17+
# Set to 'true' to install health check endpoint
18+
# Automatically enabled when DEMO_MODE=true
19+
DEMO_MODE=false
20+
HEALTH_CHECK_INSTALL=true
21+
22+
# ============================================================================
23+
# PORTS - Ajuste se houver conflito com serviços existentes
24+
# Usually 6379 for Redis and 11211 for Memcached
25+
# ============================================================================
26+
REDIS_PORT=63777
27+
MEMCACHED_PORT=11210
28+
29+
30+
# ============================================================================
31+
# XDEBUG - Descomente para habilitar
32+
# ============================================================================
33+
XDEBUG_MODE=off
34+
XDEBUG_CLIENT_HOST=host.docker.internal
35+
COMPOSER_MEMORY_LIMIT=-1
36+
37+
# ============================================================================
38+
# REDIS
39+
# ============================================================================
40+
REDIS_MAXMEMORY=256mb
41+
REDIS_MAXMEMORY_POLICY=allkeys-lru
42+
REDIS_APPENDONLY=yes
43+
44+
# ============================================================================
45+
# MEMCACHED
46+
# ============================================================================
47+
MEMCACHED_MEMORY=256
48+
49+
# ============================================================================
50+
# RESOLUÇÃO DE CONFLITOS:
51+
# 1. Identifique a porta em uso: sudo lsof -i :6379
52+
# 2. Altere REDIS_PORT para 6380 ou outra porta disponível
53+
# 3. Execute: make down && make up
54+
# ============================================================================

.gitattributes

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# KaririCode DevKit - Git Attributes Configuration
2+
# Ensures consistent line endings and export-ignore for distribution
3+
4+
# Auto detect text files and normalize line endings to LF
5+
* text=auto eol=lf
6+
7+
# ============================================================================
8+
# SOURCE CODE
9+
# ============================================================================
10+
*.php text eol=lf diff=php
11+
*.inc text eol=lf
12+
*.module text eol=lf
13+
*.install text eol=lf
14+
*.test text eol=lf
15+
*.theme text eol=lf
16+
17+
# ============================================================================
18+
# CONFIGURATION & DATA
19+
# ============================================================================
20+
*.json text eol=lf
21+
*.yml text eol=lf
22+
*.yaml text eol=lf
23+
*.xml text eol=lf
24+
*.ini text eol=lf
25+
*.toml text eol=lf
26+
*.conf text eol=lf
27+
*.config text eol=lf
28+
.env* text eol=lf
29+
*.lock text eol=lf -diff
30+
31+
# ============================================================================
32+
# DOCUMENTATION
33+
# ============================================================================
34+
*.md text eol=lf diff=markdown
35+
*.txt text eol=lf
36+
*.rst text eol=lf
37+
AUTHORS text eol=lf
38+
CHANGELOG text eol=lf
39+
CHANGES text eol=lf
40+
CONTRIBUTING text eol=lf
41+
COPYING text eol=lf
42+
copyright text eol=lf
43+
*COPYRIGHT* text eol=lf
44+
INSTALL text eol=lf
45+
license text eol=lf
46+
LICENSE text eol=lf
47+
NEWS text eol=lf
48+
readme text eol=lf
49+
*README* text eol=lf
50+
TODO text eol=lf
51+
52+
# ============================================================================
53+
# SCRIPTS
54+
# ============================================================================
55+
*.sh text eol=lf
56+
*.bash text eol=lf
57+
*.zsh text eol=lf
58+
*.fish text eol=lf
59+
Makefile text eol=lf
60+
makefile text eol=lf
61+
*.mk text eol=lf
62+
63+
# ============================================================================
64+
# DOCKER
65+
# ============================================================================
66+
Dockerfile text eol=lf
67+
docker-compose*.yml text eol=lf
68+
.dockerignore text eol=lf
69+
70+
# ============================================================================
71+
# WEB FILES
72+
# ============================================================================
73+
*.html text eol=lf diff=html
74+
*.htm text eol=lf diff=html
75+
*.css text eol=lf diff=css
76+
*.scss text eol=lf
77+
*.sass text eol=lf
78+
*.less text eol=lf
79+
*.js text eol=lf
80+
*.mjs text eol=lf
81+
*.ts text eol=lf
82+
*.jsx text eol=lf
83+
*.tsx text eol=lf
84+
*.vue text eol=lf
85+
86+
# ============================================================================
87+
# BINARY FILES
88+
# ============================================================================
89+
# Images
90+
*.png binary
91+
*.jpg binary
92+
*.jpeg binary
93+
*.gif binary
94+
*.ico binary
95+
*.svg binary
96+
*.webp binary
97+
*.bmp binary
98+
*.tiff binary
99+
100+
# Fonts
101+
*.ttf binary
102+
*.otf binary
103+
*.woff binary
104+
*.woff2 binary
105+
*.eot binary
106+
107+
# Archives
108+
*.zip binary
109+
*.tar binary
110+
*.gz binary
111+
*.bz2 binary
112+
*.7z binary
113+
*.rar binary
114+
*.phar binary
115+
116+
# Executables
117+
*.exe binary
118+
*.dll binary
119+
*.so binary
120+
*.dylib binary
121+
122+
# Other
123+
*.pdf binary
124+
*.psd binary
125+
*.ai binary
126+
127+
# ============================================================================
128+
# EXPORT-IGNORE (files not included in distribution archives)
129+
# ============================================================================
130+
# Development files
131+
/.github export-ignore
132+
/tests export-ignore
133+
/docs export-ignore
134+
/.editorconfig export-ignore
135+
/.gitattributes export-ignore
136+
/.gitignore export-ignore
137+
/.php-cs-fixer.php export-ignore
138+
/.php-cs-fixer.cache export-ignore
139+
/phpstan.neon export-ignore
140+
/phpstan-baseline.neon export-ignore
141+
/phpunit.xml export-ignore
142+
/phpunit.xml.dist export-ignore
143+
/.phpunit.cache export-ignore
144+
/rector.php export-ignore
145+
/.rector_cache export-ignore
146+
/devkit export-ignore
147+
/docker-compose.yml export-ignore
148+
/Makefile export-ignore
149+
/.env* export-ignore
150+
/coverage export-ignore
151+
/build export-ignore
152+
/.idea export-ignore
153+
/.vscode export-ignore
154+
/install.sh export-ignore
155+
156+
# CI/CD files
157+
/.github export-ignore
158+
/.gitlab-ci.yml export-ignore
159+
/.travis.yml export-ignore
160+
/azure-pipelines.yml export-ignore
161+
/.circleci export-ignore
162+
163+
# Documentation files
164+
/README.md export-ignore
165+
/CHANGELOG.md export-ignore
166+
/CONTRIBUTING.md export-ignore
167+
/CODE_OF_CONDUCT.md export-ignore
168+
/SECURITY.md export-ignore
169+
/UPGRADING.md export-ignore
170+
171+
# PHP specific
172+
/composer.lock export-ignore
173+
174+
# Git files
175+
/.gitattributes export-ignore
176+
/.gitignore export-ignore

0 commit comments

Comments
 (0)