diff --git a/doc/images/ps-mac-php-cli-add-interpreter.png b/doc/images/ps-mac-php-cli-add-interpreter.png new file mode 100644 index 0000000..46b5aca Binary files /dev/null and b/doc/images/ps-mac-php-cli-add-interpreter.png differ diff --git a/doc/images/ps-mac-php-interpreter.png b/doc/images/ps-mac-php-interpreter.png new file mode 100644 index 0000000..48ba727 Binary files /dev/null and b/doc/images/ps-mac-php-interpreter.png differ diff --git a/doc/images/ps-mac-php-phpunit-config.png b/doc/images/ps-mac-php-phpunit-config.png new file mode 100644 index 0000000..fb64c33 Binary files /dev/null and b/doc/images/ps-mac-php-phpunit-config.png differ diff --git a/doc/images/ps-mac-php-phpunit-demo.png b/doc/images/ps-mac-php-phpunit-demo.png new file mode 100644 index 0000000..c76b06d Binary files /dev/null and b/doc/images/ps-mac-php-phpunit-demo.png differ diff --git a/doc/images/ps-mac-php-phpunit.png b/doc/images/ps-mac-php-phpunit.png new file mode 100644 index 0000000..a9bff94 Binary files /dev/null and b/doc/images/ps-mac-php-phpunit.png differ diff --git a/doc/images/ps-mac-php-xdebug-demo.png b/doc/images/ps-mac-php-xdebug-demo.png new file mode 100644 index 0000000..9d520de Binary files /dev/null and b/doc/images/ps-mac-php-xdebug-demo.png differ diff --git a/doc/images/ps-mac-php-xdebug-proxy.png b/doc/images/ps-mac-php-xdebug-proxy.png new file mode 100644 index 0000000..6c88dca Binary files /dev/null and b/doc/images/ps-mac-php-xdebug-proxy.png differ diff --git a/doc/images/ps-mac-php-xdebug-server.png b/doc/images/ps-mac-php-xdebug-server.png new file mode 100644 index 0000000..77014ce Binary files /dev/null and b/doc/images/ps-mac-php-xdebug-server.png differ diff --git a/doc/images/ps-mac-php-xdebug.png b/doc/images/ps-mac-php-xdebug.png new file mode 100644 index 0000000..08da762 Binary files /dev/null and b/doc/images/ps-mac-php-xdebug.png differ diff --git a/doc/phpstorm-macosx.md b/doc/phpstorm-macosx.md new file mode 100644 index 0000000..177946d --- /dev/null +++ b/doc/phpstorm-macosx.md @@ -0,0 +1,71 @@ +# Configure PHPStorm with MacOS + +Inspired from this following links : + +- [Running PHPUnit Tests in PhpStorm with Docker](https://www.youtube.com/watch?v=I7aGWO6K3Ho) +- [All hail Xdebug and lets let var dump die](http://jamescowie.me/blog/2016/12/all-hail-xdebug-and-lets-let-var-dump-die/) + +## Edit PHP configuration + +![PHP CLI Interpreter](images/ps-mac-php-interpreter.png) + +## Add a PHP interpreter + +![Add PHP CLI Interpreter](images/ps-mac-php-cli-add-interpreter.png) + +## Configure PHPUnit + +![PHPUnit](images/ps-mac-php-phpunit.png) + +### Add test configuration + +![PHPUnit Config](images/ps-mac-php-phpunit-config.png) + +### PHPUnit Demo + +![PHPUnit Demo](images/ps-mac-php-phpunit-demo.png) + +## Configure XDebug + +### Edit `etc/php.ini` file + +Add this following lines : + +```sh +[xdebug] +xdebug.remote_host = 10.254.254.254 +xdebug.remote_port = 9000 +xdebug.remote_autostart=1 +xdebug.idekey = PHPSTORM +xdebug.remote_enable = 1 +xdebug.remote_connect_back = 0 +xdebug.profiler_enable = 1 +``` + +### Check Debug section + +![Xdebug](images/ps-mac-php-xdebug.png) + +### Add a debug server + +![XDebug Server](images/ps-mac-php-xdebug-server.png) + +### Configure XDebug Proxy + +Create an IP Alias : + +```sh +sudo ifconfig en0 alias 10.254.254.254 255.255.255.0 +``` + +![Xdebug Proxy](images/ps-mac-php-xdebug-proxy.png) + +To delete an IP Alias : + +```sh +sudo ifconfig en0 -alias 10.254.254.254 +``` + +### XDebug Demo + +![XDebug Demo](images/ps-mac-php-xdebug-demo.png) \ No newline at end of file