@@ -13,26 +13,26 @@ help:
13
13
# ---------------------------------------------------------------------------
14
14
15
15
.PHONY : clean
16
- clean : # # Clean all created artifacts
16
+ clean : # # Clean all created artifacts
17
17
clean :
18
18
git clean --exclude=.idea/ -ffdx
19
19
20
20
.PHONY : cs
21
21
CODE_SNIFFER =vendor-bin/code-sniffer/vendor/bin/phpcs
22
22
CODE_SNIFFER_FIX =vendor-bin/code-sniffer/vendor/bin/phpcbf
23
- cs : # # Fixes CS
23
+ cs : # # Fixes CS
24
24
cs : $(CODE_SNIFFER ) $(CODE_SNIFFER_FIX )
25
25
$(PHPNOGC ) $(CODE_SNIFFER_FIX ) || true
26
26
$(PHPNOGC ) $(CODE_SNIFFER )
27
27
28
28
.PHONY : phpstan
29
29
PHPSTAN =vendor-bin/phpstan/vendor/bin/phpstan
30
- phpstan : # # Runs PHPStan
30
+ phpstan : # # Runs PHPStan
31
31
phpstan : $(PHPSTAN )
32
32
$(PHPNOGC ) $(PHPSTAN ) analyze src -l6
33
33
34
34
.PHONY : build
35
- build : # # Build the PHAR
35
+ build : # # Build the PHAR
36
36
BOX =bin/box
37
37
build : bin/php-scoper.phar
38
38
@@ -42,48 +42,48 @@ build: bin/php-scoper.phar
42
42
# ---------------------------------------------------------------------------
43
43
44
44
.PHONY : test
45
- test : # # Run all the tests
45
+ test : # # Run all the tests
46
46
test : tc e2e
47
47
48
48
.PHONY : tu
49
49
PHPUNIT =bin/phpunit
50
- tu : # # Run PHPUnit tests
50
+ tu : # # Run PHPUnit tests
51
51
tu : bin/phpunit
52
52
$(PHPBIN ) $(PHPUNIT )
53
53
54
54
.PHONY : tc
55
- tc : # # Run PHPUnit tests with test coverage
55
+ tc : # # Run PHPUnit tests with test coverage
56
56
tc : bin/phpunit vendor-bin/covers-validator/vendor clover.xml
57
57
58
58
.PHONY : tm
59
- tm : # # Run Infection (Mutation Testing)
59
+ tm : # # Run Infection (Mutation Testing)
60
60
tm : bin/phpunit
61
61
$(MAKE ) e2e_020
62
62
63
63
.PHONY : e2e
64
- e2e : # # Run end-to-end tests
64
+ e2e : # # Run end-to-end tests
65
65
e2e : e2e_004 e2e_005 e2e_011 e2e_013 e2e_014 e2e_015 e2e_016 e2e_017 e2e_018 e2e_019 e2e_020 e2e_021 e2e_022 e2e_023 e2e_024 e2e_025 e2e_026 e2e_027 e2e_028 e2e_029 e2e_030
66
66
67
67
PHPSCOPER =bin/php-scoper.phar
68
68
69
69
.PHONY : e2e_004
70
- e2e_004 : # # Run end-to-end tests for the fixture set 004 — Source code case
70
+ e2e_004 : # # Run end-to-end tests for the fixture set 004 — Source code case
71
71
e2e_004 : $(PHPSCOPER )
72
72
$(PHPBIN ) $(BOX ) compile --no-parallel --working-dir fixtures/set004
73
73
74
74
php build/set004/bin/greet.phar > build/set004/output
75
75
diff fixtures/set004/expected-output build/set004/output
76
76
77
77
.PHONY : e2e_005
78
- e2e_005 : # # Run end-to-end tests for the fixture set 005 — Third-party code case
78
+ e2e_005 : # # Run end-to-end tests for the fixture set 005 — Third-party code case
79
79
e2e_005 : $(PHPSCOPER ) fixtures/set005/vendor
80
80
$(PHPBIN ) $(BOX ) compile --no-parallel --working-dir fixtures/set005
81
81
82
82
php build/set005/bin/greet.phar > build/set005/output
83
83
diff fixtures/set005/expected-output build/set005/output
84
84
85
85
.PHONY : e2e_011
86
- e2e_011 : # # Run end-to-end tests for the fixture set 011 — Whitelist case
86
+ e2e_011 : # # Run end-to-end tests for the fixture set 011 — Whitelist case
87
87
e2e_011 : $(PHPSCOPER ) fixtures/set011/vendor
88
88
$(PHPBIN ) $(BOX ) compile --no-parallel --working-dir fixtures/set011
89
89
cp -R fixtures/set011/tests/ build/set011/tests/
@@ -92,31 +92,31 @@ e2e_011: $(PHPSCOPER) fixtures/set011/vendor
92
92
diff fixtures/set011/expected-output build/set011/output
93
93
94
94
.PHONY : e2e_013
95
- e2e_013 : # Run end-to-end tests for the fixture set 013 — The init command
95
+ e2e_013 : # Run end-to-end tests for the fixture set 013 — The init command
96
96
e2e_013 : $(PHPSCOPER )
97
97
rm -rf build/set013
98
98
cp -R fixtures/set013 build/set013
99
99
$(PHPSCOPER ) init --working-dir=build/set013 --no-interaction
100
100
diff src/scoper.inc.php.tpl build/set013/scoper.inc.php
101
101
102
102
.PHONY : e2e_014
103
- e2e_014 : # # Run end-to-end tests for the fixture set 014 — Source code case with PSR-0
103
+ e2e_014 : # # Run end-to-end tests for the fixture set 014 — Source code case with PSR-0
104
104
e2e_014 : $(PHPSCOPER )
105
105
$(PHPBIN ) $(BOX ) compile --no-parallel --working-dir fixtures/set014
106
106
107
107
php build/set014/bin/greet.phar > build/set014/output
108
108
diff fixtures/set014/expected-output build/set014/output
109
109
110
110
.PHONY : e2e_015
111
- e2e_015 : # # Run end-to-end tests for the fixture set 015 — Third-party code case with PSR-0
111
+ e2e_015 : # # Run end-to-end tests for the fixture set 015 — Third-party code case with PSR-0
112
112
e2e_015 : $(PHPSCOPER ) fixtures/set015/vendor
113
113
$(PHPBIN ) $(BOX ) compile --no-parallel --working-dir fixtures/set015
114
114
115
115
php build/set015/bin/greet.phar > build/set015/output
116
116
diff fixtures/set015/expected-output build/set015/output
117
117
118
118
.PHONY : e2e_016
119
- e2e_016 : # # Run end-to-end tests for the fixture set 016 — Symfony Finder
119
+ e2e_016 : # # Run end-to-end tests for the fixture set 016 — Symfony Finder
120
120
e2e_016 : $(PHPSCOPER ) fixtures/set016-symfony-finder/vendor
121
121
$(PHPBIN ) $(PHPSCOPER ) add-prefix \
122
122
--working-dir=fixtures/set016-symfony-finder \
@@ -131,7 +131,7 @@ e2e_016: $(PHPSCOPER) fixtures/set016-symfony-finder/vendor
131
131
diff fixtures/set016-symfony-finder/expected-output build/set016-symfony-finder/output
132
132
133
133
.PHONY : e2e_017
134
- e2e_017 : # # Run end-to-end tests for the fixture set 017 — Symfony DependencyInjection
134
+ e2e_017 : # # Run end-to-end tests for the fixture set 017 — Symfony DependencyInjection
135
135
e2e_017 : $(PHPSCOPER ) fixtures/set017-symfony-di/vendor
136
136
$(PHPBIN ) $(PHPSCOPER ) add-prefix \
137
137
--working-dir=fixtures/set017-symfony-di \
@@ -146,7 +146,7 @@ e2e_017: $(PHPSCOPER) fixtures/set017-symfony-di/vendor
146
146
diff fixtures/set017-symfony-di/expected-output build/set017-symfony-di/output
147
147
148
148
.PHONY : e2e_018
149
- e2e_018 : # # Run end-to-end tests for the fixture set 018 — Nikic PHP-Parser
149
+ e2e_018 : # # Run end-to-end tests for the fixture set 018 — Nikic PHP-Parser
150
150
e2e_018 : $(PHPSCOPER ) fixtures/set018-nikic-parser/vendor
151
151
$(PHPBIN ) $(PHPSCOPER ) add-prefix \
152
152
--working-dir=fixtures/set018-nikic-parser \
@@ -161,7 +161,7 @@ e2e_018: $(PHPSCOPER) fixtures/set018-nikic-parser/vendor
161
161
diff fixtures/set018-nikic-parser/expected-output build/set018-nikic-parser/output
162
162
163
163
.PHONY : e2e_019
164
- e2e_019 : # # Run end-to-end tests for the fixture set 019 — Symfony Console
164
+ e2e_019 : # # Run end-to-end tests for the fixture set 019 — Symfony Console
165
165
e2e_019 : $(PHPSCOPER ) fixtures/set019-symfony-console/vendor
166
166
$(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set019-symfony-console \
167
167
--prefix=_Prefixed \
@@ -176,7 +176,7 @@ e2e_019: $(PHPSCOPER) fixtures/set019-symfony-console/vendor
176
176
diff fixtures/set019-symfony-console/expected-output build/set019-symfony-console/output
177
177
178
178
.PHONY : e2e_020
179
- e2e_020 : # # Run end-to-end tests for the fixture set 020 — Infection
179
+ e2e_020 : # # Run end-to-end tests for the fixture set 020 — Infection
180
180
e2e_020 : $(PHPSCOPER ) fixtures/set020-infection/vendor clover.xml
181
181
$(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set020-infection \
182
182
--output-dir=../../build/set020-infection \
@@ -197,7 +197,7 @@ e2e_020: $(PHPSCOPER) fixtures/set020-infection/vendor clover.xml
197
197
diff build/set020-infection/expected-output build/set020-infection/output
198
198
199
199
.PHONY : e2e_021
200
- e2e_021 : # # Run end-to-end tests for the fixture set 020 — Composer
200
+ e2e_021 : # # Run end-to-end tests for the fixture set 020 — Composer
201
201
e2e_021 : $(PHPSCOPER ) fixtures/set021-composer/vendor
202
202
$(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set021-composer \
203
203
--output-dir=../../build/set021-composer \
@@ -217,7 +217,7 @@ e2e_021: $(PHPSCOPER) fixtures/set021-composer/vendor
217
217
diff build/set021-composer/expected-output build/set021-composer/output
218
218
219
219
.PHONY : e2e_022
220
- e2e_022 : # # Run end-to-end tests for the fixture set 022 — Whitelist the project code with namespace whitelisting
220
+ e2e_022 : # # Run end-to-end tests for the fixture set 022 — Whitelist the project code with namespace whitelisting
221
221
e2e_022 : $(PHPSCOPER ) fixtures/set022/vendor
222
222
$(PHPBIN ) $(BOX ) compile --no-parallel --working-dir fixtures/set022
223
223
cp -R fixtures/set022/tests/ build/set022/tests/
@@ -227,7 +227,7 @@ e2e_022: $(PHPSCOPER) fixtures/set022/vendor
227
227
diff fixtures/set022/expected-output build/set022/output
228
228
229
229
.PHONY : e2e_023
230
- e2e_023 : # # Run end-to-end tests for the fixture set 023 — Whitelisting a whole third-party component with namespace whitelisting
230
+ e2e_023 : # # Run end-to-end tests for the fixture set 023 — Whitelisting a whole third-party component with namespace whitelisting
231
231
e2e_023 : $(PHPSCOPER ) fixtures/set023/vendor
232
232
$(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set023 \
233
233
--output-dir=../../build/set023 \
@@ -240,7 +240,7 @@ e2e_023: $(PHPSCOPER) fixtures/set023/vendor
240
240
diff fixtures/set023/expected-output build/set023/output
241
241
242
242
.PHONY : e2e_024
243
- e2e_024 : # # Run end-to-end tests for the fixture set 024 — Whitelisting user functions registered in the global namespace
243
+ e2e_024 : # # Run end-to-end tests for the fixture set 024 — Whitelisting user functions registered in the global namespace
244
244
e2e_024 : $(PHPSCOPER ) fixtures/set024/vendor
245
245
$(PHPBIN ) $(PHPSCOPER ) add-prefix \
246
246
--working-dir=fixtures/set024 \
@@ -255,7 +255,7 @@ e2e_024: $(PHPSCOPER) fixtures/set024/vendor
255
255
diff fixtures/set024/expected-output build/set024/output
256
256
257
257
.PHONY : e2e_025
258
- e2e_025 : # # Run end-to-end tests for the fixture set 025 — Whitelisting a vendor function
258
+ e2e_025 : # # Run end-to-end tests for the fixture set 025 — Whitelisting a vendor function
259
259
e2e_025 : $(PHPSCOPER ) fixtures/set025/vendor
260
260
$(PHPBIN ) $(PHPSCOPER ) add-prefix \
261
261
--working-dir=fixtures/set025 \
@@ -269,7 +269,7 @@ e2e_025: $(PHPSCOPER) fixtures/set025/vendor
269
269
diff fixtures/set025/expected-output build/set025/output
270
270
271
271
.PHONY : e2e_026
272
- e2e_026 : # # Run end-to-end tests for the fixture set 026 — Whitelisting classes and functions with pattern matching
272
+ e2e_026 : # # Run end-to-end tests for the fixture set 026 — Whitelisting classes and functions with pattern matching
273
273
e2e_026 : $(PHPSCOPER ) fixtures/set026/vendor
274
274
$(PHPBIN ) $(PHPSCOPER ) add-prefix \
275
275
--working-dir=fixtures/set026 \
@@ -283,7 +283,7 @@ e2e_026: $(PHPSCOPER) fixtures/set026/vendor
283
283
diff fixtures/set026/expected-output build/set026/output
284
284
285
285
.PHONY : e2e_027
286
- e2e_027 : # # Run end-to-end tests for the fixture set 027 — Laravel
286
+ e2e_027 : # # Run end-to-end tests for the fixture set 027 — Laravel
287
287
e2e_027 : $(PHPSCOPER ) fixtures/set027-laravel/vendor
288
288
php $(PHPSCOPER ) add-prefix \
289
289
--working-dir=fixtures/set027-laravel \
@@ -298,7 +298,7 @@ e2e_027: $(PHPSCOPER) fixtures/set027-laravel/vendor
298
298
diff fixtures/set027-laravel/expected-output build/set027-laravel/output
299
299
300
300
.PHONY : e2e_028
301
- e2e_028 : # # Run end-to-end tests for the fixture set 028 — Symfony
301
+ e2e_028 : # # Run end-to-end tests for the fixture set 028 — Symfony
302
302
e2e_028 : $(PHPSCOPER ) fixtures/set028-symfony/vendor
303
303
php $(PHPSCOPER ) add-prefix \
304
304
--working-dir=fixtures/set028-symfony \
@@ -317,7 +317,7 @@ e2e_028: $(PHPSCOPER) fixtures/set028-symfony/vendor
317
317
diff fixtures/set028-symfony/expected-output build/set028-symfony/output
318
318
319
319
.PHONY : e2e_029
320
- e2e_029 : # # Run end-to-end tests for the fixture set 029 — EasyRdf
320
+ e2e_029 : # # Run end-to-end tests for the fixture set 029 — EasyRdf
321
321
e2e_029 : $(PHPSCOPER ) fixtures/set029-easy-rdf/vendor
322
322
php $(PHPSCOPER ) add-prefix \
323
323
--working-dir=fixtures/set029-easy-rdf \
@@ -336,7 +336,7 @@ e2e_029: $(PHPSCOPER) fixtures/set029-easy-rdf/vendor
336
336
diff fixtures/set028-symfony/expected-output build/set028-symfony/output
337
337
338
338
.PHONY : e2e_030
339
- e2e_030 : # # Run end-to-end tests for the fixture set 039 — global function whitelisting
339
+ e2e_030 : # # Run end-to-end tests for the fixture set 030 — global function whitelisting
340
340
e2e_030 : $(PHPSCOPER ) fixtures/set030/vendor
341
341
php $(PHPSCOPER ) add-prefix \
342
342
--working-dir=fixtures/set030 \
@@ -355,7 +355,7 @@ e2e_030: $(PHPSCOPER) fixtures/set030/vendor
355
355
356
356
.PHONY : tb
357
357
BLACKFIRE =blackfire
358
- tb : # # Run Blackfire profiling
358
+ tb : # # Run Blackfire profiling
359
359
tb : bin/php-scoper.phar vendor
360
360
$(BLACKFIRE ) --new-reference run $(PHPBIN ) bin/php-scoper.phar add-prefix --output-dir=build/php-scoper --force --quiet
361
361
0 commit comments