Skip to content

Releases: gemvc/stcms

1.6.2 Fix: Query string incorrectly included in template path lookup

02 Dec 15:40
e409666

Choose a tag to compare

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

23 Jul 10:17
74b8e70

Choose a tag to compare

fix: respect DEFAULT_LANGUAGE from .env if present in pages, fallback only if missing

1.6.0

20 Jul 15:48
dab76f8

Choose a tag to compare

TWIG Error handling

1.5.11

19 Jul 22:38

Choose a tag to compare

clean index and auto detect production and development mode for vite

1.5.10

19 Jul 20:56

Choose a tag to compare

update Template engine to detect dev and production enviroment

AI assistant update

16 Jul 06:44

Choose a tag to compare

1.5.9

update AI

1.5.8

14 Jul 20:58

Choose a tag to compare

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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

12 Jul 15:50

Choose a tag to compare

refactore init command

1.5.6

12 Jul 15:04

Choose a tag to compare

fix default.twig

1.5.5

12 Jul 11:50

Choose a tag to compare

docs