Skip to content

Enhance Laravel project creation and update version handling - #749

Draft
TanNhatCMS wants to merge 5 commits into
xpf0000:masterfrom
TanNhatCMS:feat/update-create-project-laravel
Draft

Enhance Laravel project creation and update version handling#749
TanNhatCMS wants to merge 5 commits into
xpf0000:masterfrom
TanNhatCMS:feat/update-create-project-laravel

Conversation

@TanNhatCMS

@TanNhatCMS TanNhatCMS commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements and refactors to the PHP project creation flow in both the main and Windows-specific Vue components. The main goals are to support custom project directory names, improve PHP version compatibility handling, and enhance the user interface for project creation. Below are the most important changes:

Project Directory and Naming Enhancements

  • Added a projectName field to the project creation UI, allowing users to specify a custom directory name for new projects. All logic for file creation and command execution now uses this name, ensuring each project is created in its own directory. [1] [2] [3] [4] [5] [6] [7] [8]

Framework and PHP Version Compatibility

  • Improved PHP version selection: The UI now disables incompatible PHP versions based on the selected framework version's requirements. This prevents users from selecting a PHP version that doesn't meet the framework's minimum requirement. [1] [2]
  • Automatically resets the selected PHP version if it becomes incompatible when the framework version changes. [1] [2]

User Interface Improvements

  • Refactored the order and labels of the form fields for clarity (e.g., "Framework Version" and "Project Name" now appear before PHP and Composer version selection). [1] [2]
  • The "Create" button is now only enabled when all required fields (directory, framework version, project name) are filled. [1] [2]

Command and File Generation Logic

  • For Laravel projects with the latest version (*), added logic to use the global Laravel installer instead of composer create-project, improving compatibility with Laravel's recommended installation method. [1] [2]
  • Updated all file and directory operations to respect the new project name, ensuring that configuration files and web roots are placed in the correct locations. [1] [2] [3] [4] [5] [6]

Bug Fixes and Refactoring

  • Fixed a typo in the directory name from flyenv-create-project to flyenv-created-project for consistency. [1] [2]

These changes collectively provide a more robust and user-friendly experience for creating PHP projects, with better validation and compatibility handling.

Update the project handler to look for `flyenv-created-project` instead of the old temporary directory name so newly created projects can be found correctly.
Each Laravel version entry now includes a `php` field specifying the minimum/compatible PHP version constraint, matching Laravel's official requirements.
Adds a `name` field to the `ProjectPHPForm` type and initializes it with the default value `'flyenv-created-project'`, including a reset to that default in `phpFormInit()`.
Refactors PHP project setup UI on both macOS/Linux and Windows to select framework version first, require a project name, and show framework labels with PHP constraints. Adds PHP-version compatibility filtering by selected framework, defaults project name from framework type, and updates create logic to scaffold inside a named subdirectory. Also adds Laravel latest (`*`) installer flow support and updates generated Nginx document roots/rewrite paths to include the project-name folder.
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