Commit Graph
46 Commits
Author SHA1 Message Date
Divarion-D 7e5732cdcb chore(psr4): phase 0 — Composer PSR-4 autoloader foundation
Introduce a committed Composer PSR-4 autoloader without changing class
resolution behavior, as the foundation for the incremental PSR-4 migration.

- src/composer.json: PSR-4 (XcVm\ -> ./, M3uParser\, Chrisyue\PhpM3u8\),
  platform php 8.1.33 (deploy runtime), optimize-autoloader/classmap-authoritative
  false (live path resolution, no class-map cache). autoload.files left empty:
  global functions are still loaded by existing require glue; moving them is
  deferred until that glue is removed.
- src/vendor/ + src/composer.lock: committed (deploy path has no Composer);
  generated with 'composer update' from src/. Regenerate with dump-autoload.
- src/bootstrap.php, tests/bootstrap.php: require vendor/autoload.php first,
  then the legacy autoload.php.
- src/autoload.php: drop the igbinary disk cache (enableFileCache/saveCache/
  shutdown handler/root-chown + bottom call); register at the END of the SPL
  queue (prepend=false) so Composer wins for XcVm\* and only still-global
  classes fall through to the in-memory scanner.
- Makefile: add vendor to LB_DIRS so load-balancer archives ship the loader.
- phpstan.dist.neon: exclude src/vendor/* from analysis.
- .gitignore: document that src/vendor/ is intentionally tracked.
- ci.yml: add composer-audit job (no-op until real require deps exist).

Verified: php -l clean; Composer first / XC_Autoloader last in the SPL stack;
tmp/cache/autoload_map no longer written; PHPUnit 292/292; PHPStan no errors.
2026-06-24 19:07:37 +03:00
DanilandGitHub c85914f19f Merge pull request #130 from Vateron-Media/chore/phpstan-ci
Chore/phpstan ci
2026-06-23 22:12:51 +03:00
Divarion-D fa214796ec fix: remove redundant sections from pull request template 2026-06-23 22:11:32 +03:00
Divarion-D 93da607626 ci(phpstan): add static-analysis job with frozen baseline
- .github/workflows/ci.yml: new `phpstan` job (PHP 8.3, no Composer) running
  `make phpstan` on every push/PR.
- phpstan.dist.neon: include phpstan-baseline.neon so the gate is green on the
  ~446 pre-existing (mostly false-positive/cosmetic) findings and fails only on
  NEW issues. Shrink the baseline over time via `make phpstan-baseline`.
2026-06-23 22:05:42 +03:00
Divarion-D 2243f4572c docs: update PHP conventions for strict types and namespaces 2026-06-22 10:51:45 +03:00
DanilandGitHub 413dec24d2 Merge pull request #124 from Vateron-Media/dependabot/github_actions/softprops/action-gh-release-3
ci: bump softprops/action-gh-release from 2 to 3
2026-06-21 22:30:48 +03:00
Divarion-D e474500978 ci: enhance Semgrep security scan with baseline commit resolution 2026-06-21 22:30:09 +03:00
DanilandGitHub 881c9b9ffb Merge pull request #123 from Vateron-Media/dependabot/github_actions/actions/checkout-7
ci: bump actions/checkout from 6 to 7
2026-06-21 22:28:41 +03:00
dependabot[bot]andGitHub 38f1be67bb ci: bump actions/upload-artifact from 4 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-21 19:17:51 +00:00
dependabot[bot]andGitHub 7cb361d692 ci: bump softprops/action-gh-release from 2 to 3
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-21 19:17:49 +00:00
dependabot[bot]andGitHub 9dff052fbd ci: bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-21 19:17:46 +00:00
Divarion-D 484a758ca0 chore: add Git LFS tracking, CODEOWNERS, SECURITY.md, and CI workflows 2026-06-21 22:11:49 +03:00
Divarion-D 48912339ed chore: removing outdated agents from the repository 2026-06-15 18:12:59 +03:00
Divarion-D 8ea44d0f81 refactor: remove deprecated variables and update documentation in bootstrap files 2026-06-12 13:37:28 +03:00
Divarion-D 6f1562e2df docs(commit-message): add commit message format and guidelines 2026-05-01 18:09:14 +03:00
Divarion-DandCopilot 1f3ebb3b35 refactor(routing): migrate table route from AdminTableController to TableController
Removes legacy src/public/Views/admin/table.php (6062 lines).
Updates admin route to point directly to TableController::index().
Fixes server tools modal buttons overflow (input→button).

Ref: MIGRATION.md L-3R

Co-authored-by: Copilot <copilot@github.com>
2026-05-01 18:08:49 +03:00
Divarion-D 44d312a997 feat(security-scan): add gate job to control scan execution based on commit count 2026-04-21 14:57:02 +03:00
Divarion-D cd2d3899ce docs(copilot): add behavioral guidelines to reduce common LLM coding mistakes 2026-04-17 17:12:52 +03:00
Divarion-D 45782b24b8 docs(instructions): fix stale paths and nginx scope patterns 2026-04-17 15:59:08 +03:00
Divarion-D 531be6e9e0 docs(build): sync LB/update docs with current Makefile and updater 2026-04-17 15:58:36 +03:00
Divarion-D d9bbd6c35b build: unify install and update into a single archive
Replace separate install/update build targets with a single archive that
serves both purposes. The update script (src/update) now extracts to a
temp directory, removes excluded dirs (binaries, config, user data), and
copies remaining files over the live installation.

Changes:
- Remove main_update, lb_update, lb_update_copy_files,
  main_update_copy_files Makefile targets and UPDATE_EXCLUDE_DIRS var
- Move exclude dirs list into src/update (Python) where filtering
  actually happens at runtime
- Rewrite doUpdate() to use tempdir extraction with try/finally cleanup
- Make delete_files_list/lb_delete_files_list gracefully skip when
  LAST_TAG is empty (warn instead of error)
- Simplify CI workflows: one make command per variant instead of
  conditional install + update steps
- Add ARCHITECTURE.md §5.5 documenting update flow
- Update en/ru docs: update-system.md, updates_checklist.md
- Update makefile-build.instructions.md with new targets
2026-04-12 17:38:35 +03:00
Divarion-D 819be1e24a fix(issue-templates): update issue links to point to the correct repository 2026-04-06 21:09:09 +03:00
Divarion-D 296e0b77c5 fix(issue-templates): change version field from dropdown to input for better flexibility 2026-04-06 21:03:50 +03:00
Divarion-D e02c59bca4 docs(templates): overhaul all GitHub issue templates
bug_report.yml:
- Add required version dropdown (XC_VM 2.0.1/2.0.0/1.x)
- Add steps to reproduce (was completely missing)
- Add expected vs actual behavior fields
- Add build type (MAIN/LoadBalancer)
- Add severity and affected area dropdowns
- Add environment info section
- Fix misnamed howtoreplicate field

security.yml:
- Add public disclosure warning with link to GH Security Advisories
- Add required version dropdown (multi-select)
- Add severity classification (CVSS-like)
- Add affected component dropdown
- Add suggested fix field
- Replace misleading confidentiality checkbox

feature_request.yml:
- Add affected area dropdown for triage
- Add alternatives considered field
- Improve field descriptions

other.yml:
- Add category dropdown (question/config/performance/etc)
- Add optional version field

config.yml (new):
- Disable blank issues
- Add private security advisory link
- Add documentation link
2026-04-06 21:01:08 +03:00
Divarion-D 3bbb0865ff feat(workflows): enhance release notifier with inputs for tag and release names 2026-03-17 21:32:55 +03:00
Divarion-D 2478ba612a fix(build): update git diff commands to exclude renames 2026-03-17 21:21:20 +03:00
Divarion-D 006584ffac chore: update actions/checkout to v6 in build and pre-release workflows 2026-03-15 19:32:14 +03:00
Divarion-D cb8e49f238 chore: remove duplicate files entry in release asset upload step 2026-03-15 19:25:52 +03:00
Divarion-D e483098447 chore: enhance workflows to support manual dispatch and dynamic tag resolution 2026-03-15 19:21:21 +03:00
Divarion-D a263a30187 chore: update pre-release workflow to build assets and remove manual inputs 2026-03-15 18:49:20 +03:00
Divarion-D 327c8dc161 ci: automate release asset builds via GitHub Actions 2026-03-15 18:45:19 +03:00
Divarion-D 518993bb66 ci: extract PHP syntax check into reusable script
- Add tools/php_syntax_check.sh (supports full scan + single-file mode)
- CI workflow now calls the shared script
- All 6 agents updated to reference the script
- CONTRIBUTING.md: add Pre-Commit Checks section
- Exclude src/bin/* (third-party stubs) from lint
2026-03-15 13:49:18 +03:00
Divarion-D e4e0fb7eb7 ci: upgrade actions to Node.js 24-compatible versions
- actions/checkout@v4 -> @v5 (Node 24 since v5.0.0)
- github/codeql-action/upload-sarif@v3 -> @v4
- softprops/action-gh-release@v1 -> @v2
- shivammathur/setup-php@v2 stays (no v3 released yet)
2026-03-15 12:41:13 +03:00
Divarion-D 1369b8fd20 ci: add security scan workflow with PHP syntax check and Semgrep
New GitHub Actions workflow that runs on push/PR to main and weekly:

1. PHP Syntax Check: validates all src/*.php files with php -l
2. Semgrep Security Scan: runs php, security-audit, command-injection,
   sql-injection, and xss rule packs against src/

SARIF results are uploaded to GitHub Code Scanning.
2026-03-15 12:28:34 +03:00
Divarion-D 038a7de356 feat: Migrate legacy CLI scripts to console.php and extract streaming middleware
CLI consolidation:
- Delete 13 legacy CLI scripts from includes/cli/ (ondemand, proxy, queue, record, scanner, signals, startup, thumbnail, tools, update, watchdog, plex_item, watch_item)
- Convert status and tools entry points to thin proxies that delegate to console.php
- Update all shell_exec() calls across admin controllers, views, and API layer to use console.php command syntax instead of direct CLI file paths
- Update src/service to launch daemons via console.php (signals, watchdog, queue, cache_handler, startup)
- Update Python src/update script to call console.php update instead of includes/cli/update.php
- Update test_installer to use console.php startup

Streaming deduplication:
- Extract StreamAuthMiddleware — common response headers and token decryption shared by live/vod/timeshift
- Extract ShutdownHandler — unified shutdown logic replacing 3 duplicate function shutdown() blocks
- Refactor live.php, vod.php, timeshift.php to use new middleware classes
- Add streaming micro-router to www/stream/index.php as fallback entry point

Routing fixes:
- Fix admin index.php redirect to use relative path (supports access code prefixes)
- Add access code root redirect in public/index.php to prevent broken CSS/JS asset resolution
- Fix init.php for CLI compatibility: guard $_SERVER access, define PHP_ERRORS safely

Migrations:
- 001_update_crontab_filenames.sql — strip .php suffix from crontab filenames
- Fix cache.php view query to match new filename format (cache_engine instead of cache_engine.php)
2026-03-14 23:57:33 +03:00
Divarion-D 02a0a915f7 New agents and instructions for AI have been added 2026-03-09 17:31:12 +03:00
Divarion-D e18c507098 Moved player to public/Views/player 2026-03-09 17:29:46 +03:00
Divarion-D ce30971af1 Moved reseler to public/Views/reseler 2026-03-08 22:13:35 +03:00
Divarion-D 981de7f750 Steps 4 and 5 are complete. 2026-02-22 15:02:41 +03:00
Divarion-D 279a10b4c5 Update Top Contributors 2025-12-03 21:50:32 +03:00
Divarion-D b4dbecebf3 Added auto editing of Top Contributors 2025-12-03 21:42:41 +03:00
Divarion-D cd637c9dde Fixed workflow 2025-12-03 18:26:27 +03:00
DanilandGitHub c09125d9c3 Added suport pre-release in Github Action 2025-11-20 19:46:16 +03:00
DanilandGitHub 9854fca0af Create build_pre-release.yml 2025-11-19 22:30:15 +03:00
Divarion-D cce768e39f Update release notifier 2025-09-30 19:38:07 +03:00
Divarion-D a214ef4754 add issue templates and add release notifier 2025-07-10 20:48:38 +03:00