Skip to content

Commit 0f187f2

Browse files
authored
Merge pull request #1 from KaririCode-Framework/develop
Develop
2 parents a721e8c + 55629c9 commit 0f187f2

Some content is hidden

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

48 files changed

+13630
-0
lines changed

.config/php/error-reporting.ini

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
; ============================================================================
2+
; KaririCode DevKit - Error Reporting Configuration
3+
; ============================================================================
4+
; Strict error reporting configuration for development environment
5+
; All errors, warnings, and notices are displayed to catch issues early
6+
;
7+
; Location: devkit/.config/php/error-reporting.ini
8+
; ============================================================================
9+
10+
[PHP]
11+
; ============================================================================
12+
; ERROR REPORTING
13+
; ============================================================================
14+
; Report all errors, warnings, and notices
15+
error_reporting = E_ALL
16+
17+
; Display errors on screen (development only)
18+
display_errors = On
19+
display_startup_errors = On
20+
21+
; Log errors to file
22+
log_errors = On
23+
error_log = /var/log/php_errors.log
24+
25+
; Detailed error messages
26+
html_errors = On
27+
docref_root = "https://www.php.net/manual/en/"
28+
docref_ext = .html
29+
30+
; Track all errors
31+
track_errors = Off
32+
xmlrpc_errors = Off
33+
34+
; ============================================================================
35+
; ASSERTIONS
36+
; ============================================================================
37+
; Enable assertions for development
38+
zend.assertions = 1
39+
assert.active = 1
40+
assert.exception = 1
41+
assert.warning = 0
42+
assert.bail = 0
43+
44+
; ============================================================================
45+
; DEVELOPMENT SETTINGS
46+
; ============================================================================
47+
; Hide PHP version in headers (security)
48+
expose_php = Off
49+
50+
; Variables order
51+
variables_order = "EGPCS"
52+
request_order = "GP"
53+
54+
; Auto-detect line endings
55+
auto_detect_line_endings = Off
56+
57+
; ============================================================================
58+
; RESOURCE LIMITS
59+
; ============================================================================
60+
; Memory limit (generous for development)
61+
memory_limit = 512M
62+
63+
; Maximum execution time
64+
max_execution_time = 30
65+
max_input_time = 60
66+
67+
; Input size limits
68+
post_max_size = 25M
69+
upload_max_filesize = 20M
70+
max_file_uploads = 20
71+
72+
; ============================================================================
73+
; OUTPUT BUFFERING
74+
; ============================================================================
75+
; Output buffering (off for immediate error display)
76+
output_buffering = Off
77+
implicit_flush = On
78+
79+
; ============================================================================
80+
; DATE/TIME
81+
; ============================================================================
82+
; Default timezone
83+
date.timezone = UTC
84+
85+
; ============================================================================
86+
; SESSION
87+
; ============================================================================
88+
; Session configuration
89+
session.save_handler = files
90+
session.save_path = "/tmp"
91+
session.use_strict_mode = 1
92+
session.use_cookies = 1
93+
session.use_only_cookies = 1
94+
session.cookie_httponly = 1
95+
session.cookie_secure = 0
96+
session.cookie_samesite = "Lax"
97+
session.gc_probability = 1
98+
session.gc_divisor = 100
99+
session.gc_maxlifetime = 1440
100+
session.sid_length = 48
101+
session.sid_bits_per_character = 6
102+
103+
; ============================================================================
104+
; REALPATH CACHE
105+
; ============================================================================
106+
; Realpath cache (keep small for development)
107+
realpath_cache_size = 4096K
108+
realpath_cache_ttl = 120
109+
110+
; ============================================================================
111+
; FILE UPLOADS
112+
; ============================================================================
113+
; File uploads enabled
114+
file_uploads = On
115+
upload_tmp_dir = /tmp
116+
117+
; ============================================================================
118+
; SECURITY
119+
; ============================================================================
120+
; Disable dangerous functions (customize as needed)
121+
disable_functions =
122+
disable_classes =
123+
124+
; ============================================================================
125+
; MAIL
126+
; ============================================================================
127+
; Mail configuration (usually handled by application)
128+
SMTP = localhost
129+
smtp_port = 25
130+
sendmail_path = /usr/sbin/sendmail -t -i
131+
132+
; ============================================================================
133+
; MISC
134+
; ============================================================================
135+
; Allow URL fopen (needed for many libraries)
136+
allow_url_fopen = On
137+
allow_url_include = Off
138+
139+
; Auto-prepend/append files
140+
auto_prepend_file =
141+
auto_append_file =
142+
143+
; Default charset
144+
default_charset = "UTF-8"
145+
146+
; Maximum input variables (prevent resource exhaustion)
147+
max_input_vars = 1000
148+
max_input_nesting_level = 64
149+
150+
; ============================================================================
151+
; EXTENSIONS
152+
; ============================================================================
153+
; Common extensions are enabled by default in kariricode/php-api-stack
154+
; Additional extensions can be enabled as needed:
155+
; extension=redis.so
156+
; extension=memcached.so
157+
; extension=apcu.so
158+
; extension=imagick.so

