Back to Templates
PHP
PHP Starter with Composer, PHPStan & Docker
PHP project with Composer dependencies
terminal
npx setupkaro init my-app --template phpZero installNo telemetryMIT License
What's Included
- PHP 8.2+ with Composer 2
- PHPStan (level 5) for static analysis
- PHP-CS-Fixer for code formatting
- PHPUnit for testing
- GitHub Actions: cs-fixer, phpstan, phpunit, build
- Dockerfile (PHP 8.3 CLI) + docker-compose.yml
- composer.json with scripts for all tools
- Generated README with commands and project structure
Generated Folder Structure
src/tests/.github/workflows/ci.ymlDockerfiledocker-compose.ymlcomposer.jsonphpstan.neon.php-cs-fixer.phpphpunit.xmlREADME.md
Quick Start Commands
Generate Project
terminal
npx setupkaro init my-app --template phpNext Steps
cd my-app
composer install
Frequently Asked Questions
- Is this for a library or an application?
- It's a minimal PHP project structure suitable for both. Add your entry point (public/index.php for web, bin/console for CLI) after generation.
- Does it include a framework (Symfony, Laravel)?
- No — this is a plain PHP template. Use the `laravel` template for Laravel, or add Symfony components after generation.
- What about autoloading?
- PSR-4 autoloading is configured in composer.json (src/ -> App\\). Run `composer dump-autoload` after adding classes.
Generate Another Template
React + TypeScript
Vite + React + TS with Tailwind and React Router
terminal
npx setupkaro init my-app --template react-tsReplace my-app with your project name.
Ready to generate your PHP project?
One command. Production-ready. Start building in seconds.
terminal
npx setupkaro init my-app --template php