Skip to content

Commit 7567fe4

Browse files
authored
Merge pull request #18810 from alebcay/deprecate-disable-replacement-docs
docs: mention optional replacement parameter for deprecate/disable
2 parents cf75c48 + c5070e2 commit 7567fe4

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

docs/Deprecating-Disabling-and-Removing-Casks.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ The `date` parameter should be set to the date that the deprecation period shoul
3535

3636
The `because` parameter can be a preset reason (using a symbol) or a custom reason. See the [Deprecate and Disable Reasons](#deprecate-and-disable-reasons) section below for more details about the `because` parameter.
3737

38+
An optional `replacement` parameter may also be specified to suggest a replacement formula or cask to the user. The value of the parameter is a string.
39+
40+
```ruby
41+
deprecate! date: "YYYY-MM-DD", because: :reason, replacement: "foo"
42+
```
43+
3844
## Disabling
3945

4046
If a user attempts to install a disabled cask, they will be shown an error message and the install will fail.
@@ -62,6 +68,12 @@ The `date` parameter should be set to the date that the reason for disabling cam
6268

6369
The `because` parameter can be a preset reason (using a symbol) or a custom reason. See the [Deprecate and Disable Reasons](#deprecate-and-disable-reasons) section below for more details about the `because` parameter.
6470

71+
Similar to deprecated casks, an optional `replacement` parameter may also be specified for disabled casks to suggest a replacement formula or cask to the user. The value of the parameter is a string.
72+
73+
```ruby
74+
disable! date: "YYYY-MM-DD", because: :reason, replacement: "foo"
75+
```
76+
6577
## Removal
6678

6779
A cask should be removed if it does not meet our criteria for [acceptable casks](Acceptable-Casks.md) or has been disabled for over a year.

docs/Deprecating-Disabling-and-Removing-Formulae.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ The `date` parameter should be set to the date that the deprecation period shoul
3737

3838
The `because` parameter can be a preset reason (using a symbol) or a custom reason. See the [Deprecate and Disable Reasons](#deprecate-and-disable-reasons) section below for more details about the `because` parameter.
3939

40+
An optional `replacement` parameter may also be specified to suggest a replacement formula or cask to the user. The value of the parameter is a string.
41+
42+
```ruby
43+
deprecate! date: "YYYY-MM-DD", because: :reason, replacement: "foo"
44+
```
45+
4046
## Disabling
4147

4248
If a user attempts to install a disabled formula, they will be shown an error message and the install will fail.
@@ -64,6 +70,12 @@ The `date` parameter should be set to the date that the reason for disabling cam
6470

6571
The `because` parameter can be a preset reason (using a symbol) or a custom reason. See the [Deprecate and Disable Reasons](#deprecate-and-disable-reasons) section below for more details about the `because` parameter.
6672

73+
Similar to deprecated formulae, an optional `replacement` parameter may also be specified for disabled formulae to suggest a replacement formula or cask to the user. The value of the parameter is a string.
74+
75+
```ruby
76+
disable! date: "YYYY-MM-DD", because: :reason, replacement: "foo"
77+
```
78+
6779
## Removal
6880

6981
A formula should be removed if it does not meet our criteria for [acceptable formulae](Acceptable-Formulae.md) or [versioned formulae](Versions.md), has a non-open-source license, or has been disabled for over a year.

0 commit comments

Comments
 (0)