mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-13 12:02:54 +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
2.6 KiB
2.6 KiB
Development Workflow
Deploying Code to VDS via SFTP
For daily development, we recommend the SFTP extension for VS Code — edit locally, auto-upload on save.
Setup
Create .vscode/sftp.json:
[
{
"name": "My Dev VDS",
"host": "YOUR_VDS_IP",
"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": "YOUR_VDS_IP",
"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": {}
}
]
Key Settings
context: "./src/"— maps localsrc/to remote/home/xc_vm/context: "./tests/"— maps localtests/to remote/home/xc_vm/tests/uploadOnSave: true— every Ctrl+S pushes the file to VDS instantlyignore— protects server-specific files (bin/,config/,tmp/)
Security: Use SSH keys instead of password. The
.vscode/directory is in.gitignore, so credentials won't leak to git.
How to sync the tests folder
- Add a second SFTP entry with
context: "./tests/"andremotePath: "/home/xc_vm/tests". - Save files under
tests/locally. - The extension will upload them separately from
src/into/home/xc_vm/tests. - This is required because tests are stored outside
src/and will not be uploaded by the main entry.
Workflow
- Open project in VS Code
- Edit any file under
src/ - If you add a test, edit the file under
tests/ - Save — the matching SFTP entry uploads the file to VDS
- Run the relevant test on VDS
- Commit to git as usual