Skip to content

Commit eaaff59

Browse files
refactor: reorder TYPO3 recipe tasks (#4130)
* refactor: add typo3:install:fixfolderstructure command * refactor: reorder deploy tasks and streamline database:updateschema * docs: generate updated documentation
1 parent 2676f7b commit eaaff59

File tree

2 files changed

+56
-54
lines changed

2 files changed

+56
-54
lines changed

docs/recipe/typo3.md

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ The [deploy](#deploy) task of **TYPO3** consists of:
3434
* [deploy:release](/docs/recipe/deploy/release.md#deploy-release) – Prepares release
3535
* [typo3:update_code](/docs/recipe/typo3.md#typo3-update_code)
3636
* [deploy:shared](/docs/recipe/deploy/shared.md#deploy-shared) – Creates symlinks for shared files and dirs
37+
* [typo3:install:fixfolderstructure](/docs/recipe/typo3.md#typo3-install-fixfolderstructure) – TYPO3 - Fix folder structure
3738
* [deploy:writable](/docs/recipe/deploy/writable.md#deploy-writable) – Makes writable dirs
38-
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors) – Installs vendors
39-
* [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup) – TYPO3 - Cache warmup for system caches
40-
* [typo3:database:updateschema](/docs/recipe/typo3.md#typo3-database-updateschema) – TYPO3 - Update database schema
4139
* [typo3:extension:setup](/docs/recipe/typo3.md#typo3-extension-setup) – TYPO3 - Set up all extensions
4240
* [typo3:language:update](/docs/recipe/typo3.md#typo3-language-update) – TYPO3 - Update the language files of all activated extensions
41+
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors) – Installs vendors
4342
* [typo3:cache:flush](/docs/recipe/typo3.md#typo3-cache-flush) – TYPO3 - Clear all caches
43+
* [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup) – TYPO3 - Cache warmup for system caches
4444
* [deploy:publish](/docs/recipe/common.md#deploy-publish) – Publishes the release
4545
* [deploy:symlink](/docs/recipe/deploy/symlink.md#deploy-symlink) – Creates symlink to release
4646
* [deploy:unlock](/docs/recipe/deploy/lock.md#deploy-unlock) – Unlocks deploy
@@ -64,15 +64,16 @@ Deploy to staging using rsync:
6464
vendor/bin/dep deploy staging
6565

6666
Common TYPO3 commands:
67-
vendor/bin/dep typo3:cache:flush # Clear all TYPO3 caches
68-
vendor/bin/dep typo3:cache:warmup # Warmup system caches
69-
vendor/bin/dep typo3:language:update # Update extension language files
70-
vendor/bin/dep typo3:extension:setup # Set up all extensions
67+
vendor/bin/dep typo3:cache:flush # Clear all TYPO3 caches
68+
vendor/bin/dep typo3:cache:warmup # Warmup system caches
69+
vendor/bin/dep typo3:language:update # Update extension language files
70+
vendor/bin/dep typo3:extension:setup # Set up all extensions
71+
vendor/bin/dep typo3:install:fixfolderstructure # Automatically create required files and folders for TYPO3
7172

7273

7374
## Configuration
7475
### composer_config
75-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L34)
76+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L35)
7677

7778
Parse composer.json and return its contents as an array.
7879
Used for auto-detecting TYPO3 settings like public_dir and bin_dir.
@@ -83,7 +84,7 @@ return json_decode(file_get_contents('./composer.json'), true, 512, JSON_THROW_O
8384

8485

8586
### typo3/public_dir
86-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L43)
87+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L44)
8788

8889
TYPO3 public (web) directory.
8990
Automatically determined from composer.json.
@@ -96,7 +97,7 @@ The value of this configuration is autogenerated on access.
9697

9798

9899
### bin/typo3
99-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L57)
100+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L58)
100101

101102
Path to the TYPO3 CLI binary.
102103
Determined from composer.json "config.bin-dir" or defaults to "vendor/bin/typo3".
@@ -108,7 +109,7 @@ The value of this configuration is autogenerated on access.
108109

109110

110111
### log_files
111-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L70)
112+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L71)
112113

113114
Log files to display when running `./vendor/bin/dep logs:app`
114115

@@ -118,7 +119,7 @@ Log files to display when running `./vendor/bin/dep logs:app`
118119

119120

120121
### shared_dirs
121-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L76)
122+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L77)
122123

123124
Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`.
124125

@@ -139,7 +140,7 @@ Shared via symlinks from the shared/ directory.
139140

140141

141142
### writable_dirs
142-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L99)
143+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L100)
143144

144145
Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`.
145146

@@ -158,7 +159,7 @@ Writeable directories
158159

159160

160161
### composer_options
161-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L111)
162+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L112)
162163

163164
Overrides [composer_options](/docs/recipe/deploy/vendors.md#composer_options) from `recipe/deploy/vendors.php`.
164165

@@ -170,7 +171,7 @@ Composer install options for production.
170171

171172

172173
### use_rsync
173-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L117)
174+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L118)
174175

