-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
467 lines (467 loc) · 14.4 KB
/
package.json
File metadata and controls
467 lines (467 loc) · 14.4 KB
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
{
"name": "phpnexus",
"displayName": "PhpNexus",
"description": "Advanced PHP development suite: Phpactor IntelliSense, Xdebug, PHPUnit, Composer, and integrated static analysis",
"version": "1.0.0",
"publisher": "forward2k",
"icon": "icon.png",
"license": "GPL-3.0-only",
"repository": {
"type": "git",
"url": "https://github.com/forward2k/phpnexus"
},
"engines": {
"vscode": "^1.88.0"
},
"activationEvents": [
"onLanguage:php",
"onLanguage:blade"
],
"main": "./dist/extension.js",
"scripts": {
"compile": "tsc && esbuild src/extension.ts --bundle --outfile=dist/extension.js --platform=node --external:vscode --external:vscode-languageclient",
"build": "npm run compile && npx @vscode/vsce package",
"publish:marketplace": "npm run compile && npx @vscode/vsce publish",
"publish:openvsx": "npm run compile && npx ovsx publish",
"watch": "tsc --watch",
"test": "echo \"No tests specified\" && exit 0"
},
"categories": [
"Programming Languages",
"Linters",
"Formatters",
"Debuggers"
],
"keywords": [
"php",
"ide",
"intellisense",
"debugger",
"laravel",
"symfony"
],
"author": "",
"type": "commonjs",
"devDependencies": {
"@types/node": "^25.5.0",
"@types/vscode": "^1.88.0",
"@vscode/vsce": "^3.7.1",
"ovsx": "^0.10.6",
"esbuild": "^0.27.4",
"typescript": "^6.0.2"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
},
"contributes": {
"languages": [
{
"id": "php",
"extensions": [
".php",
".phtml",
".php4",
".php5",
".php7",
".php8",
".php9"
],
"aliases": [
"PHP"
],
"firstLine": "^#!.*PHP.*$",
"identifiers": [
"php"
]
},
{
"id": "blade",
"extensions": [
".blade.php"
],
"aliases": [
"Blade",
"Laravel Blade"
]
}
],
"grammars": [
{
"language": "php",
"scopeName": "text.html.php",
"path": "./syntaxes/php.tmLanguage.json"
},
{
"language": "blade",
"scopeName": "text.html.blade",
"path": "./syntaxes/blade.tmLanguage.json"
}
],
"documentFormattingEditProvider": [
{
"language": "php"
}
],
"configuration": {
"title": "PhpNexus",
"properties": {
"phpnexus.phpPath": {
"type": "string",
"default": "php",
"description": "Path to PHP executable"
},
"phpnexus.phpactor.enabled": {
"type": "boolean",
"default": true,
"description": "Enable phpactor language server for IntelliSense"
},
"phpnexus.completion.preferPhpactor": {
"type": "boolean",
"default": true,
"description": "Prefer phpactor completions by setting php.suggest.basic to false in workspace settings."
},
"phpnexus.phpactor.path": {
"type": "string",
"default": "phpactor",
"description": "Path to phpactor binary or 'auto' to install"
},
"phpnexus.mago.path": {
"type": "string",
"default": "mago",
"description": "Path to mago binary"
},
"phpnexus.xdebug.enabled": {
"type": "boolean",
"default": true,
"description": "Enable Xdebug debugging"
},
"phpnexus.xdebug.port": {
"type": "number",
"default": 9003,
"description": "Xdebug port"
},
"phpnexus.xdebug.ideKey": {
"type": "string",
"default": "phpnexus",
"description": "Xdebug IDE key"
},
"phpnexus.phpunit.enabled": {
"type": "boolean",
"default": true,
"description": "Enable PHPUnit integration"
},
"phpnexus.phpunit.path": {
"type": "string",
"default": "vendor/bin/phpunit",
"description": "Path to PHPUnit executable"
},
"phpnexus.phpunit.runner": {
"type": "string",
"enum": [
"auto",
"phpunit",
"pest"
],
"default": "auto",
"description": "Preferred test runner: auto-detect (default), force phpunit, or force pest."
},
"phpnexus.phpunit.command": {
"type": "string",
"default": "\"${php}\" ${phpargs} \"${phpunit}\" ${phpunitargs}",
"description": "Custom test command template. Variables: ${phpunit}, ${phpunitxml}, ${phpunitargs}, ${php}, ${phpargs}, ${cwd}."
},
"phpnexus.phpunit.config": {
"type": "string",
"default": "",
"description": "Path (absolute/relative) or glob pattern to phpunit.xml(.dist). Empty = auto-detect in workspace."
},
"phpnexus.phpunit.coverageCloverFile": {
"type": "string",
"default": ".vscode/phpnexus-coverage.clover.xml",
"description": "Where to write the Clover XML report for Test Explorer Coverage runs (relative to workspace root or absolute). Removed after the run is parsed."
},
"phpnexus.phpunit.profileOutputDir": {
"type": "string",
"default": ".vscode/phpnexus-profile",
"description": "Directory for Xdebug cachegrind output when using the Test Explorer Profile run (relative to workspace root or absolute)."
},
"phpnexus.phpunit.preTask": {
"type": "string",
"default": "",
"description": "Name of a VS Code task (from .vscode/tasks.json) to run before each Test Explorer batch. Empty = disabled."
},
"phpnexus.phpunit.postTask": {
"type": "string",
"default": "",
"description": "Name of a VS Code task to run after each Test Explorer batch (runs even if tests fail). Empty = disabled."
},
"phpnexus.phpunit.pathMappings": {
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {
"remote": {
"type": "string",
"description": "Path prefix as in Clover / container (e.g. /var/www/html)"
},
"local": {
"type": "string",
"description": "Workspace path prefix; may use ${workspaceFolder}"
}
}
},
"description": "Map remote paths to local files for coverage (Clover) and merged into debug launches for Test Explorer."
},
"phpnexus.format.enable": {
"type": "boolean",
"default": true,
"description": "Enable code formatting"
},
"phpnexus.format.provider": {
"type": "string",
"enum": [
"phpcbf",
"phpcs",
"mago"
],
"default": "phpcbf",
"description": "Code formatting provider (mago uses its own config)"
},
"phpnexus.format.standard": {
"type": "string",
"enum": [
"PSR-12",
"PSR-2",
"PER",
"Allman",
"K&R",
"Laravel",
"Drupal",
"WordPress"
],
"default": "PSR-12",
"description": "Code style standard (not used when provider is mago)"
},
"phpnexus.lint.provider": {
"type": "string",
"enum": [
"php",
"mago"
],
"default": "php",
"description": "Linting provider (php uses 'php -l', mago uses the mago language server)"
},
"phpnexus.staticAnalysis.enabled": {
"type": "boolean",
"default": true,
"description": "Enable static analysis commands and the diagnostic collection filled by the selected tool."
},
"phpnexus.staticAnalysis.tool": {
"type": "string",
"enum": [
"phpstan",
"psalm",
"phpmd",
"mago"
],
"default": "phpstan",
"markdownDescription": "CLI used by **PhpNexus: Static analysis** commands. PHPStan, Psalm, and PHPMD are invoked with `phpnexus.phpPath`; Mago uses `phpnexus.mago.path`. PHPStan discovers `phpstan.neon` / `phpstan.dist.neon` (and related) in the workspace folder on its own. PHPMD picks `phpmd.xml` / `phpmd.ruleset.xml` / `.phpmd.xml` / `config/phpmd.xml` when present; otherwise built-in rulesets. Use project config (`psalm.xml`, `mago.toml`, …) instead of duplicating rules in settings; for a non-standard PHPStan config path, pass `--configuration` and the file via `phpnexus.staticAnalysis.extraArgs`."
},
"phpnexus.staticAnalysis.phpstan.path": {
"type": "string",
"default": "vendor/bin/phpstan",
"description": "Path to PHPStan (relative to the workspace folder or absolute)."
},
"phpnexus.staticAnalysis.psalm.path": {
"type": "string",
"default": "vendor/bin/psalm",
"description": "Path to Psalm (relative to the workspace folder or absolute)."
},
"phpnexus.staticAnalysis.phpmd.path": {
"type": "string",
"default": "vendor/bin/phpmd",
"description": "Path to PHPMD (relative to the workspace folder or absolute)."
},
"phpnexus.staticAnalysis.extraArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Extra CLI arguments: inserted after default flags for PHPStan/Psalm/PHPMD, or after `mago analyze --reporting-format json` for Mago."
},
"phpnexus.views.suppressPhpactorUndefined": {
"type": "string",
"enum": [
"off",
"allViewFiles"
],
"default": "off",
"markdownDescription": "Phpactor `undefined_variable` in view-template PHP paths: **off** (default) — show all LS diagnostics. **allViewFiles** — hide those warnings under a `views` directory (noise reduction only)."
}
}
},
"debuggers": [
{
"type": "php",
"label": "PHP Xdebug",
"languages": [
"php"
],
"configurationAttributes": {
"Launch": {
"required": [
"program",
"stopOnEntry"
],
"properties": {
"program": {
"type": "string",
"description": "PHP script to debug"
},
"stopOnEntry": {
"type": "boolean",
"default": true
},
"port": {
"type": "number",
"default": 9003
},
"hostname": {
"type": "string",
"default": "localhost"
},
"Idekey": {
"type": "string",
"default": "phpnexus"
}
}
}
}
}
],
"taskDefinitions": [
{
"type": "php",
"required": [
"script"
],
"properties": {
"script": {
"type": "string",
"description": "PHP script to run"
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arguments to pass to the script"
},
"cwd": {
"type": "string",
"description": "Working directory"
}
}
}
],
"commands": [
{
"command": "phpnexus.phpactor.menu",
"title": "PhpNexus: Phpactor Menu",
"category": "PhpNexus"
},
{
"command": "phpnexus.xdebug.configure",
"title": "PhpNexus: Configure Xdebug",
"category": "PhpNexus"
},
{
"command": "phpnexus.xdebug.showSetup",
"title": "PhpNexus: Show Xdebug Setup Instructions",
"category": "PhpNexus"
},
{
"command": "phpnexus.phpunit.run",
"title": "PhpNexus: Run PHPUnit Tests",
"category": "PhpNexus"
},
{
"command": "phpnexus.phpunit.runFile",
"title": "PhpNexus: Run PHPUnit Tests in File",
"category": "PhpNexus"
},
{
"command": "phpnexus.phpunit.revealLastProfile",
"title": "PhpNexus: Reveal last test profiler output",
"category": "PhpNexus"
},
{
"command": "phpnexus.lint",
"title": "PhpNexus: Lint Document",
"category": "PhpNexus"
},
{
"command": "phpnexus.composer.menu",
"title": "PhpNexus: Composer Menu",
"category": "PhpNexus"
},
{
"command": "phpnexus.views.phpactorTemplatesHelp",
"title": "PhpNexus: Template Variables (Phpactor)",
"category": "PhpNexus"
},
{
"command": "phpnexus.staticAnalysis.runFile",
"title": "PhpNexus: Static analysis — current file",
"category": "PhpNexus",
"icon": "$(shield)"
},
{
"command": "phpnexus.staticAnalysis.runProject",
"title": "PhpNexus: Static analysis — project",
"category": "PhpNexus",
"icon": "$(root-folder)"
}
],
"menus": {
"editor/title": [
{
"when": "editorLangId == php && resourceScheme == file",
"command": "phpnexus.staticAnalysis.runFile",
"group": "navigation@phpnexusStatic"
},
{
"when": "editorLangId == php",
"command": "phpnexus.staticAnalysis.runProject",
"group": "navigation@phpnexusStaticProject"
}
],
"editor/context": [
{
"when": "editorLangId == php && resourceScheme == file",
"command": "phpnexus.staticAnalysis.runFile",
"group": "phpnexus@static"
},
{
"when": "editorLangId == php",
"command": "phpnexus.staticAnalysis.runProject",
"group": "phpnexus@static"
}
],
"explorer/context": [
{
"when": "resourceExtname == .php",
"command": "phpnexus.staticAnalysis.runFile",
"group": "phpnexus@static"
},
{
"when": "explorerResourceIsFolder",
"command": "phpnexus.staticAnalysis.runProject",
"group": "phpnexus@static"
}
]
}
}
}