Common issues and solutions when working with Stilmark Base.
Installation Issues
Composer Installation Fails
Problem: composer require stilmark/base fails with dependency conflicts.
Solution:
Copy # Update Composer first
composer self-update
# Clear Composer cache
composer clear-cache
# Try installation with verbose output
composer require stilmark/base -v PHP 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 -v
Update 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:
Environment Variables Not Loading
Problem: Env::get() returns null or default values.
Solutions:
Check .env file exists and is readable
Verify file path in Env::load() call
Ensure no syntax errors in .env file
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 .env
Check redirect URI matches Google Console settings
Ensure HTTPS in production
Problem: Sessions not persisting or authentication middleware failing.
Solutions:
Ensure sessions are started before using Auth
Check session configuration
Verify session storage permissions
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
Problem: High memory consumption.
Solutions:
Profile memory usage with Xdebug
Optimize large data processing
Use streaming for large responses
Development Tips
Enable detailed error reporting during development:
Use the built-in Logger for debugging:
Create a simple test script:
If you're still experiencing issues:
Create a minimal reproduction case
Last updated 4 months ago