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
{{ message }}
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ class DummyCommand extends Command
60
60
}
61
61
```
62
62
63
-
### 3. Create or edit config section in projects composer.json and add there section `commands` with PHP class names of commands that should be added to composer
63
+
### 3. Create or edit config section in projects composer.json and add there section `custom-commands` with`commands` key and add there PHP class names of commands that should be added to composer
64
64
65
65
This should look something like this:
66
66
```javascript
@@ -84,9 +84,45 @@ This should look something like this:
84
84
}
85
85
},
86
86
"extra": {
87
-
"commands": [
88
-
"My\\Commands\\DummyCommand"
89
-
]
87
+
"custom-commands": {
88
+
"commands": [
89
+
"My\\Commands\\DummyCommand"
90
+
]
91
+
}
92
+
}
93
+
}
94
+
```
95
+
96
+
If you need that some script should be executed before every command (f.e. you need to define some constants), you can add there `boot` key with value that is filename relative from place where composer.json is.
97
+
98
+
In that case your composer.json should look similar to this:
0 commit comments