You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/digging-deeper/updating-hyde.md
+42-56Lines changed: 42 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,83 +33,49 @@ it is still possible that some edge cases slip through. This means that a bug fi
33
33
34
34
Obligatory related XKCD: [https://xkcd.com/1172](https://xkcd.com/1172)
35
35
36
+
### Before you start
36
37
37
-
## Methods
38
+
Before you perform an update, please make sure you have a backup of your project.
39
+
Using Git is highly recommended as it allows you to easily roll back changes if something goes wrong.
38
40
39
-
### Which method?
41
+
##Update to a major version
40
42
41
-
Depending on how you installed Hyde, there are a few different ways to update it.
43
+
When updating to a major version, you should read the release notes and the upgrade guide for that version.
44
+
If you are updating multiple major versions at once, it's recommended to update one major version at a time,
45
+
following the upgrade guide for each version. After following the upgrade guide, you can follow the post-update instructions below.
42
46
43
-
We have a few methods documented here. The [Git method](#using-git) is recommended as it is the easiest and safest way to
44
-
update your project. If you are not using Git, you can still update your project using any of the [manual methods](#manual-update).
47
+
## Updating to a minor or patch version
45
48
46
-
Regardless of the method you use, make sure you follow the [post-update instructions](#post-update-instructions) at the end.
47
-
48
-
### Updating just the Framework
49
-
50
-
If you just want to update the framework patch version, you can do so by running the following command:
49
+
Updating a minor or patch version is easy using Composer. Just run the following command:
51
50
52
51
```bash
53
-
composer update hyde/framework
52
+
composer update hyde/* --with-dependencies
54
53
```
55
54
56
-
While the same can still be done for minor versions, it's best to also update your project scaffolding and resources to
57
-
ensure that everything is up to date, for which you should use the methods below.
58
-
59
-
### Using Git
55
+
Note that if you have hardcoded a version constraint in your `composer.json` file, you may need to update it manually.
56
+
You can always refer to the `composer.json` file in the HydePHP repository if you need a reference.
60
57
61
-
First, make sure you have a remote set up for the base project repository.
git merge hyde/master # OR: Replace 'master' with the version tag you want to update to
72
68
73
-
After this, you should update your composer dependencies:
69
+
# Take care of any merge conflicts that arise, then install the updated dependencies
74
70
75
-
```bash
76
71
composer update
77
72
```
78
73
79
-
Next, follow the post-update instructions.
80
-
81
-
### Manual Update
82
-
83
-
If you are not using Git, you can still update your project. This is a bit more involved, but it is still possible.
84
-
85
-
1. First, you will need to download the latest release archive from the [releases page](https://github.com/hydephp/hyde/releases).
86
-
2. Then extract the archive, and copy the contents into your project directory.
87
-
88
-
Since this may overwrite modified files, it may be safer to use the [hard update](#hard-update) method.
89
-
90
-
### Hard Update
74
+
### Hard update using release archive
91
75
92
-
If you are having trouble updating your project, you can try a hard update. In short, this approach consists of creating
93
-
a brand new project and copying over only your source and resource files. If you do not want to use Git, this may be
94
-
the safest option as you won't be overriding any of your existing files.
76
+
An alternate way to update your project is to essentially do a hard reset. This is only recommended if you haven't done many modifications to the HydePHP files.
95
77
96
-
If you have changed any other files, for example in the App directory, you will need to update those files manually as well.
97
-
The same goes if you have created any custom Blade components or have modified Hyde ones.
98
-
99
-
**Here is an example CLI workflow, but you can do the same using a graphical file manager.**
Next, follow the post-update instructions. After verifying that everything is working, you can delete the old project directory.
78
+
Essentially: Download the [latest release](https://github.com/hydephp/hyde/releases/latest) from GitHub, extract it to a new project directory, then copy over your source files and install the dependencies.
You may also want to download any resources that have been updated. You download these from the Zip file of the latest release on GitHub.
106
+
107
+
The latest release can always be found at https://github.com/hydephp/hyde/releases/latest, where you can download the source code as a `zip` file under the "Assets" section.
108
+
109
+
Here are the paths you may be interested in copying over: (Using Git will help a ton here as it can show you diffs of changed files, and allow you to easily merge own changes)
110
+
111
+
```
112
+
├── app
113
+
│ ├── Providers
114
+
│ │ └── AppServiceProvider.php
115
+
│ ├── bootstrap.php
116
+
│ ├── config.php
117
+
│ └── storage/
118
+
├── composer.json
119
+
├── package.json
120
+
├── resources/
121
+
├── tailwind.config.js
122
+
└── webpack.mix.js
123
+
```
124
+
139
125
Next, recompile your assets, if you are not using the built-in assets.
0 commit comments