Skip to content

Fix: Refactor folder structure for consistency with dynamix plugins#76

Open
mstrhakr wants to merge 2 commits intodevfrom
fix/refactor-folder-structure
Open

Fix: Refactor folder structure for consistency with dynamix plugins#76
mstrhakr wants to merge 2 commits intodevfrom
fix/refactor-folder-structure

Conversation

@mstrhakr
Copy link
Copy Markdown
Owner

@mstrhakr mstrhakr commented Mar 30, 2026

Pull request summary

Update all require_once, include, URL, and asset references to use the new directory names (include/ instead of php/, sheets/ instead of styles/) and PascalCase filenames.

Files updated:

  • 14 PHP source files (require_once paths)
  • 4 .page files (asset hrefs and include paths)
  • 1 JS file (AJAX endpoint URLs)
  • 1 shell script (inline PHP paths)
  • 1 CSS file (comment reference)
  • 3 build/test configs (phpstan, phpunit, bootstrap)
  • 19 test files (include paths and docblock comments)
  • 1 framework example test (asset path)

What changed:

  • Refactored plugin path structure:
    • source/compose.manager/php/source/compose.manager/include/
    • source/compose.manager/styles/source/compose.manager/sheets/
  • Renamed main PHP modules to PascalCase:
    • compose_manager_main.phpComposeManager.php
    • compose_list.phpComposeList.php
    • compose_util.phpComposeUtil.php
    • compose_util_functions.phpHelpers.php
    • exec.phpExec.php
    • exec_functions.phpExecHelpers.php
    • others in include/ similarly
  • Updated all references in .page template files to new assets and include URL paths
  • Updated AJAX routes in source/compose.manager/javascript/common.js
  • Updated shell script references in source/compose.manager/scripts/backup_cron.sh
  • Built test harness compatibility:
    • phpstan.neon
    • phpunit.xml
    • tests/bootstrap.php (PluginBootstrap::init path/subPath)
  • Updated unit tests and framework tests path references and comments
  • test.ps1 execution passes with PHPUnit, PHPStan, Bats (skipped tests are known and unrelated to this refactor)

Related issues
Closes # (if applicable)

Checklist

  • I have added/updated tests where applicable
  • I have updated documentation (docs/, README, or plugin docs)
  • Linted/formatted the code
  • Verified on Unraid or CI

Testing notes
Run locally from repo root:

  1. pwsh -NoProfile -ExecutionPolicy Bypass -File test.ps1
  2. php vendor/bin/phpunit --configuration phpunit.xml
  3. php vendor/bin/phpstan analyse --memory-limit=512M
  4. bash tests/framework/bin/run-bats.sh tests/unit
  5. verify no compose.manager/php or compose.manager/styles references:
    • grep -R "compose.manager/php" source/compose.manager
    • grep -R "compose.manager/styles" source/compose.manager

Notes

  • No migration for user data required: this is internal path refactor.
  • Backward compatibility:
    • plugin_root path remains /usr/local/emhttp/plugins/compose.manager/
    • old php/ and styles/ plugin URLs are intentionally replaced,
    • if a helper or external integration still hits old path, user upgrade script should update accordingly before release (i.e. shim or redirect in plugin patch if needed).
  • Skipped tests are in BackupFunctions and expected by environment on a Windows CI host.

…ase files

Align compose.manager directory layout with dynamix.docker.manager conventions:
- php/ -> include/ (matches dynamix include/ pattern)
- styles/ -> sheets/ (matches dynamix sheets/ pattern)
- All PHP files renamed to PascalCase
- All CSS files renamed to PascalCase

Path references not yet updated - next commit.
Update all require_once, include, URL, and asset references to use the
new directory names (include/ instead of php/, sheets/ instead of styles/)
and PascalCase filenames.

Files updated:
- 14 PHP source files (require_once paths)
- 4 .page files (asset hrefs and include paths)
- 1 JS file (AJAX endpoint URLs)
- 1 shell script (inline PHP paths)
- 1 CSS file (comment reference)
- 3 build/test configs (phpstan, phpunit, bootstrap)
- 19 test files (include paths and docblock comments)
- 1 framework example test (asset path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant