brew install php71 --without-apache --with-fpm
brew install php71-opcache
brew install php71-mcrypt
brew install php71-xdebug
$(brew --prefix gettext)/bin/envsubst < ~/ts_environment/config/php-ts.ini > $(brew --prefix)/etc/php/php71/conf.d/php-ts.ini
brew services start php70
PHP Configuration file including xdebug is here: https://github.com/thinkshout/ts_environment/blob/master/config/php-ts.ini
After install, change xdebug from port 9000 to 9001 in Preferences -> PHP -> Debugger (Unless your Debug port is 9000? :)
here's a setup of PHPStorm for WordPress, Drupal is similar but slightly different.
- Navigate to Settings | Languages & Frameworks | PHP | WordPress.
- Check "Enable WordPress Integration".
- Click "..." and choose your WordPress Installation Path. (It's probably located at
~/Sites/tror/web/wp)
- Navigate to Settings | Languages & Frameworks | PHP.
- Set PHP language level: 7.
- Make sure your CLI Interpreter also specifies PHP 7.
- If not, click the refresh button, or click "..." and find your php executable. (It's probably located at
/usr/local/bin/php)
When WordPress integration is enabled, PHPStorm will automatically offer to set WordPress Code Style based on the coding standards. Just click the popup to "set it".
- If you miss this opportunity, navigate to Settings | Editor | Code Style | PHP.
- Click Set from... | Predefined Style | WordPress.
Note: you may need to manually set lower case true/false and null in Settings | Editor | Code Style | PHP | Other.
Pro-tip! Press option+command+L any time to reformat the current file. (If you're formatting an entire existing file, please try to remember to commit all the formatting separately from other changes. This makes code review and history browsing much easier.)
- Download the latest release of WordPress Coding Standards, or clone the repository anywhere on your machine.
- Move the "WordPress" and all of the "WordPress-*" subdirectories within this project to
/usr/local/etc/php-code-sniffer/Standards. - Navigate to Settings | Editor | Inspections | PHP | PHP Code Sniffer Validation.
- Click the refresh button next to "Coding standard" to make PHPStorm aware of the new standards.
- Choose "WordPress-Extra".
https://confluence.jetbrains.com/display/PhpStorm/WordPress+Development+using+PhpStorm