PHPunit and VScode intelephense setup information in readme file

This commit is contained in:
Clemens Schwaighofer
2023-10-04 18:26:47 +09:00
parent 2f81009a97
commit d632a2599e
2 changed files with 23 additions and 0 deletions

1
.gitignore vendored
View File

@@ -0,0 +1 @@
.libs

View File

@@ -92,3 +92,25 @@ Loads classes internal (not passed in, not extend)
* \CoreLibs\Admin\EditBase loads \CoreLibs\Template\SmartyExtend, \CoreLibs\Output\Form\Generate
* \CoreLibs\Output\From\Generate loads \CoreLibs\Debug\Logging, \CoreLibs\Language\L10n if not passed on
* \CoreLibs\Output\From\Generate loads \CoreLibs\Output\From\TableArrays
## PHP unit testing and Intelephense
Intelephense can not directly read phar files so we do the following
In the workspace root we have `.libs/`, be in the workspace folder not the `.libs/` folder
`php -r "(new Phar('/path/to/.phive/phars/phpunit-9.6.13.phar'))->extractTo('.libs/phpunit/');"`
andd add in vscode Intelephense > Enviroment: Include Paths (intelephense.environment.includePaths)
```json
"intelephense.environment.includePaths": [
"/.libs/phpunit/"
]
```
Add `.libs` to the master .gitingore
### Update phpunit
On a version update the old phpunit folder in .libs has to be removed and the new version extracted again