Troubleshooting
Common issues and solutions when working with Stilmark Base.
Installation Issues
Composer Installation Fails
Problem: composer require stilmark/base fails with dependency conflicts.
Solution:
# Update Composer first
composer self-update
# Clear Composer cache
composer clear-cache
# Try installation with verbose output
composer require stilmark/base -vPHP Version Compatibility
Problem: "Your PHP version (X.X.X) does not satisfy requirement php ^8.2"
Solution:
Ensure you're running PHP 8.2 or higher
Check your PHP version:
php -vUpdate PHP through your system package manager or use a version manager like phpbrew
Missing Extensions
Problem: Class 'Symfony\Component\Dotenv\Dotenv' not found or OAuth functionality not working.
Solution:
Runtime Issues
Environment Variables Not Loading
Problem: Env::get() returns null or default values.
Solutions:
Check
.envfile exists and is readableVerify file path in
Env::load()callEnsure no syntax errors in
.envfile
Routing Issues
Problem: Routes not matching or 404 errors.
Solutions:
Check route definitions syntax
Verify controller namespace and method exist
Ensure proper URL rewriting (Apache/Nginx)
OAuth Authentication Fails
Problem: Google OAuth returns errors or fails silently.
Solutions:
Verify Google OAuth credentials in
.envCheck redirect URI matches Google Console settings
Ensure HTTPS in production
Session Issues
Problem: Sessions not persisting or authentication middleware failing.
Solutions:
Ensure sessions are started before using Auth
Check session configuration
Verify session storage permissions
Performance Issues
Slow Route Resolution
Problem: Application responds slowly on route matching.
Solutions:
Enable route caching in production
Optimize route definitions order
Use FastRoute's caching features
Memory Usage
Problem: High memory consumption.
Solutions:
Profile memory usage with Xdebug
Optimize large data processing
Use streaming for large responses
Development Tips
Debugging
Enable detailed error reporting during development:
Logging
Use the built-in Logger for debugging:
Testing Routes
Create a simple test script:
Getting Help
If you're still experiencing issues:
Check the GitHub Issues
Review the complete documentation
Create a minimal reproduction case
Submit a new issue with:
PHP version
Stilmark Base version
Error messages
Minimal code example
Last updated