Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ModuleGenerator Command to Unwrap Template Files for Better Maintainability #191

Open
armanist opened this issue Feb 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@armanist
Copy link
Member

armanist commented Feb 8, 2025

The ModuleGenerator command currently generates modules from templates, where the templates are structured as folders containing various PHP files (controllers, middlewares, HTMLs, etc.). These files are wrapped into strings with a return statement, which makes them difficult to read and maintain, especially for larger files like controllers.

  1. Refactor the ModuleGenerator command to unwrap the PHP files from strings and store them as regular PHP files.
  2. Ensure that the process involves copying the template files as-is, preserving the folder structure.
  3. Implement a function where any required dynamic replacements (e.g., variables or values) are performed at the copy time using placeholders.
@armanist armanist added the enhancement New feature or request label Feb 8, 2025
@armanist armanist linked a pull request Feb 8, 2025 that will close this issue
@armanist armanist added this to the Big Refactoring milestone Feb 14, 2025
@armanist armanist removed a link to a pull request Feb 15, 2025
@armanist armanist added the bug Something isn't working label Feb 15, 2025
@armanist armanist reopened this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants