Open
Conversation
- Added a new `Upgrader::isUpgraded` method to determine if the named upgrade has already been completed. - Replaced the direct config access in the Upgrader methods `shouldUpgradeSymbolicLinks` and `shouldUpgradeNginxSitePhpPortOverrides` to use the new `isUpgraded` method. - Refactored `Configuration::updateKey` method to use Laravel's `Arr::set` method to set a value within an array instead of the direct array access. It enables usage of dot notation to easily access deeply nested array keys.
- Added a new `Upgrader::markAsUpgraded` method to mark an upgrade as completed, and add a key into Valet's config. - Replaced the direct config `updateKey` in the Upgrader methods `upgradeSymbolicLinks` and `upgradeNginxSitePhpPortOverrides` to use the new `markAsUpgraded` method.
- Replaced the `shouldUpgradeNginxSitePhpPortOverrides` method call with a direct call to `isUpgraded` method for improved clarity and conciseness. The former method was only a light wrapper around `isUpgraded` method anyway. - Removed the now unused `shouldUpgradeNginxSitePhpPortOverrides` method.
The new format allows for multiple one-time upgrade keys to be stored in an organised manner under the `upgrades` array. This stops valet's config from being polluted with many top-level `*_upgraded` config keys when new one-time upgrades are added in the future. - Changed the `symlinks_upgraded` key to `symlinks`. - Changed the `php_port_overrides_upgraded` key to `nginx_site_php_port_overrides`. - Changed the config `get` and `updateKey` calls in `isUpgraded` and `markAsUpgraded` methods to use dot notation to get/update the specified upgrade key from the new top-level `upgrades`.
- Added `Upgrader::migrateSymlinksUpgradeKey` method to handle the transition from `symlinks_upgraded` to `symlinks`. Note: The `symlinks_upgraded` is the only legacy key that needs to be migrated. The `php_port_overrides_upgraded` key wasn't released in a stable version, so it doesn't need migrating. - Added `Configuration::removeKey` method to remove a specified key from the config.
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.
No description provided.