Skip to content

Commit bd2f8da

Browse files
committed
feat: add upgrade doc
1 parent a4219ee commit bd2f8da

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

UPGRADE-1.0.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Upgrade Symfony Health Check Bundle V1.0.0
2+
=================================
3+
4+
Step 1: Update the Symfony Health Check Bundle via Composer
5+
----------------------------------
6+
```console
7+
$ "macpaw/symfony-health-check-bundle": "^v1.0.0"
8+
```
9+
10+
### Next, use Composer to download new versions of the libraries:
11+
```console
12+
$ composer update "macpaw/symfony-health-check-bundle"
13+
```
14+
15+
###Dependency Errors
16+
17+
If you get a dependency error, it may mean that you also need to upgrade other libraries that are dependencies of the libraries. To allow that, pass the --with-all-dependencies flag:
18+
```console
19+
$ composer update "macpaw/symfony-health-check-bundle" -with-all-dependencies
20+
```
21+
22+
Step 2: Update the Symfony Health Check Bundle via Composer
23+
----------------------------------
24+
25+
##Automatical:
26+
Over time - and especially when you upgrade to a new version of a library - an updated version of the recipe may be available. These updates are usually minor - e.g. new comments in a configuration file - but it's a good idea to keep your files in sync with the recipes.
27+
28+
Symfony Flex provides several commands to help upgrade your recipes. Be sure to commit any unrelated changes you're working on before starting:
29+
30+
```console
31+
$ composer recipes
32+
33+
34+
$ composer recipes symfony/framework-bundle
35+
36+
37+
$ composer recipes:install symfony/framework-bundle --force -v
38+
```
39+
40+
The tricky part of this process is that the recipe "update" does not perform any intelligent "upgrading" of your code. Instead, the updates process re-installs the latest version of the recipe which means that your custom code will be overridden completely. After updating a recipe, you need to carefully choose which changes you want, and undo the rest.
41+
42+
##Manual:
43+
44+
### Old Config:
45+
`config/packages/symfony_health_check.yaml`
46+
```yaml
47+
symfony_health_check:
48+
health_checks:
49+
- id: symfony_health_check.doctrine_check
50+
```
51+
52+
### New Config:
53+
```yaml
54+
symfony_health_check:
55+
health_checks:
56+
- id: symfony_health_check.doctrine_check
57+
ping_checks:
58+
- id: symfony_health_check.status_up_check
59+
```
60+
61+
Security Optional:
62+
----------------------------------
63+
`config/packages/security.yaml`
64+
65+
### Old Config:
66+
```yaml
67+
firewalls:
68+
healthcheck:
69+
pattern: ^/health
70+
security: false
71+
```
72+
73+
### New Config:
74+
```yaml
75+
firewalls:
76+
healthcheck:
77+
pattern: ^/health
78+
security: false
79+
ping:
80+
pattern: ^/ping
81+
security: false
82+
```
83+

0 commit comments

Comments
 (0)