xref: /plugin/combo/contrib.md (revision f01167be7277066b5b5529f713f86d345e2b73f4)
1# Contrib
2
3
4
5## Main
6
7The main entrypoint is the [docustom.php action script](action/docustom.php). ie
8(ie a `do` custom action) that takes over action such as `show` (default).
9
10
11
12
13## Laptop Dev Installation Steps
14
15
16* Clone Dokuwiki to get:
17  * the base DokuWikiTest class
18  * and `_test\phpunit.xml`
19```bash
20git clone https://github.com/dokuwiki/dokuwiki combo
21cd combo
22```
23* Clone Combo
24```bash
25cd lib/plugins/
26git clone git@github.com:ComboStrap/combo
27```
28* Intellij
29    * add it as registered root (Intellij> Version Control > Directory Mapping)
30    * Set it as source root
31* Clone the tests
32```bash
33cd combo
34git clone git@github.com:ComboStrap/combo_test.git _test
35```
36* Install phpunit
37```bash
38cd dokuwiki/_test
39composer install
40```
41
42### Intellij Php WSL
43
44
45Following [](https://www.jetbrains.com/help/phpstorm/how-to-use-wsl-development-environment-in-product.html#open-a-project-in-wsl)
46
47* Install the plugin PHP WSL Support
48* Add Php Cli Interpreter on WSL. Intellij > Settings > Php > Cli Interpreter
49* Firewall from an elevated PowerShell
50```powershell
51New-NetFirewallRule -DisplayName "WSL" -Direction Inbound  -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))"  -Action Allow
52Get-NetFirewallProfile -Name Public | Get-NetFirewallRule | where DisplayName -ILike "IntelliJ IDEA*" | Disable-NetFirewallRule
53```
54* Intellij > Settings > Php > Test Framework
55```yaml
56Use_autoloaoder: combo\_test\vendor\autoload.php
57Use_default_configuration_file: combo/_test/phpunit.xml
58Use_default_bootstrap_file: combo/lib/plugins/combo/_test/bootstrap.php
59```
60* Intellij Test Runner Configuration
61```yaml
62Use_alternative_configuration_file: combo/_test/phpunit.xml
63Use_alternative_bootstrap_file: combo/lib/plugins/combo/_test/bootstrap.php
64```
65* Install Xdebug
66