-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
Makefile.e2e
540 lines (443 loc) · 30.3 KB
/
Makefile.e2e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# See https://tech.davis-hansson.com/p/make/
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
DOCKER_RUN = docker run --interactive --platform=linux/amd64 --rm --workdir=/opt/box
DOCKER_RUN_NO_PULL = docker run --interactive --platform=linux/amd64 --rm --pull=never
# Matches the minimum PHP version supported by Box.
DOCKER_MIN_BOX_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php82
DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php82_xdebug
E2E_SCOPER_EXPOSE_SYMBOLS_DIR = fixtures/build/dir011
E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR = dist/dir011
E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_SCOPED_FILE := $(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/src/Y.php
E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_SCOPED_FILE := $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR)/phar-Y.php
E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_STDOUT := $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR)/expected-stdout
E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_STDERR := $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR)/expected-stderr
E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_STDOUT := $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR)/actual-stdout
E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_STDERR := $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR)/actual-stderr
E2E_PHP_SETTINGS_CHECKER_DIR = fixtures/php-settings-checker
E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR = dist/php-settings-checker
E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE := $(SCOPED_BOX) compile --working-dir=$(E2E_PHP_SETTINGS_CHECKER_DIR) -vvv --no-ansi
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_NO_RESTART = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stdout-no-restart
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_NO_RESTART = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stderr-no-restart
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_NO_RESTART = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stdout-no-restart
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_NO_RESTART = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stderr-no-restart
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_XDEBUG_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/expected-stdout-xdebug-enabled
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_XDEBUG_ENABLED_TEMPLATE = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stdout-xdebug-enabled.tpl
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_XDEBUG_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stderr-xdebug-enabled
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_XDEBUG_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stdout-xdebug-enabled
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_XDEBUG_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stderr-xdebug-enabled
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_PHAR_READONLY_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stdout-phar-readonly-enabled
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_PHAR_READONLY_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stderr-phar-readonly-enabled
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_PHAR_READONLY_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stdout-phar-readonly-enabled
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_PHAR_READONLY_ENABLED = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stderr-phar-readonly-enabled
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_MEMORY_LIMIT_LOWER = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stdout-memory-limit-lower
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_MEMORY_LIMIT_LOWER = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stderr-memory-limit-lower
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_LOWER = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stdout-memory-limit-lower
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_LOWER = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stderr-memory-limit-lower
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_MEMORY_LIMIT_HIGHER = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stdout-memory-limit-higher
E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_MEMORY_LIMIT_HIGHER = $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stderr-memory-limit-higher
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_HIGHER = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stdout-memory-limit-higher
E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_HIGHER = $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)/actual-stderr-memory-limit-higher
E2E_SYMFONY_DIR = fixtures/build/dir012
E2E_SYMFONY_OUTPUT_DIR = dist/dir012
E2E_SYMFONY_TMP_PHAR := $(E2E_SYMFONY_DIR)/bin/console.phar
E2E_SYMFONY_PHAR := $(E2E_SYMFONY_OUTPUT_DIR)/console.phar
E2E_SYMFONY_EXPECTED_STDOUT := $(E2E_SYMFONY_OUTPUT_DIR)/expected-stdout
E2E_SYMFONY_EXPECTED_STDERR := $(E2E_SYMFONY_OUTPUT_DIR)/expected-stderr
E2E_SYMFONY_ACTUAL_STDOUT := $(E2E_SYMFONY_OUTPUT_DIR)/actual-stdout
E2E_SYMFONY_ACTUAL_STDERR := $(E2E_SYMFONY_OUTPUT_DIR)/actual-stderr
E2E_SYMFONY_RUNTIME_DIR = fixtures/build/dir018
E2E_SYMFONY_RUNTIME_OUTPUT_DIR = dist/dir018
E2E_SYMFONY_RUNTIME_CONSOLE := $(E2E_SYMFONY_RUNTIME_DIR)/new-bin/console
E2E_SYMFONY_RUNTIME_TMP_PHAR := $(E2E_SYMFONY_RUNTIME_DIR)/new-bin/console.phar
E2E_SYMFONY_RUNTIME_PHAR := $(E2E_SYMFONY_RUNTIME_OUTPUT_DIR)/console.phar
E2E_SYMFONY_RUNTIME_EXPECTED_STDOUT := $(E2E_SYMFONY_RUNTIME_OUTPUT_DIR)/expected-stdout
E2E_SYMFONY_RUNTIME_EXPECTED_STDERR := $(E2E_SYMFONY_RUNTIME_OUTPUT_DIR)/expected-stderr
E2E_SYMFONY_RUNTIME_ACTUAL_STDOUT := $(E2E_SYMFONY_RUNTIME_OUTPUT_DIR)/actual-stdout
E2E_SYMFONY_RUNTIME_ACTUAL_STDERR := $(E2E_SYMFONY_RUNTIME_OUTPUT_DIR)/actual-stderr
E2E_COMPOSER_INSTALLED_DIR = fixtures/build/dir013
E2E_COMPOSER_INSTALLED_OUTPUT_DIR = dist/dir013
E2E_COMPOSER_INSTALLED_EXPECTED_STDOUT := $(E2E_COMPOSER_INSTALLED_DIR)/expected-stdout
E2E_COMPOSER_INSTALLED_EXPECTED_STDERR := $(E2E_COMPOSER_INSTALLED_DIR)/expected-stderr
E2E_COMPOSER_INSTALLED_ACTUAL_STDOUT := $(E2E_COMPOSER_INSTALLED_OUTPUT_DIR)/actual-stdout
E2E_COMPOSER_INSTALLED_ACTUAL_STDERR := $(E2E_COMPOSER_INSTALLED_OUTPUT_DIR)/actual-stderr
E2E_PHPSTORM_STUBS_DIR = fixtures/build/dir014
E2E_PHPSTORM_STUBS_OUTPUT_DIR = dist/dir014
E2E_PHPSTORM_STUBS_EXPECTED_STDOUT := $(E2E_PHPSTORM_STUBS_DIR)/expected-stdout
E2E_PHPSTORM_STUBS_EXPECTED_STDERR := $(E2E_PHPSTORM_STUBS_DIR)/expected-stderr
E2E_PHPSTORM_STUBS_ACTUAL_STDOUT := $(E2E_PHPSTORM_STUBS_OUTPUT_DIR)/actual-stdout
E2E_PHPSTORM_STUBS_ACTUAL_STDERR := $(E2E_PHPSTORM_STUBS_OUTPUT_DIR)/actual-stderr
E2E_DOCKERFILE_DIR = fixtures/build/dir015
E2E_DOCKERFILE_OUTPUT_DIR = dist/dir015
E2E_DOCKERFILE_EXPECTED_STDOUT := $(E2E_DOCKERFILE_DIR)/expected-stdout
E2E_DOCKERFILE_EXPECTED_STDERR := $(E2E_DOCKERFILE_DIR)/expected-stderr
E2E_DOCKERFILE_ACTUAL_STDOUT := $(E2E_DOCKERFILE_OUTPUT_DIR)/actual-stdout
E2E_DOCKERFILE_ACTUAL_STDERR := $(E2E_DOCKERFILE_OUTPUT_DIR)/actual-stderr
E2E_DOCKERFILE_PHAR := $(E2E_DOCKERFILE_DIR)/index.phar
E2E_DOCKERFILE_IMAGE_TAG := local_box_e2e_dockerfile:latest
# TODO: see https://github.com/box-project/box/issues/839
E2E_DOCKERFILE_DOCKERFILE := Dockerfile
E2E_DOCKERFILE_NO_EXT_DIR = fixtures/build/dir016
E2E_DOCKERFILE_NO_EXT_OUTPUT_DIR = dist/dir016
E2E_DOCKERFILE_NO_EXT_EXPECTED_STDOUT := $(E2E_DOCKERFILE_NO_EXT_DIR)/expected-stdout
E2E_DOCKERFILE_NO_EXT_EXPECTED_STDERR := $(E2E_DOCKERFILE_NO_EXT_DIR)/expected-stderr
E2E_DOCKERFILE_NO_EXT_ACTUAL_STDOUT := $(E2E_DOCKERFILE_NO_EXT_OUTPUT_DIR)/actual-stdout
E2E_DOCKERFILE_NO_EXT_ACTUAL_STDERR := $(E2E_DOCKERFILE_NO_EXT_OUTPUT_DIR)/actual-stderr
E2E_DOCKERFILE_NO_EXT_PHAR := $(E2E_DOCKERFILE_NO_EXT_DIR)/index.phar
E2E_DOCKERFILE_NOT_EXT_IMAGE_TAG := local_box_e2e_dockerfile_no_ext:latest
# TODO: see https://github.com/box-project/box/issues/839
E2E_DOCKERFILE_NO_EXT_DOCKERFILE := Dockerfile
E2E_CUSTOM_COMPOSER_BIN_DIR = fixtures/build/dir019
E2E_CUSTOM_COMPOSER_BIN_OUTPUT_DIR = dist/dir019
E2E_CUSTOM_COMPOSER_BIN_EXPECTED_STDOUT := $(E2E_CUSTOM_COMPOSER_BIN_DIR)/expected-stdout
E2E_CUSTOM_COMPOSER_BIN_EXPECTED_STDERR := $(E2E_CUSTOM_COMPOSER_BIN_DIR)/expected-stderr
E2E_CUSTOM_COMPOSER_BIN_ACTUAL_STDOUT := $(E2E_CUSTOM_COMPOSER_BIN_OUTPUT_DIR)/actual-stdout
E2E_CUSTOM_COMPOSER_BIN_ACTUAL_STDERR := $(E2E_CUSTOM_COMPOSER_BIN_OUTPUT_DIR)/actual-stderr
E2E_CUSTOM_COMPOSER_BIN_ACTUAL_COMPILATION := $(E2E_CUSTOM_COMPOSER_BIN_OUTPUT_DIR)/actual-compilation
E2E_CUSTOM_COMPOSER_BIN_PHAR := $(E2E_CUSTOM_COMPOSER_BIN_OUTPUT_DIR)/index.phar
E2E_REPRODUCIBLE_BUILD_BIN_DIR = fixtures/build/dir020-reproducible-builds
E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR = dist/dir020-reproducible-builds
E2E_REPRODUCIBLE_BUILD_BIN_EXPECTED_STDOUT := $(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/expected-stdout
E2E_REPRODUCIBLE_BUILD_BIN_EXPECTED_STDERR := $(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/expected-stderr
E2E_REPRODUCIBLE_BUILD_BIN_ACTUAL_STDOUT := $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/actual-stdout
E2E_REPRODUCIBLE_BUILD_BIN_ACTUAL_STDERR := $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/actual-stderr
E2E_REPRODUCIBLE_BUILD_BIN_ACTUAL_COMPILATION := $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/actual-compilation
E2E_REPRODUCIBLE_BUILD_BIN_PHAR := $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/index.phar
ifeq ($(OS),Darwin)
SED = sed -i ''
else
SED = sed -i
endif
DIFF = diff --strip-trailing-cr --ignore-all-space --side-by-side --suppress-common-lines
#
# Commands
#---------------------------------------------------------------------------
.PHONY: e2e_scoper_alias
e2e_scoper_alias: $(SCOPED_BOX_BIN)
@# Check that the PHP-Scoper config API regarding the prefix alias is working
$(SCOPED_BOX) compile --working-dir=fixtures/build/dir010 --no-parallel --ansi
.PHONY: e2e_scoper_expose_symbols
e2e_scoper_expose_symbols: $(SCOPED_BOX_BIN) $(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/vendor
@# Check that the PHP-Scoper config API regarding the symbols exposure is working
mkdir -p $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR)
php $(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/index.php \
1>$(E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_STDOUT) \
2>$(E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_STDERR)
$(SCOPED_BOX) compile --working-dir=$(E2E_SCOPER_EXPOSE_SYMBOLS_DIR) --no-parallel --ansi
php $(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/index.phar \
1>$(E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_STDOUT) \
2>$(E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_STDERR)
mv -fv $(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/index.phar $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR)
cd $(E2E_SCOPER_EXPOSE_SYMBOLS_OUTPUT_DIR) && php -r "file_put_contents('phar-Y.php', file_get_contents((new Phar('index.phar'))['src/Y.php']));"
$(DIFF) $(E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_STDOUT) $(E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_STDOUT)
$(DIFF) $(E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_STDERR) $(E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_STDERR)
$(DIFF) $(E2E_SCOPER_EXPOSE_SYMBOLS_EXPECTED_SCOPED_FILE) $(E2E_SCOPER_EXPOSE_SYMBOLS_ACTUAL_SCOPED_FILE)
.PHONY: e2e_php_settings_checker_no_restart
e2e_php_settings_checker_no_restart: docker_images _e2e_php_settings_checker_no_restart
.PHONY: _e2e_php_settings_checker_no_restart
_e2e_php_settings_checker_no_restart: $(SCOPED_BOX_BIN)
@echo "$(YELLOW_COLOR)No restart needed$(NO_COLOR)"
mkdir -p $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=-1 \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_NO_RESTART) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_NO_RESTART)
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=-1 \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>&1 1>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_NO_RESTART) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_NO_RESTART)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_NO_RESTART) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_NO_RESTART)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_NO_RESTART) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_NO_RESTART)
.PHONY: e2e_php_settings_checker_xdebug_enabled
e2e_php_settings_checker_xdebug_enabled: docker_images _e2e_php_settings_checker_xdebug_enabled
.PHONY: _e2e_php_settings_checker_xdebug_enabled
_e2e_php_settings_checker_xdebug_enabled: $(SCOPED_BOX_BIN) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_XDEBUG_ENABLED)
@echo "$(YELLOW_COLOR)Xdebug enabled: restart needed$(NO_COLOR)"
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=-1 \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_XDEBUG_ENABLED) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_XDEBUG_ENABLED)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_XDEBUG_ENABLED)
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=-1 \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>&1 1>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_XDEBUG_ENABLED) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_XDEBUG_ENABLED)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_XDEBUG_ENABLED)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_XDEBUG_ENABLED) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_XDEBUG_ENABLED)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_XDEBUG_ENABLED) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_XDEBUG_ENABLED)
.PHONY: e2e_php_settings_checker_readonly_enabled
e2e_php_settings_checker_readonly_enabled: docker_images _e2e_php_settings_checker_readonly_enabled
.PHONY: _e2e_php_settings_checker_readonly_enabled
_e2e_php_settings_checker_readonly_enabled: $(SCOPED_BOX_BIN)
@echo "$(YELLOW_COLOR)phar.readonly enabled: restart needed$(NO_COLOR)"
mkdir -p $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=1 -dmemory_limit=-1 \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_PHAR_READONLY_ENABLED) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_PHAR_READONLY_ENABLED)
$(SED) "s/'-c' '.*' '\.\/box'/'-c' '\/tmp-file' 'bin\/box'/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_PHAR_READONLY_ENABLED)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_PHAR_READONLY_ENABLED)
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=1 -dmemory_limit=-1 \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>&1 1>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_PHAR_READONLY_ENABLED) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_PHAR_READONLY_ENABLED)
$(SED) "s/'-c' '.*' '\.\/box'/'-c' '\/tmp-file' 'bin\/box'/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_PHAR_READONLY_ENABLED)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_PHAR_READONLY_ENABLED)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_PHAR_READONLY_ENABLED) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_PHAR_READONLY_ENABLED)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_PHAR_READONLY_ENABLED) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_PHAR_READONLY_ENABLED)
.PHONY: e2e_php_settings_checker_memory_limit_lower
e2e_php_settings_checker_memory_limit_lower: docker_images _e2e_php_settings_checker_memory_limit_lower
.PHONY: _e2e_php_settings_checker_memory_limit_lower
_e2e_php_settings_checker_memory_limit_lower: $(SCOPED_BOX_BIN)
@echo "$(YELLOW_COLOR)Bump min memory limit if necessary (limit lower than default)$(NO_COLOR)"
mkdir -p $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=124M \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_LOWER) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_LOWER)
$(SED) "s/'-c' '.*' '\.\/box'/'-c' '\/tmp-file' 'bin\/box'/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_LOWER)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_LOWER)
$(DOCKER_RUN) --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=124M \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>&1 1>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_LOWER) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_LOWER)
$(SED) "s/'-c' '.*' '\.\/box'/'-c' '\/tmp-file' 'bin\/box'/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_LOWER)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_LOWER)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_MEMORY_LIMIT_LOWER) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_LOWER)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_MEMORY_LIMIT_LOWER) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_LOWER)
.PHONY: e2e_php_settings_checker_memory_limit_higher
e2e_php_settings_checker_memory_limit_higher: docker_images _e2e_php_settings_checker_memory_limit_higher
.PHONY: _e2e_php_settings_checker_memory_limit_higher
_e2e_php_settings_checker_memory_limit_higher: $(SCOPED_BOX_BIN)
@echo "$(YELLOW_COLOR)Bump min memory limit if necessary (limit higher than default)$(NO_COLOR)"
mkdir -p $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)
$(DOCKER_RUN) -e BOX_MEMORY_LIMIT=64M --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=1024M \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_HIGHER) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_HIGHER)
$(SED) "s/'-c' '.*' '\.\/box'/'-c' '\/tmp-file' 'bin\/box'/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_HIGHER)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_HIGHER)
$(DOCKER_RUN) -e BOX_MEMORY_LIMIT=64M --volume="$$PWD":/opt/box $(DOCKER_MIN_BOX_VERSION_IMAGE_TAG) \
php -dphar.readonly=0 -dmemory_limit=1024M \
$(E2E_PHP_SETTINGS_CHECKER_BOX_COMPILE) 2>&1 1>/dev/null \
| grep '\[debug\]' \
| tee $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_HIGHER) || true
$(SED) "s/Xdebug/xdebug/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_HIGHER)
$(SED) "s/'-c' '.*' '\.\/box'/'-c' '\/tmp-file' 'bin\/box'/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_HIGHER)
$(SED) "s/[0-9]* ms/100 ms/" $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_HIGHER)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_MEMORY_LIMIT_HIGHER) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDOUT_MEMORY_LIMIT_HIGHER)
$(DIFF) $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDERR_MEMORY_LIMIT_HIGHER) $(E2E_PHP_SETTINGS_CHECKER_ACTUAL_STDERR_MEMORY_LIMIT_HIGHER)
.PHONY: e2e_symfony
e2e_symfony: $(SCOPED_BOX_BIN) $(E2E_SYMFONY_DIR)/vendor $(E2E_SYMFONY_DIR)/.env.local.php
@# Packages a fresh Symfony app
@mkdir -p $(E2E_SYMFONY_OUTPUT_DIR)
php $(E2E_SYMFONY_DIR)/bin/console --version --no-ansi \
1>$(E2E_SYMFONY_EXPECTED_STDOUT) \
2>$(E2E_SYMFONY_EXPECTED_STDERR)
@# Clear the cache: we want to make sure it works on a clean installation
$(E2E_SYMFONY_DIR)/bin/console cache:pool:clear cache.global_clearer --env=prod --ansi
$(E2E_SYMFONY_DIR)/bin/console cache:clear --env=prod --ansi
rm -rf $(E2E_SYMFONY_DIR)/var/cache/prod/*
$(SCOPED_BOX) compile --working-dir=$(E2E_SYMFONY_DIR) --no-parallel --ansi
mv -fv $(E2E_SYMFONY_TMP_PHAR) $(E2E_SYMFONY_PHAR)
php $(E2E_SYMFONY_PHAR) --version --no-ansi \
1>$(E2E_SYMFONY_ACTUAL_STDOUT) \
2>$(E2E_SYMFONY_ACTUAL_STDERR) || true
$(DIFF) $(E2E_SYMFONY_EXPECTED_STDOUT) $(E2E_SYMFONY_ACTUAL_STDOUT)
$(DIFF) $(E2E_SYMFONY_EXPECTED_STDERR) $(E2E_SYMFONY_ACTUAL_STDERR)
.PHONY: e2e_symfony_runtime
e2e_symfony_runtime: $(SCOPED_BOX_BIN) $(E2E_SYMFONY_RUNTIME_DIR)/vendor $(E2E_SYMFONY_RUNTIME_DIR)/.env.local.php
@# Packages a fresh Symfony app
@mkdir -p $(E2E_SYMFONY_RUNTIME_OUTPUT_DIR)
php $(E2E_SYMFONY_RUNTIME_CONSOLE) --version --no-ansi \
1>$(E2E_SYMFONY_RUNTIME_EXPECTED_STDOUT) \
2>$(E2E_SYMFONY_RUNTIME_EXPECTED_STDERR)
@# Clear the cache: we want to make sure it works on a clean installation
$(E2E_SYMFONY_RUNTIME_CONSOLE) cache:pool:clear cache.global_clearer --env=prod --ansi
$(E2E_SYMFONY_RUNTIME_CONSOLE) cache:clear --env=prod --ansi
rm -rf $(E2E_SYMFONY_RUNTIME_DIR)/var/cache/prod/*
$(SCOPED_BOX) compile --working-dir=$(E2E_SYMFONY_RUNTIME_DIR) --no-parallel --ansi
mv -fv $(E2E_SYMFONY_RUNTIME_TMP_PHAR) $(E2E_SYMFONY_RUNTIME_PHAR)
php $(E2E_SYMFONY_RUNTIME_PHAR) --version --no-ansi \
1>$(E2E_SYMFONY_RUNTIME_ACTUAL_STDOUT) \
2>$(E2E_SYMFONY_RUNTIME_ACTUAL_STDERR) || true
$(DIFF) $(E2E_SYMFONY_RUNTIME_EXPECTED_STDOUT) $(E2E_SYMFONY_RUNTIME_ACTUAL_STDOUT)
$(DIFF) $(E2E_SYMFONY_RUNTIME_EXPECTED_STDERR) $(E2E_SYMFONY_RUNTIME_ACTUAL_STDERR)
.PHONY: e2e_composer_installed_versions
e2e_composer_installed_versions: $(SCOPED_BOX_BIN) $(E2E_COMPOSER_INSTALLED_DIR)/vendor
@# Packages an app using Composer\InstalledVersions
$(SCOPED_BOX) compile --working-dir=$(E2E_COMPOSER_INSTALLED_DIR) --no-parallel --ansi
@mkdir -p $(E2E_COMPOSER_INSTALLED_OUTPUT_DIR)
php $(E2E_COMPOSER_INSTALLED_DIR)/bin/run.phar \
1>$(E2E_COMPOSER_INSTALLED_ACTUAL_STDOUT) \
2>$(E2E_COMPOSER_INSTALLED_ACTUAL_STDERR)
mv -vf $(E2E_COMPOSER_INSTALLED_DIR)/bin/run.phar $(E2E_COMPOSER_INSTALLED_OUTPUT_DIR)/run.phar
$(DIFF) $(E2E_COMPOSER_INSTALLED_EXPECTED_STDOUT) $(E2E_COMPOSER_INSTALLED_ACTUAL_STDOUT)
$(DIFF) $(E2E_COMPOSER_INSTALLED_EXPECTED_STDERR) $(E2E_COMPOSER_INSTALLED_ACTUAL_STDERR)
.PHONY: e2e_phpstorm_stubs
e2e_phpstorm_stubs: $(SCOPED_BOX_BIN)
@# Project using symbols which should be vetted by PhpStormStubs
@mkdir -p $(E2E_PHPSTORM_STUBS_OUTPUT_DIR)
$(SCOPED_BOX) compile --working-dir=$(E2E_PHPSTORM_STUBS_DIR) --no-parallel --ansi
php $(E2E_PHPSTORM_STUBS_DIR)/index.phar \
1>$(E2E_PHPSTORM_STUBS_ACTUAL_STDOUT) \
2>$(E2E_PHPSTORM_STUBS_ACTUAL_STDERR)
mv -fv $(E2E_PHPSTORM_STUBS_DIR)/index.phar $(E2E_PHPSTORM_STUBS_OUTPUT_DIR)/index.phar
$(DIFF) $(E2E_PHPSTORM_STUBS_EXPECTED_STDOUT) $(E2E_PHPSTORM_STUBS_ACTUAL_STDOUT)
$(DIFF) $(E2E_PHPSTORM_STUBS_EXPECTED_STDERR) $(E2E_PHPSTORM_STUBS_ACTUAL_STDERR)
.PHONY: e2e_dockerfile
e2e_dockerfile: $(E2E_DOCKERFILE_PHAR) _e2e_dockerfile
.PHONY: _e2e_dockerfile
_e2e_dockerfile: $(SCOPED_BOX_BIN)
$(SCOPED_BOX) docker --no-interaction --config=$(E2E_DOCKERFILE_DIR)/box.json.dist
@mkdir -p $(E2E_DOCKERFILE_OUTPUT_DIR)
docker buildx build $(shell dirname $(E2E_DOCKERFILE_DOCKERFILE)) --platform=linux/amd64 --tag=$(E2E_DOCKERFILE_IMAGE_TAG)
$(DOCKER_RUN_NO_PULL) $(E2E_DOCKERFILE_IMAGE_TAG) \
1>$(E2E_DOCKERFILE_ACTUAL_STDOUT) \
2>$(E2E_DOCKERFILE_ACTUAL_STDERR)
$(DIFF) $(E2E_DOCKERFILE_EXPECTED_STDOUT) $(E2E_DOCKERFILE_ACTUAL_STDOUT)
$(DIFF) $(E2E_DOCKERFILE_EXPECTED_STDERR) $(E2E_DOCKERFILE_ACTUAL_STDERR)
.PHONY: e2e_dockerfile_no_extension
e2e_dockerfile_no_extension: $(E2E_DOCKERFILE_NO_EXT_PHAR) _e2e_dockerfile_no_extension
.PHONY: _e2e_dockerfile_no_extension
_e2e_dockerfile_no_extension: $(SCOPED_BOX_BIN)
$(SCOPED_BOX) docker --no-interaction --config=$(E2E_DOCKERFILE_NO_EXT_DIR)/box.json.dist
@mkdir -p $(E2E_DOCKERFILE_NO_EXT_OUTPUT_DIR)
docker buildx build $(shell dirname $(E2E_DOCKERFILE_NO_EXT_DOCKERFILE)) --platform=linux/amd64 --tag=$(E2E_DOCKERFILE_NOT_EXT_IMAGE_TAG)
$(DOCKER_RUN_NO_PULL) $(E2E_DOCKERFILE_NOT_EXT_IMAGE_TAG) \
1>$(E2E_DOCKERFILE_NO_EXT_ACTUAL_STDOUT) \
2>$(E2E_DOCKERFILE_NO_EXT_ACTUAL_STDERR)
$(DIFF) $(E2E_DOCKERFILE_NO_EXT_EXPECTED_STDOUT) $(E2E_DOCKERFILE_NO_EXT_ACTUAL_STDOUT)
$(DIFF) $(E2E_DOCKERFILE_NO_EXT_EXPECTED_STDERR) $(E2E_DOCKERFILE_NO_EXT_ACTUAL_STDERR)
.PHONY: e2e_custom_composer_bin
e2e_custom_composer_bin: $(SCOPED_BOX_BIN) $(E2E_CUSTOM_COMPOSER_BIN_DIR)/vendor
@mkdir -p $(E2E_CUSTOM_COMPOSER_BIN_OUTPUT_DIR)
$(SCOPED_BOX) compile \
--working-dir=$(E2E_CUSTOM_COMPOSER_BIN_DIR) \
--config=box.json.dist \
--composer-bin=composer.phar \
--verbose \
2>&1 \
1>$(E2E_CUSTOM_COMPOSER_BIN_ACTUAL_COMPILATION)
mv -fv $(E2E_CUSTOM_COMPOSER_BIN_DIR)/index.phar $(E2E_CUSTOM_COMPOSER_BIN_PHAR)
$(E2E_CUSTOM_COMPOSER_BIN_PHAR) \
1>$(E2E_CUSTOM_COMPOSER_BIN_ACTUAL_STDOUT) \
2>$(E2E_CUSTOM_COMPOSER_BIN_ACTUAL_STDERR)
$(DIFF) $(E2E_CUSTOM_COMPOSER_BIN_EXPECTED_STDOUT) $(E2E_CUSTOM_COMPOSER_BIN_ACTUAL_STDOUT)
$(DIFF) $(E2E_CUSTOM_COMPOSER_BIN_EXPECTED_STDERR) $(E2E_CUSTOM_COMPOSER_BIN_ACTUAL_STDERR)
php $(E2E_CUSTOM_COMPOSER_BIN_DIR)/test.php \
$(PWD)/$(E2E_CUSTOM_COMPOSER_BIN_DIR)/composer.phar \
$(E2E_CUSTOM_COMPOSER_BIN_ACTUAL_COMPILATION)
.PHONY: e2e_reproducible_build
e2e_reproducible_build: $(SCOPED_BOX_BIN) $(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/vendor
@mkdir -p $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)
# Build a first time
COMPOSER_ROOT_VERSION="1.0.0-dev" $(SCOPED_BOX) compile \
--working-dir=$(E2E_REPRODUCIBLE_BUILD_BIN_DIR) \
--config=box.json.dist \
--no-parallel
mv -fv $(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/index.phar $(E2E_REPRODUCIBLE_BUILD_BIN_PHAR)
$(E2E_REPRODUCIBLE_BUILD_BIN_PHAR) \
1>$(E2E_REPRODUCIBLE_BUILD_BIN_ACTUAL_STDOUT) \
2>$(E2E_REPRODUCIBLE_BUILD_BIN_ACTUAL_STDERR)
# Sanity check: make sure the PHAR works
$(DIFF) $(E2E_REPRODUCIBLE_BUILD_BIN_EXPECTED_STDOUT) $(E2E_REPRODUCIBLE_BUILD_BIN_ACTUAL_STDOUT)
$(DIFF) $(E2E_REPRODUCIBLE_BUILD_BIN_EXPECTED_STDERR) $(E2E_REPRODUCIBLE_BUILD_BIN_ACTUAL_STDERR)
mv $(E2E_REPRODUCIBLE_BUILD_BIN_PHAR) $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/index-1.phar
# Build a second time
COMPOSER_ROOT_VERSION="1.0.0-dev" $(SCOPED_BOX) compile \
--working-dir=$(E2E_REPRODUCIBLE_BUILD_BIN_DIR) \
--config=box.json.dist \
--no-parallel
mv -fv $(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/index.phar $(E2E_REPRODUCIBLE_BUILD_BIN_PHAR)
mv $(E2E_REPRODUCIBLE_BUILD_BIN_PHAR) $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/index-2.phar
$(SCOPED_BOX) diff $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/index-1.phar $(E2E_REPRODUCIBLE_BUILD_BIN_OUTPUT_DIR)/index-2.phar --diff=git
#
# Rules from files
#---------------------------------------------------------------------------
$(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/vendor: $(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/composer.lock
composer install --ansi --working-dir=$(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)
touch -c $@
$(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/composer.lock: $(E2E_SCOPER_EXPOSE_SYMBOLS_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_SCOPER_EXPOSE_SYMBOLS_DIR) && touch -c $(@)"
$(E2E_SYMFONY_DIR)/.env.local.php: $(E2E_SYMFONY_DIR)/vendor $(E2E_SYMFONY_DIR)/.env
composer dump-env prod --working-dir=$(E2E_SYMFONY_DIR) --ansi
touch -c $@
$(E2E_SYMFONY_DIR)/vendor:
composer install --ansi --working-dir=$(E2E_SYMFONY_DIR)
touch -c $@
$(E2E_SYMFONY_DIR)/composer.lock: $(E2E_SYMFONY_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_SYMFONY_DIR) && touch -c $(@)"
$(E2E_SYMFONY_RUNTIME_DIR)/.env.local.php: $(E2E_SYMFONY_RUNTIME_DIR)/vendor $(E2E_SYMFONY_RUNTIME_DIR)/.env
composer dump-env prod --working-dir=$(E2E_SYMFONY_RUNTIME_DIR) --ansi
touch -c $@
$(E2E_SYMFONY_RUNTIME_DIR)/vendor:
composer install --ansi --working-dir=$(E2E_SYMFONY_RUNTIME_DIR)
touch -c $@
$(E2E_SYMFONY_RUNTIME_DIR)/composer.lock: $(E2E_SYMFONY_RUNTIME_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_SYMFONY_RUNTIME_DIR) && touch -c $(@)"
$(E2E_COMPOSER_INSTALLED_DIR)/vendor: $(E2E_COMPOSER_INSTALLED_DIR)/composer.lock
composer install --ansi --working-dir=$(E2E_COMPOSER_INSTALLED_DIR)
touch -c $@
$(E2E_COMPOSER_INSTALLED_DIR)/composer.lock: $(E2E_COMPOSER_INSTALLED_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_COMPOSER_INSTALLED_DIR) && touch -c $(@)"
$(E2E_DOCKERFILE_DIR)/vendor: $(E2E_DOCKERFILE_DIR)/composer.lock
composer install --ansi --working-dir=$(E2E_DOCKERFILE_DIR)
touch -c $@
$(E2E_DOCKERFILE_DIR)/composer.lock: $(E2E_DOCKERFILE_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_DOCKERFILE_DIR) && touch -c $(@)"
$(E2E_DOCKERFILE_PHAR): $(SCOPED_BOX_BIN) $(E2E_DOCKERFILE_DIR)/index.php $(E2E_DOCKERFILE_DIR)/vendor
$(SCOPED_BOX) compile --ansi --working-dir=$(E2E_DOCKERFILE_DIR)
touch -c $@
$(E2E_DOCKERFILE_NO_EXT_DIR)/vendor: $(E2E_DOCKERFILE_NO_EXT_DIR)/composer.lock
composer install --ansi --working-dir=$(E2E_DOCKERFILE_NO_EXT_DIR)
touch -c $@
$(E2E_DOCKERFILE_NO_EXT_DIR)/composer.lock: $(E2E_DOCKERFILE_NO_EXT_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_DOCKERFILE_NO_EXT_DIR) && touch -c $(@)"
$(E2E_DOCKERFILE_NO_EXT_PHAR): $(SCOPED_BOX_BIN) $(E2E_DOCKERFILE_NO_EXT_DIR)/index.php $(E2E_DOCKERFILE_NO_EXT_DIR)/vendor
$(SCOPED_BOX) compile --ansi --working-dir=$(E2E_DOCKERFILE_NO_EXT_DIR)
touch -c $@
.PHONY: docker_images
docker_images:
./.docker/build
$(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_XDEBUG_ENABLED): $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_XDEBUG_ENABLED_TEMPLATE)
./fixtures/php-settings-checker/create-expected-output $(DOCKER_MIN_BOX_XDEBUG_PHP_VERSION_IMAGE_TAG)
mkdir -p $(E2E_PHP_SETTINGS_CHECKER_OUTPUT_DIR)
mv -fv $(E2E_PHP_SETTINGS_CHECKER_DIR)/expected-stdout-xdebug-enabled $(E2E_PHP_SETTINGS_CHECKER_EXPECTED_STDOUT_XDEBUG_ENABLED)
touch -c $@
$(E2E_CUSTOM_COMPOSER_BIN_DIR)/vendor: $(E2E_CUSTOM_COMPOSER_BIN_DIR)/composer.lock
composer install --ansi --working-dir=$(E2E_CUSTOM_COMPOSER_BIN_DIR)
touch -c $@
$(E2E_CUSTOM_COMPOSER_BIN_DIR)/composer.lock: $(E2E_CUSTOM_COMPOSER_BIN_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_CUSTOM_COMPOSER_BIN_DIR) && touch -c $(@)"
$(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/vendor: $(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/composer.lock
composer install --ansi --working-dir=$(E2E_REPRODUCIBLE_BUILD_BIN_DIR)
touch -c $@
$(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/composer.lock: $(E2E_REPRODUCIBLE_BUILD_BIN_DIR)/composer.json
@echo "$(ERROR_COLOR)$(@) is not up to date. You may want to run the following command:$(NO_COLOR)"
@echo "$$ composer update --lock --working-dir=$(E2E_REPRODUCIBLE_BUILD_BIN_DIR) && touch -c $(@)"