In this technical deep-dive, we explore how combining PHP traits and magic methods can dramatically simplify image URL generation in a CMS. The article describes the implementation of ImageUrlTrait, a clever solution that replaces verbose, error-prone code with a clean, maintainable approach. By leveraging PHP's trait mechanism for code reuse and magic methods for dynamic property handling, the solution allows developers to easily access different image sizes through intuitive properties like $image->smallImageUrl or $image->largeImageUrl. The transformation from complex, nested HTML helper calls to a streamlined element-based approach demonstrates significant improvements in code readability and maintainability.


This blog post details the implementation of rate limiting and IP blocking within a Willow CMS, focusing on the key code components and their rationale. This information is intended for developers looking to implement similar security measures in their projects. Since putting Willow live for this site, it has been interesting to view the logs and see all the attempts from Singapore trying to find exploits!


Willow CMS has officially launched! I've been building Willow CMS for a few months now and it's time to put version 1 into use. Willow offers offers dual editing options with both Trumbowyg Rich Text and Markdown editors, image management capabilities, AI features for SEO optimisation and automatic translation support for 25 languages. In this post I share a video showcasing the Willows interface for publishing pages and blog posts.


This comprehensive guide details how PHPUnit testing is implemented in Willow CMS, both locally and through GitHub Actions. The testing infrastructure includes 116 tests and 414 assertions, providing robust quality assurance. The setup revolves around five key components: a PHPUnit configuration file, GitHub Actions for continuous integration, shared test case code for DRY principles, controller tests for critical functionality, and code coverage reporting. The system uses random test execution to ensure independence and includes both admin and non-admin testing scenarios. The GitHub Actions workflow is particularly noteworthy, running tests across multiple PHP versions and incorporating various quality checks including PHPStan and PHP CodeSniffer.


This article provides a comprehensive breakdown of Docker Compose configuration for Willow CMS's development environment. The setup includes multiple containerized services: the main WillowCMS application server, MySQL database, phpMyAdmin, Jenkins for CI/CD, Mailpit for email testing, and Redis Commander for cache management. Each service is carefully configured with specific ports, volumes, and environment variables to ensure smooth integration and development workflow. The environment can be easily started using a custom setup script that handles initialization, database setup, and provides options for managing the development environment. The article concludes with a detailed explanation of the WillowCMS Dockerfile, covering everything from base image selection to service configuration and process management.


Page 2 of 2, showing 5 record(s) out of 11 total