fix: Update composer.json start script target folder during migrations#117
Open
lemmon wants to merge 1 commit intogetkirby:mainfrom
Open
fix: Update composer.json start script target folder during migrations#117lemmon wants to merge 1 commit intogetkirby:mainfrom
lemmon wants to merge 1 commit intogetkirby:mainfrom
Conversation
- Add updateComposerConfig() method to PublicFolder migration - Add updateComposerConfig() method to RootFolder migration - Automatically update PHP built-in server target folder (-t public) flag - Ensures development server works correctly after folder structure migration Fixes issue where migrate:to:public-folder and migrate:to:root-folder didn't update the composer start script's target folder configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where the
migrate:to:public-folderandmigrate:to:root-foldercommands didn't update thecomposer.jsonstart script's target folder configuration for the PHP built-in development server.Problem
When migrating between folder setups:
composer.jsonstart script wasn't updated to include-t publicflag, causing the development server to serve from the wrong directorycomposer.jsonstart script wasn't updated to remove the-t publicflag, causing the development server to fail or serve from the wrong directorySolution
Added
updateComposerConfig()method to both migration classes that:composer.jsonscripts.start-t public) appropriately based on the migration directionlocalhost:8000patternChanges
updateComposerConfig()method toPublicFolderclassupdateComposerConfig()override toRootFolderclasscomposer.jsonexists and contains matching start scriptsTesting
Related
Fixes the issue where
composer startwouldn't work correctly after running migration commands.