Resolved multiple critical discovery system issues: ## Discovery System Fixes - Fixed console commands not being discovered on first run - Implemented fallback discovery for empty caches - Added context-aware caching with separate cache keys - Fixed object serialization preventing __PHP_Incomplete_Class ## Cache System Improvements - Smart caching that only caches meaningful results - Separate caches for different execution contexts (console, web, test) - Proper array serialization/deserialization for cache compatibility - Cache hit logging for debugging and monitoring ## Object Serialization Fixes - Fixed DiscoveredAttribute serialization with proper string conversion - Sanitized additional data to prevent object reference issues - Added fallback for corrupted cache entries ## Performance & Reliability - All 69 console commands properly discovered and cached - 534 total discovery items successfully cached and restored - No more __PHP_Incomplete_Class cache corruption - Improved error handling and graceful fallbacks ## Testing & Quality - Fixed code style issues across discovery components - Enhanced logging for better debugging capabilities - Improved cache validation and error recovery Ready for production deployment with stable discovery system. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
164 lines
3.9 KiB
YAML
164 lines
3.9 KiB
YAML
---
|
|
# Environment-specific variable mappings
|
|
# These variables change behavior based on the environment
|
|
|
|
# Environment Detection
|
|
environment_config:
|
|
production:
|
|
debug_enabled: false
|
|
log_level: "error"
|
|
cache_enabled: true
|
|
minify_assets: true
|
|
ssl_required: true
|
|
monitoring_level: "full"
|
|
backup_frequency: "daily"
|
|
|
|
staging:
|
|
debug_enabled: true
|
|
log_level: "info"
|
|
cache_enabled: true
|
|
minify_assets: false
|
|
ssl_required: true
|
|
monitoring_level: "basic"
|
|
backup_frequency: "weekly"
|
|
|
|
development:
|
|
debug_enabled: true
|
|
log_level: "debug"
|
|
cache_enabled: false
|
|
minify_assets: false
|
|
ssl_required: false
|
|
monitoring_level: "minimal"
|
|
backup_frequency: "never"
|
|
|
|
# Environment-specific PHP configuration
|
|
php_config:
|
|
production:
|
|
display_errors: "Off"
|
|
display_startup_errors: "Off"
|
|
error_reporting: "E_ALL & ~E_DEPRECATED & ~E_STRICT"
|
|
log_errors: "On"
|
|
memory_limit: "512M"
|
|
max_execution_time: 30
|
|
opcache_validate_timestamps: 0
|
|
opcache_revalidate_freq: 0
|
|
|
|
staging:
|
|
display_errors: "On"
|
|
display_startup_errors: "On"
|
|
error_reporting: "E_ALL"
|
|
log_errors: "On"
|
|
memory_limit: "256M"
|
|
max_execution_time: 60
|
|
opcache_validate_timestamps: 1
|
|
opcache_revalidate_freq: 2
|
|
|
|
development:
|
|
display_errors: "On"
|
|
display_startup_errors: "On"
|
|
error_reporting: "E_ALL"
|
|
log_errors: "On"
|
|
memory_limit: "1G"
|
|
max_execution_time: 0
|
|
opcache_validate_timestamps: 1
|
|
opcache_revalidate_freq: 0
|
|
|
|
# Environment-specific database configuration
|
|
database_config:
|
|
production:
|
|
query_cache: true
|
|
slow_query_log: true
|
|
long_query_time: 2
|
|
max_connections: 200
|
|
innodb_buffer_pool_size: "1G"
|
|
|
|
staging:
|
|
query_cache: true
|
|
slow_query_log: true
|
|
long_query_time: 5
|
|
max_connections: 100
|
|
innodb_buffer_pool_size: "512M"
|
|
|
|
development:
|
|
query_cache: false
|
|
slow_query_log: false
|
|
long_query_time: 10
|
|
max_connections: 50
|
|
innodb_buffer_pool_size: "128M"
|
|
|
|
# Environment-specific security settings
|
|
security_config:
|
|
production:
|
|
firewall_strict: true
|
|
rate_limiting: true
|
|
brute_force_protection: true
|
|
ssl_only: true
|
|
hsts_enabled: true
|
|
security_headers: "strict"
|
|
fail2ban_enabled: true
|
|
|
|
staging:
|
|
firewall_strict: false
|
|
rate_limiting: true
|
|
brute_force_protection: true
|
|
ssl_only: true
|
|
hsts_enabled: false
|
|
security_headers: "standard"
|
|
fail2ban_enabled: true
|
|
|
|
development:
|
|
firewall_strict: false
|
|
rate_limiting: false
|
|
brute_force_protection: false
|
|
ssl_only: false
|
|
hsts_enabled: false
|
|
security_headers: "minimal"
|
|
fail2ban_enabled: false
|
|
|
|
# Environment-specific monitoring configuration
|
|
monitoring_config:
|
|
production:
|
|
health_check_interval: 30
|
|
metric_collection_interval: 60
|
|
log_level: "warn"
|
|
alert_on_errors: true
|
|
performance_monitoring: true
|
|
|
|
staging:
|
|
health_check_interval: 60
|
|
metric_collection_interval: 300
|
|
log_level: "info"
|
|
alert_on_errors: false
|
|
performance_monitoring: true
|
|
|
|
development:
|
|
health_check_interval: 300
|
|
metric_collection_interval: 600
|
|
log_level: "debug"
|
|
alert_on_errors: false
|
|
performance_monitoring: false
|
|
|
|
# Environment-specific caching configuration
|
|
cache_config:
|
|
production:
|
|
driver: "redis"
|
|
default_ttl: 3600
|
|
prefix: "prod_"
|
|
|
|
staging:
|
|
driver: "redis"
|
|
default_ttl: 1800
|
|
prefix: "staging_"
|
|
|
|
development:
|
|
driver: "file"
|
|
default_ttl: 300
|
|
prefix: "dev_"
|
|
|
|
# Current environment configuration (set by inventory)
|
|
current_config: "{{ environment_config[environment] }}"
|
|
current_php_config: "{{ php_config[environment] }}"
|
|
current_database_config: "{{ database_config[environment] }}"
|
|
current_security_config: "{{ security_config[environment] }}"
|
|
current_monitoring_config: "{{ monitoring_config[environment] }}"
|
|
current_cache_config: "{{ cache_config[environment] }}" |