Yii2 Log Viewer (Installer)
This extension installs a Yii2 project template into the currently opened folder and runs one-command setup.
Commands
Yii2 Log Viewer: Install Template Into Current Folder
- Extracts the embedded project template (
resources/template.zip) into the currently opened folder
- Then runs
setup.ps1 from that folder
template.zip includes vendor/ for offline-first install
- Prompts for a full path to
php.exe (recommended)
Yii2 Log Viewer: Install Open Project
- Runs
setup.ps1 from the currently opened project root (no extraction)
- Prompts for a full path to
php.exe (recommended)
Yii2 Log Viewer: Open ADMINS NOTE
- Opens
resources/АДМИНЫ ВАЖНО.txt from the extension
Usage
Fresh install into an empty folder (recommended)
- Create/open an empty folder in VS Code.
- Run:
Ctrl+Shift+P → Yii2 Log Viewer: Install Template Into Current Folder
- When prompted, set PHP path (OSPanel example):
C:\OSPanel\modules\php\PHP_8.1\php.exe
- Wait until setup finishes in the terminal.
Install dependencies + import DB for an existing project
- Open the existing project root in VS Code (the folder containing
composer.json and setup.ps1).
- Run:
Ctrl+Shift+P → Yii2 Log Viewer: Install Open Project
- Provide PHP path when prompted.
Package and install locally
npm i -g @vscode/vsce
cd vscode-yii2-log-viewer-installer
vsce package
Then install generated .vsix in VS Code:
- Extensions panel ->
... -> Install from VSIX...
What setup.ps1 does
- Installs PHP dependencies via Composer (
composer install)
- If
composer is not in PATH, it downloads composer.phar into .tools/ and runs it using the provided php.exe
- Imports the database from
sql/schema.sql
- It can auto-detect
mysql.exe in OSPanel (or use MYSQL_EXE / -MySqlExe when running manually)
Manual run example:
powershell -ExecutionPolicy Bypass -File .\setup.ps1 -PhpExe "C:\OSPanel\modules\php\PHP_8.1\php.exe"
Notes
- Requires PowerShell (Windows)
- Requires PHP (
php.exe) - the extension will ask for the path
- For DB import it uses
mysql.exe (auto-detects common OSPanel paths)
| |