Releases: gemvc/stcms
Releases · gemvc/stcms
1.6.2 Fix: Query string incorrectly included in template path lookup
Problem
When accessing URLs with query parameters (e.g., /en/product?id=1),
the router was looking for a template named product?id=1.twig instead of product.twig.
Solution
Use parse_url($uri, PHP_URL_PATH) to extract only the path component
from REQUEST_URI before passing it to the Request object.
Files Changed
src/Core/Application.php-createRequest()method
1.6.1
1.6.0
1.5.11
1.5.10
AI assistant update
1.5.9 update AI
1.5.8
Summary of Enhancements
Over our sessions, we addressed critical bugs, added powerful new features, and significantly improved the project's documentation. The main goal was to enhance security, developer experience, and deployment robustness based on real-world feedback.
- Enhanced Security and Server Configuration:
Centralized .htaccess Logic: We refactored the .htaccess configuration, moving all security and routing logic into two primary files (htaccess_root and htaccess_public). This new setup effectively blocks direct access to sensitive directories (src, vendor, assets, etc.) from the root level while properly routing all traffic through the public/ directory. This approach eliminates configuration errors on shared hosting environments like cPanel and removes the need for scattered .htaccess files. - New Command-Line (CLI) Tools:
Cache Management (cache:clear): We introduced a new php bin/stcms cache:clear command. This essential tool allows developers to easily clear the Twig template cache in a production environment, ensuring that template changes are reflected without manual intervention.
Automated Deployment Scaffolding (deploy:init): We created an advanced php bin/stcms deploy:init command. This feature allows users to generate CI/CD workflow templates for services like GitHub Actions. We implemented a github-actions-ftp template that automates the entire deployment process, including building assets and securely creating the .env file on the server using GitHub Secrets. - Core Bug Fixes and Refactoring:
Refactored InitCommand: We fixed a significant bug in the init command where file contents (index.php, vite.config.js, .htaccess) were hardcoded. The command now copies these files directly from the src/setup/ directory, ensuring a single source of truth and making the project easier to maintain. - Comprehensive Documentation Overhaul:
Updated AI_ONBOARDING.md and README.md: Both documentation files were thoroughly updated to reflect all the new features and best practices. This includes:
Detailed explanations of the new CLI commands (cache:clear, deploy:init).
A new, comprehensive section on automated deployment using GitHub Actions and managing environment variables with GitHub Secrets.
Revised descriptions of the improved and more secure .htaccess configuration.
An updated Quick Reference Table for easy access to all commands and features.
These changes have made STCMS a more professional, secure, and developer-friendly library, ready for robust, real-world applications.
1.5.7 refactore init command
refactore init command