mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-06 12:02:32 +02:00
Structure:
- Split development/ (20 files) into development/ (framework reference) and guides/ (how-to)
- Moved 13 how-to files into new guides/ category (auth, cli, error-handling, etc.)
- Moved navbar-rendering.md from system/ into development/
- Deleted empty system/README.md files
- Deleted documentation_gaps.md (all gaps resolved) and redundant info/update.md
Sidebar / navbar:
- Removed all emojis from _sidebar.md (EN + RU) — fixes tree hierarchy rendering
- Removed flag emojis from _navbar.md language switcher
- Removed duplicate entries from the old "System Documentation" section
- Renamed section headers: "Development" -> "Framework Reference" + "Developer Guides"
Content fixes (modules.md EN + RU):
- Updated "Class naming" section: now documents XcVm\Module\{Pascal} namespaces
(was "global PHP namespace — Until PHP namespaces are introduced")
- Updated main module class example to use namespace declaration + use statements
- Updated class naming in ModuleLoader description to FQN
- Replaced installCrontab() manual crontab instruction with getCronEntries() API
- Updated enable/disable section: added ModuleState enum table, updated config examples
- Fixed FAQ answer for disabling a module
Content fixes (bootstrap-contexts.md EN + RU):
- Replaced CONTEXT_* string constants with BootContext enum cases throughout
- Updated boot() signature: string $context -> BootContext $context
- Updated getContext() return type: ?string -> ?BootContext
New framework reference docs (EN + RU):
- docs/{en,ru}/development/event-system.md: EventDispatcher singleton bridge,
#[ListensTo] attribute, getEventSubscribers() array API, stoppable events,
built-in event catalog, custom event authoring, ListensTo attribute reference
- docs/{en,ru}/development/exception-hierarchy.md: full XcVmException tree,
container vs module subtrees, PSR-11 compliance notes, catch-by-subsystem examples
3.5 KiB
3.5 KiB
Рабочий процесс разработки
Деплой кода на VDS через SFTP
Для ежедневной разработки рекомендуем расширение SFTP для VS Code — редактируете локально, файлы автоматически загружаются при сохранении.
Настройка
Создайте .vscode/sftp.json:
[
{
"name": "My Dev VDS",
"host": "IP_ВАШЕГО_VDS",
"protocol": "sftp",
"port": 22,
"username": "root",
"remotePath": "/home/xc_vm",
"useTempFile": false,
"uploadOnSave": true,
"openSsh": false,
"watcher": {
"files": "**/*",
"autoUpload": false,
"autoDelete": true
},
"ignore": [
".vscode",
".git",
".gitattributes",
".gitignore",
"update",
"*pycache/",
"*.gitkeep",
"bin/",
"config/",
"tmp/"
],
"context": "./src/",
"profiles": {}
},
{
"name": "My Dev VDS Tests",
"host": "IP_ВАШЕГО_VDS",
"protocol": "sftp",
"port": 22,
"username": "root",
"remotePath": "/home/xc_vm/tests",
"useTempFile": false,
"uploadOnSave": true,
"openSsh": false,
"watcher": {
"files": "**/*",
"autoUpload": false,
"autoDelete": true
},
"ignore": [
".vscode",
".git",
".gitattributes",
".gitignore",
"tmp/",
".cache/"
],
"context": "./tests/",
"profiles": {}
}
]
Ключевые настройки
context: "./src/"— маппит локальнуюsrc/на удалённую/home/xc_vm/context: "./tests/"— маппит локальнуюtests/на удалённую/home/xc_vm/tests/uploadOnSave: true— каждый Ctrl+S мгновенно загружает файл на VDSignore— защищает серверо-специфичные файлы (bin/,config/,tmp/)
Безопасность: Используйте SSH-ключи вместо пароля. Директория
.vscode/находится в.gitignore, поэтому креды не попадут в git.
Как синхронить папку tests
- Добавьте второй SFTP entry с
context: "./tests/"иremotePath: "/home/xc_vm/tests". - Сохраняйте файлы внутри
tests/локально. - Расширение будет загружать их отдельно от
src/прямо в/home/xc_vm/tests. - Это нужно, потому что тесты не лежат внутри
src/и не попадут на сервер через основной entry.
Рабочий процесс
- Открываете проект в VS Code
- Редактируете любой файл в
src/ - Если пишете тест, редактируете файл в
tests/ - Сохраняете — соответствующий entry автоматически загружает файл на VDS
- Запускаете нужный тест на VDS
- Коммитите в git как обычно