A Yii2 extension template to create your own Yii2 extensions
PHPUnit, PHPStan, Infection, ECS, and GitHub Actions ready out of the box
composer require github_username/github_repository-name "yiisoft/yii2:^22.0@dev"Describe how to use your extension in a basic way.
use yii\template\Example;
$example = new Example();
$legacy = $example->getExample(true);The guides and the API reference generated from
the PHPDoc in src/ are published at https://yii2-framework.github.io/docs/extensions/template/.
AI agents: read the documentation index and fetch the Markdown version
of a page by appending index.md to its URL. The
AI agents guide covers skill installation, client setup and
verification.
- 🧭
yii2-frameworkskill: Yii 22.0 application conventions.
The hosted documentation covers Yii 22.0. If it does not match the installed revision or is unavailable, use the repository guides, the source PHPDoc and the changelog.