fix: Update composer.json start script target folder during migrations - #133
Open
distantnative wants to merge 2 commits into
Open
fix: Update composer.json start script target folder during migrations#133distantnative wants to merge 2 commits into
distantnative wants to merge 2 commits into
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.
3 tasks
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.
Review
Description
Both our kits ship
"start": "@php -S localhost:8000 kirby/router.php"in theircomposer.json. The existing commands to migrate to/from public folder setups moved the document root but left that script unchanged. Socomposer startkept serving the old location afterwards.migrate:to:public-folderandmigrate:to:root-foldernow rewrite the start script's document root.The command is matched on its
-S/-tflags rather, so custom hosts and ports,-t public_htmland the reversed flag order are all handled. Both commands share one implementation (RootFolderonly overridesdocumentRoot()to returnnull). Thecomposer.jsonis written only when something actually changed.Changelog
🐛 Bug fixes
migrate:to:public-folderandmigrate:to:root-foldernow update the document root of thestartscript in yourcomposer.json(thx @lemmon)