Skip to content

Commit e7412ac

Browse files
committed
Add phpstorm documentation with Docker and MacOS
1 parent ebe6b53 commit e7412ac

10 files changed

+71
-0
lines changed

Diff for: doc/images/ps-mac-php-cli-add-interpreter.png

413 KB
Loading

Diff for: doc/images/ps-mac-php-interpreter.png

520 KB
Loading

Diff for: doc/images/ps-mac-php-phpunit-config.png

403 KB
Loading

Diff for: doc/images/ps-mac-php-phpunit-demo.png

594 KB
Loading

Diff for: doc/images/ps-mac-php-phpunit.png

562 KB
Loading

Diff for: doc/images/ps-mac-php-xdebug-demo.png

559 KB
Loading

Diff for: doc/images/ps-mac-php-xdebug-proxy.png

461 KB
Loading

Diff for: doc/images/ps-mac-php-xdebug-server.png

525 KB
Loading

Diff for: doc/images/ps-mac-php-xdebug.png

646 KB
Loading

Diff for: doc/phpstorm-macosx.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Configure PHPStorm with MacOS
2+
3+
Inspired from this following links :
4+
5+
- [Running PHPUnit Tests in PhpStorm with Docker](https://www.youtube.com/watch?v=I7aGWO6K3Ho)
6+
- [All hail Xdebug and lets let var dump die](http://jamescowie.me/blog/2016/12/all-hail-xdebug-and-lets-let-var-dump-die/)
7+
8+
## Edit PHP configuration
9+
10+
![PHP CLI Interpreter](images/ps-mac-php-interpreter.png)
11+
12+
## Add a PHP interpreter
13+
14+
![Add PHP CLI Interpreter](images/ps-mac-php-cli-add-interpreter.png)
15+
16+
## Configure PHPUnit
17+
18+
![PHPUnit](images/ps-mac-php-phpunit.png)
19+
20+
### Add test configuration
21+
22+
![PHPUnit Config](images/ps-mac-php-phpunit-config.png)
23+
24+
### PHPUnit Demo
25+
26+
![PHPUnit Demo](images/ps-mac-php-phpunit-demo.png)
27+
28+
## Configure XDebug
29+
30+
### Edit `etc/php.ini` file
31+
32+
Add this following lines :
33+
34+
```sh
35+
[xdebug]
36+
xdebug.remote_host = 10.254.254.254
37+
xdebug.remote_port = 9000
38+
xdebug.remote_autostart=1
39+
xdebug.idekey = PHPSTORM
40+
xdebug.remote_enable = 1
41+
xdebug.remote_connect_back = 0
42+
xdebug.profiler_enable = 1
43+
```
44+
45+
### Check Debug section
46+
47+
![Xdebug](images/ps-mac-php-xdebug.png)
48+
49+
### Add a debug server
50+
51+
![XDebug Server](images/ps-mac-php-xdebug-server.png)
52+
53+
### Configure XDebug Proxy
54+
55+
Create an IP Alias :
56+
57+
```sh
58+
sudo ifconfig en0 alias 10.254.254.254 255.255.255.0
59+
```
60+
61+
![Xdebug Proxy](images/ps-mac-php-xdebug-proxy.png)
62+
63+
To delete an IP Alias :
64+
65+
```sh
66+
sudo ifconfig en0 -alias 10.254.254.254
67+
```
68+
69+
### XDebug Demo
70+
71+
![XDebug Demo](images/ps-mac-php-xdebug-demo.png)

0 commit comments

Comments
 (0)