175176
If set in the config this recipe uses rsync.
176177
Default setting: false (uses the Git repository)
@@ -181,7 +182,7 @@ false
181182

182183

183184
### update_code_task
184-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L119)
185+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L120)
185186

186187

187188

@@ -191,7 +192,7 @@ return get('use_rsync') ? 'rsync' : 'deploy:update_code';
191192

192193

193194
### rsync
194-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L147)
195+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L148)
195196

196197

197198

@@ -212,7 +213,7 @@ return get('use_rsync') ? 'rsync' : 'deploy:update_code';
212213

213214

214215
### typo3_updateschema_types
215-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L164)
216+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L165)
216217

217218
List of schema update types.
218219
`safe` includes all necessary operations, to add or change fields or tables.
@@ -226,15 +227,15 @@ List of schema update types.
226227
## Tasks
227228

228229
### typo3\:update_code {#typo3-update_code}
229-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L123)
230+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L124)
230231

231232

232233

233234

234235

235236

236237
### typo3\:cache\:flush {#typo3-cache-flush}
237-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L173)
238+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L174)
238239

239240
TYPO3 - Clear all caches.
240241

@@ -243,39 +244,39 @@ All run via [bin/php](/docs/recipe/common.md#bin/php) [release_path](/docs/recip
243244

244245

245246
### typo3\:cache\:warmup {#typo3-cache-warmup}
246-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L178)
247+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L179)
247248

248249
TYPO3 - Cache warmup for system caches.
249250

250251

251252

252253

253254
### typo3\:language\:update {#typo3-language-update}
254-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L183)
255+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L184)
255256

256257
TYPO3 - Update the language files of all activated extensions.
257258

258259

259260

260261

261262
### typo3\:extension\:setup {#typo3-extension-setup}
262-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L188)
263+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L189)
263264

264265
TYPO3 - Set up all extensions.
265266

266267

267268

268269

269-
### typo3\:database\:updateschema {#typo3-database-updateschema}
270-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L193)
270+
### typo3\:install\:fixfolderstructure {#typo3-install-fixfolderstructure}
271+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L194)
271272

272-
TYPO3 - Update database schema.
273+
TYPO3 - Fix folder structure.
273274

274275

275276

276277

277278
### deploy {#deploy}
278-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L214)
279+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L215)
279280

280281
Deploys a TYPO3 project.
281282

@@ -285,13 +286,13 @@ Main deploy task for TYPO3.
285286
2. Create release directory
286287
3. Update code (Git or rsync)
287288
4. Symlink shared dirs/files
288-
5. Ensure writable dirs
289-
6. Install vendors
290-
7. Warm up TYPO3 caches
291-
8. Perform schema updates
292-
9. Run extension setup
293-
10. Update language files
294-
11. Flush caches
289+
5. Fix TYPO3 folder structure
290+
6. Ensure writable dirs
291+
7. Run extension setup & perform schema updates
292+
8. Update language files
293+
9. Install composer vendors
294+
10. Flush caches
295+
11. Warm up TYPO3 caches
295296
12. Unlock and clean up
296297

297298

