Skip to content
yii2-frameworkPublic

About

Docs

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Yii Framework

Yii2 Framework Documentation


Deploy Quality Zizmor

The Definitive Guide to Yii 22.0
Built with Astro Starlight

Documentation

The documentation is deployed at yii2-framework.github.io/docs.

  • Guide - The Definitive Guide to Yii 22.0
  • Internals - Framework internals documentation

Agent skills

The yii2-extensions/skill package owns the twenty framework skills for Yii 22.0 applications. Bootstrap 6 and FilePond own their extension skills in their package repositories. The site imports complete bundles automatically and publishes their index, with source and file checksums.

See installation and sources and the AI guide for Claude Code, Codex, and OpenCode discovery and activation. A passing generated example and a listed skill are separate checks.

Local Development

npm install
npm run dev

The site will be available at http://localhost:4321/docs/.

Build

npm run build
npm run preview

Extension docs

The guides of the extension packages listed in packages.json are synced into src/content/docs/extensions/<name>/ by scripts/sync.mjs. The synced files are build input and are never committed (.gitignore).

npm run sync          # shallow clone of each package at its `ref` into .cache/packages/
npm run sync:local    # use configured `localPath` checkouts; otherwise use the remote ref
npm run test:sync     # self-tests of the sync script

npm run build runs the sync and tools/bin/reference first (prebuild, so PHP and composer install --working-dir tools are needed), so CI clones the packages; SYNC_LOCAL=1 npm run build uses the local checkouts for entries with localPath. The common bundle uses the remote ref in framework-skills.json unless that file configures an available localPath; no adjacent skill checkout is needed by default. The deploy workflow also runs nightly to pick up package changes. A package whose repository does not contain it yet (its composer.json name differs from packagist in the manifest) is skipped with a [sync] skipped <name> warning and left out of the sidebar. node scripts/sync.mjs --strict fails on any skip.

The status of a manifest entry is published (on Packagist), unpublished (not released yet) or template (a GitHub template repository, such as yii2-extensions/template: its landing page links "Use this template" instead of Packagist).

API reference

tools/ is a Composer project (PHP 8.2 or later) that generates the API reference with yii2-apidoc: one Markdown page per type under src/content/docs/api/ (framework, upstream yiisoft/yii2 branch 22.0) and src/content/docs/extensions/<name>/reference/, the catalogs public/reference/<name>.json and the link map .cache/reference/links.json used to turn the guide's [[yii\...]] references into links. All of it is build output (.gitignore).

composer install --working-dir tools
npm run sync && npm run reference   # or `npm run build`, whose prebuild runs both
composer test --working-dir tools   # PHPUnit

The framework is an entry of packages.json with "type": "framework": the sync clones only its framework/ directory (or, with sync:local, exports branch 22.0 of the localPath clone with git archive, without switching its checkout). Gaps of yii2-apidoc worked around in tools/src/ are listed in tools/UPSTREAM.md.

Our social networks

Follow on X

License

License

About

Docs

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages