Skip to content

docs: add Yii 3 page - #2615

Open
KalimeroMK wants to merge 3 commits into
php:mainfrom
KalimeroMK:docs/yii3
Open

docs: add Yii 3 page#2615
KalimeroMK wants to merge 3 commits into
php:mainfrom
KalimeroMK:docs/yii3

Conversation

@KalimeroMK

Copy link
Copy Markdown

Add a documentation page for Yii 3, similar to the existing Laravel and Symfony pages:

  • Running a Yii 3 app with the FrankenPHP Docker image
  • Installing and running locally with a Caddyfile
  • Worker mode via the official yiisoft/yii-runner-frankenphp package, including the watch directive for development, the MAX_REQUESTS environment variable, and a note about resetting stateful services

The examples follow the Yii app template structure (public/ webroot) and the configuration validated in the runner package README.

Closes yiisoft/yii-runner-frankenphp#5

Add a documentation page for running Yii 3 applications with FrankenPHP:
Docker image, local install, and worker mode via yiisoft/yii-runner-frankenphp.

Closes yiisoft/yii-runner-frankenphp#5.
Comment thread docs/yii3.md
Comment on lines +33 to +42
localhost {
# Set the webroot to the public/ directory
root public/
# Enable compression (optional)
encode zstd br gzip
# Execute PHP files from the public/ directory and serve assets
php_server {
try_files {path} index.php
}
}

@AlliBalliBaba AlliBalliBaba Aug 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit more efficient to have the root inside php_server

Suggested change
localhost {
# Set the webroot to the public/ directory
root public/
# Enable compression (optional)
encode zstd br gzip
# Execute PHP files from the public/ directory and serve assets
php_server {
try_files {path} index.php
}
}
localhost {
# Enable compression (optional)
encode zstd br gzip
# Execute PHP files from the public/ directory and serve assets
php_server {
root public/
try_files {path} index.php
}
}

Comment thread docs/yii3.md
Comment on lines +76 to +86
localhost {
root public/
encode zstd br gzip
php_server {
worker {
file ./worker.php
# Reload workers when PHP files change (development only)
watch ./**/*.php
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with Yii, but wouldn't you want to send all request to the worker (via match *)

Suggested change
localhost {
root public/
encode zstd br gzip
php_server {
worker {
file ./worker.php
# Reload workers when PHP files change (development only)
watch ./**/*.php
}
}
}
localhost {
encode zstd br gzip
php_server {
root public/
worker ./worker.php {
# send all requests to the worker
match *
# Reload workers when PHP files change (development only)
watch ./**/*.php
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a page for Yii3 at FrankenPHP docs

3 participants