@@ -302,13 +303,13 @@ This task is group task which contains next tasks:
302303
* [deploy:release](/docs/recipe/deploy/release.md#deploy-release)
303304
* [typo3:update_code](/docs/recipe/typo3.md#typo3-update_code)
304305
* [deploy:shared](/docs/recipe/deploy/shared.md#deploy-shared)
306+
* [typo3:install:fixfolderstructure](/docs/recipe/typo3.md#typo3-install-fixfolderstructure)
305307
* [deploy:writable](/docs/recipe/deploy/writable.md#deploy-writable)
306-
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors)
307-
* [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup)
308-
* [typo3:database:updateschema](/docs/recipe/typo3.md#typo3-database-updateschema)
309308
* [typo3:extension:setup](/docs/recipe/typo3.md#typo3-extension-setup)
310309
* [typo3:language:update](/docs/recipe/typo3.md#typo3-language-update)
310+
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors)
311311
* [typo3:cache:flush](/docs/recipe/typo3.md#typo3-cache-flush)
312+
* [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup)
312313
* [deploy:publish](/docs/recipe/common.md#deploy-publish)
313314

314315

recipe/typo3.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
* vendor/bin/dep deploy staging
1515
*
1616
* Common TYPO3 commands:
17-
* vendor/bin/dep typo3:cache:flush # Clear all TYPO3 caches
18-
* vendor/bin/dep typo3:cache:warmup # Warmup system caches
19-
* vendor/bin/dep typo3:language:update # Update extension language files
20-
* vendor/bin/dep typo3:extension:setup # Set up all extensions
17+
* vendor/bin/dep typo3:cache:flush # Clear all TYPO3 caches
18+
* vendor/bin/dep typo3:cache:warmup # Warmup system caches
19+
* vendor/bin/dep typo3:language:update # Update extension language files
20+
* vendor/bin/dep typo3:extension:setup # Set up all extensions
21+
* vendor/bin/dep typo3:install:fixfolderstructure # Automatically create required files and folders for TYPO3
2122
*/
2223

2324
namespace Deployer;
@@ -189,9 +190,9 @@
189190
run('{{bin/php}} {{release_path}}/{{bin/typo3}} extension:setup');
190191
});
191192

192-
desc('TYPO3 - Update database schema');
193-
task('typo3:database:updateschema', function () {
194-
run('{{bin/php}} {{release_path}}/{{bin/typo3}} database:updateschema {{typo3_updateschema_types}}');
193+
desc('TYPO3 - Fix folder structure');
194+
task('typo3:install:fixfolderstructure', function () {
195+
run('{{bin/php}} {{release_path}}/{{bin/typo3}} install:fixfolderstructure');
195196
});
196197

197198
/**
@@ -201,13 +202,13 @@
201202
* 2. Create release directory
202203
* 3. Update code (Git or rsync)
203204
* 4. Symlink shared dirs/files
204-
* 5. Ensure writable dirs
205-
* 6. Install vendors
206-
* 7. Warm up TYPO3 caches
207-
* 8. Perform schema updates
208-
* 9. Run extension setup
209-
* 10. Update language files
210-
* 11. Flush caches
205+
* 5. Fix TYPO3 folder structure
206+
* 6. Ensure writable dirs
207+
* 7. Run extension setup & perform schema updates
208+
* 8. Update language files
209+
* 9. Install composer vendors
210+
* 10. Flush caches
211+
* 11. Warm up TYPO3 caches
211212
* 12. Unlock and clean up
212213
*/
213214
desc('Deploys a TYPO3 project');
@@ -218,13 +219,13 @@
218219
'deploy:release',
219220
'typo3:update_code',
220221
'deploy:shared',
222+
'typo3:install:fixfolderstructure',
221223
'deploy:writable',
222-
'deploy:vendors',
223-
'typo3:cache:warmup',
224-
'typo3:database:updateschema',
225224
'typo3:extension:setup',
226225
'typo3:language:update',
226+
'deploy:vendors',
227227
'typo3:cache:flush',
228+
'typo3:cache:warmup',
228229
'deploy:publish',
229230
]);
230231

0 commit comments

Comments
 (0)