mrhdolek/php-vanilla-boilerplate

php-vanilla-boilerplate

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 0

Open Issues: 2

Language:Nix

Type:project

pkg:composer/mrhdolek/php-vanilla-boilerplate

dev-main 2025-10-30 22:09 UTC

This package is auto-updated.

Last update: 2025-10-30 22:11:43 UTC


README

PHP License

A simple PHP Vanilla Boilerplate for modern web development

Clean, simple, and modern PHP boilerplate with Docker support, testing, and development tools.

Project setup

You can run this project using either Docker (via Make commands) or Nix. Choose the option that best fits your workflow.

🐳 Docker Environment

Prerequisites

  • Docker and Docker Compose
  • Make (for Windows: install from here)

Setup and Usage

Development

If you have problems with permissions please add sudo before make example:

  • sudo make install
  • sudo make start

Mac/Linux

make install
make start

Windows

make install
make start

Address where the environment is available

  • http://localhost:8000

All Docker commands

  • make help - Show all available commands

❄️ Nix Environment

Prerequisites

Setup and Usage

Enter development environment

# Enter the Nix shell (automatically installs all dependencies)
nix-shell

Development workflow with Nix

# Enter Nix shell
nix-shell

# Check PHP version and path
type php
php --version

# Install PHP dependencies
composer install

# Start development server
php -S localhost:8000 -t public/

# Run tests
composer test

# Code quality checks
composer phpstan
composer cs-fix

All commands

  • make help

Running tests

# Run all tests
composer test

Code quality tools

The boilerplate includes several code quality tools:

  • PHPStan - Static analysis tool
  • PHP-CS-Fixer - Code style fixer
  • PHPUnit - Testing framework

Running development server

# Using PHP built-in server
php -S localhost:8000 -t public/

Dependency management

# Install dependencies
composer install

# Update dependencies
composer update

# Add new dependency
composer require vendor/package

# Add development dependency
composer require --dev vendor/package

Documentation

Learn more about the tools used in this boilerplate: