Skip to content

Port to OXID eShop 6.5+ with PHP 8 compatibility#73

Open
AlexHupe wants to merge 2 commits intojkrug:masterfrom
AlexHupe:feature/oxid6-php8-port
Open

Port to OXID eShop 6.5+ with PHP 8 compatibility#73
AlexHupe wants to merge 2 commits intojkrug:masterfrom
AlexHupe:feature/oxid6-php8-port

Conversation

@AlexHupe
Copy link

@AlexHupe AlexHupe commented Feb 7, 2026

Summary

Complete port of TOXID cURL from OXID 4.x/5.x to OXID eShop 6.5+ with full PHP 8 compatibility.

What changed

  • Metadata 1.1 → 2.1: Updated to OXID 6.x module format
  • PSR-4 Namespaces: All classes use Toxid\ namespace with proper directory structure (Application/, Core/)
  • Class registration: Replaced files array with controllers array, extend uses FQCN instead of path strings
  • PHP 8 compatibility: Null coalescing operators, type hints, return types, str_starts_with() usage
  • Smarty plugins: Registered via smartyPluginDirectories instead of manual UtilsView extension
  • Template: Generic Bootstrap-based toxid.tpl with sidebar/content layout (replaces azure-specific templates)
  • Admin: Full admin configuration panel with all settings (SSL, cache TTL, URL rewriting, 404 handling)
  • URL rewriting: Support for both main and SSL source URLs, proper redirect handling (301/302/303/307)
  • Caching: Configurable TTL with OXID file cache

Removed

  • events system (onActivate/onDeactivate) - not needed with metadata 2.1
  • Content widget - can be replaced with standard Smarty calls
  • Azure theme templates - replaced with generic template
  • Old classmap autoloading

Tested with

  • OXID eShop 6.5.5 CE
  • PHP 8.1
  • WordPress as CMS backend (via TOXID WordPress theme)

Migration from v2.x

  1. Deactivate the old module
  2. Remove old toxid_curl/ directory from modules
  3. Install new version via composer or copy to modules/toxid_curl/
  4. Activate module - existing config settings are preserved (same config keys)

Test plan

  • Install module in OXID 6.5+ shop
  • Configure CMS source URL in admin panel
  • Verify CMS pages render correctly with navigation sidebar
  • Verify URL rewriting (CMS URLs → shop SEO URLs)
  • Verify caching works (check tmp/ for cached snippets)
  • Verify SSL URL replacement works
  • Verify 404 handling for missing CMS pages

🤖 Generated with Claude Code

- Upgrade metadata from 1.1 to 2.1
- Replace classmap autoloading with PSR-4 namespaces (Toxid\)
- Restructure to OXID 6.x module directory layout (Application/, Core/)
- Replace old extend paths with fully qualified class names
- Replace 'files' array with 'controllers' array
- Add smartyPluginDirectories for Smarty plugin registration
- Fix PHP 8 compatibility (null coalescing, type hints, return types)
- Replace azure theme template with generic wave-compatible template
- Add SSL URL rewriting support for alternative source URLs
- Add 301/302/303/307 redirect handling with URL rewriting
- Add configurable cache TTL with file cache support
- Add SSL certificate verification toggle
- Update admin configuration template
- Remove deprecated events system and content widget

Tested with OXID eShop 6.5.5 CE, PHP 8.1, WordPress as CMS backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AlexHupe
Copy link
Author

AlexHupe commented Feb 7, 2026

Live-Demo: https://endlichzuhause.de/magazin/

- Ensure trailing slash for href/action URLs after rewriting CMS URLs
  to OXID SEO URLs (skip for src/srcset and file extensions)
- Cache page title, description and keywords alongside snippet content
  so metadata is restored on cache hits instead of being lost

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant