Project Overview
The PHP Deployment Kit is a "Force Multiplier" for PHP developers. Built on the rock-solid foundation of Deployer, it provides a set of highly optimized, reusable recipes that handle the heavy lifting of modern PHP deployments. Whether you're maintaining a legacy Yii1 application or scaling a high-traffic Laravel platform, this kit ensures consistency, safety, and speed.
The Challenge
In my career as a Senior IT Consultant, I found myself constantly rewriting the same custom tasks—asset mapping, environment decryption, sitemap generation, and font verification—across dozens of different PHP projects. Each project required a slightly different deploy.php configuration, leading to technical debt and wasted development time.
The Solution
I engineered a universal deployment abstraction layer. The PHP Deployment Kit encapsulates these "best practice" tasks into a single composer package. It introduces smart detection to automatically apply the right recipe (Laravel, Yii2, or Simple PHP) while remaining highly configurable for unique edge cases.
Key Innovation & Features
- 🚀 Zero-Config Defaults: Intelligent detection of project structures (Laravel, Yii2, Simple PHP) with zero boilerplate.
- 🔑 Laravel Env Encryption: Native support for
LARAVEL_ENV_ENCRYPTION_KEY, decrypting environment files securely during the build. - 🗺️ Smart Asset Mapping: The
AssetMappingTaskautomatically reconciles Vite and Mix manifests for database-driven URL compatibility. - 🖼️ Post-Deployment Automation: Integrated tasks for image compression, sitemap generation, and font accessibility verification.
- 🕒 Metrics & Timing: Precision telemetry to track deployment durations and optimize server performance.
- 🎛️ Hybrid Workflow: Supports both interactive prompted sessions and fully automated unattended CI/CD runs.
Tech Specs & Installation
composer require klytron/php-deployment-kit
Check our blogs for more information on how to implement it: How I Finally Conquered Deployment Hell: The PHP Deployment Kit