cache_warmup
cache_warmup copied to clipboard
Migrate cache_warmup addon to use FriendsOfRedaxo\CacheWarmup namespace with simplified class names and backward compatibility
This PR migrates the cache_warmup addon to use the proper namespace FriendsOfRedaxo\CacheWarmup and converts all class names to follow PSR-1 naming conventions with a simplified structure.
Changes Made
Namespace Migration & Simplification:
- Added
namespace FriendsOfRedaxo\CacheWarmup;declaration to all classes in thelib/directory - Simplified class names by removing the
CacheWarmupprefix:-
cache_warmup_generator→Generator -
cache_warmup_generator_images→GeneratorImages -
cache_warmup_generator_pages→GeneratorPages -
cache_warmup_selector→Selector -
cache_warmup_writer→Writer
-
Backward Compatibility:
- Created deprecated wrapper classes in
lib/deprecated/that extend the new namespaced classes - All old class names remain functional until the next major release
- Added proper
@deprecatedannotations with migration guidance
Updated References:
- Updated
usestatements in page files (pages/generator.php,pages/warmup.php) - Class inheritance relationships updated to use new simplified names
- Class instantiation and static method calls updated in page files
Migration Documentation:
- Added comprehensive migration guide to README.md
- Included code examples showing old vs new usage patterns
- Documented all class name changes and namespace structure
Implementation Notes
- Method names were already correctly following camelCase convention
- External REDAXO framework classes (rex_*) remain unchanged
- String identifiers (CSRF token names, CSS classes, translation keys) preserved
- All PHP files pass syntax validation
- Deprecated classes properly include parent classes for immediate usability
- Maintains full backward compatibility through proper namespace usage and wrapper classes
Fixes #120.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.