.config/php/xdebug.ini

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
; ============================================================================
2+
; KaririCode DevKit - Xdebug Configuration
3+
; ============================================================================
4+
; Xdebug 3.x configuration for step debugging and code coverage
5+
; https://xdebug.org/docs/all_settings
6+
;
7+
; Location: devkit/.config/php/xdebug.ini
8+
; ============================================================================
9+
10+
[xdebug]
11+
; ============================================================================
12+
; MODE CONFIGURATION
13+
; ============================================================================
14+
; Modes: off, develop, coverage, debug, gcstats, profile, trace
15+
; Multiple modes can be combined with commas (e.g., "debug,coverage")
16+
; This is controlled by environment variable XDEBUG_MODE in .env
17+
xdebug.mode=${XDEBUG_MODE}
18+
19+
; ============================================================================
20+
; DEBUGGING
21+
; ============================================================================
22+
; Start debugging automatically or wait for trigger
23+
; Values: yes, no, trigger
24+
xdebug.start_with_request=yes
25+
26+
; IDE/Client connection settings
27+
; Use host.docker.internal for Docker Desktop (Mac/Windows)
28+
; Use 172.17.0.1 for Docker on Linux
29+
xdebug.client_host=host.docker.internal
30+
xdebug.client_port=9003
31+
32+
; Discovery mode for cloud/dynamic environments
33+
; Set to 1 if you need automatic discovery (not recommended for local dev)
34+
xdebug.discover_client_host=0
35+
36+
; IDE key for identifying debugging session
37+
; PHPStorm: PHPSTORM
38+
; VSCode: VSCODE
39+
xdebug.idekey=PHPSTORM
40+
41+
; Connection timeout in milliseconds
42+
xdebug.connect_timeout_ms=2000
43+
44+
; ============================================================================
45+
; LOGGING
46+
; ============================================================================
47+
; Log file location (useful for debugging connection issues)
48+
xdebug.log=/var/log/xdebug.log
49+
50+
; Log level (0-10, where 10 is most verbose)
51+
; 0 = Criticals
52+
; 1 = Errors
53+
; 3 = Warnings
54+
; 5 = Communication
55+
; 7 = Information
56+
; 10 = Debug
57+
xdebug.log_level=7
58+
59+
; ============================================================================
60+
; STEP DEBUGGING
61+
; ============================================================================
62+
; Maximum nesting level for recursive debugging
63+
; Increase if you have deeply nested structures
64+
xdebug.max_nesting_level=512
65+
66+
; ============================================================================
67+
; COVERAGE
68+
; ============================================================================
69+
; Enable code coverage (required for PHPUnit coverage)
70+
xdebug.coverage_enable=1
71+
72+
; ============================================================================
73+
; DEVELOPMENT MODE
74+
; ============================================================================
75+
; Development helpers (when mode=develop)
76+
; Show local variables in stack traces
77+
xdebug.dump.GET=*
78+
xdebug.dump.POST=*
79+
xdebug.dump.COOKIE=*
80+
xdebug.dump.FILES=*
81+
xdebug.dump.SESSION=*
82+
83+
; ============================================================================
84+
; PROFILING (disabled by default)
85+
; ============================================================================
86+
; Uncomment to enable profiling
87+
; xdebug.profiler_enable=0
88+
; xdebug.profiler_enable_trigger=1
89+
; xdebug.profiler_enable_trigger_value=""
90+
; xdebug.profiler_output_dir=/var/www/profiler
91+
; xdebug.profiler_output_name=cachegrind.out.%p
92+
93+
; ============================================================================
94+
; TRACING (disabled by default)
95+
; ============================================================================
96+
; Uncomment to enable function tracing
97+
; xdebug.trace_enable_trigger=1
98+
; xdebug.trace_enable_trigger_value=""
99+
; xdebug.trace_output_dir=/var/www/traces
100+
; xdebug.trace_output_name=trace.%c
101+
; xdebug.trace_format=0
102+
; xdebug.trace_options=0
103+
104+
; ============================================================================
105+
; PERFORMANCE
106+
; ============================================================================
107+
; Show memory usage in stack traces
108+
xdebug.show_mem_delta=1
109+
110+
; ============================================================================
111+
; DISPLAY
112+
; ============================================================================
113+
; HTML error output formatting
114+
xdebug.cli_color=1
115+
116+
; Variable display depth
117+
xdebug.var_display_max_depth=10
118+
119+
; Maximum number of array children/object properties
120+
xdebug.var_display_max_children=256
121+
122+
; Maximum string length
123+
xdebug.var_display_max_data=4096
124+
125+
; ============================================================================
126+
; USAGE TIPS
127+
; ============================================================================
128+
;
129+
; Enable Xdebug:
130+
; make xdebug-on
131+
;
132+
; Disable Xdebug:
133+
; make xdebug-off
134+
;
135+
; Check Status:
136+
; make xdebug-status
137+
;
138+
; IDE Configuration:
139+
; PHPStorm:
140+
; - Settings > PHP > Debug
141+
; - Port: 9003
142+
; - Check "Accept external connections"
143+
; - Settings > PHP > Servers
144+
; - Add server: localhost, port 9003
145+
; - Map: /var/www -> your-project-path
146+
;
147+
; VSCode:
148+
; - Install PHP Debug extension
149+
; - Add to launch.json:
150+
; {
151+
; "name": "Listen for Xdebug",
152+
; "type": "php",
153+
; "request": "launch",
154+
; "port": 9003,
155+
; "pathMappings": {
156+
; "/var/www": "${workspaceFolder}"
157+
; }
158+
; }
159+
;
160+
; ============================================================================

0 commit comments

Comments
 (0)