ãPhpStormã§å§ããå¿«é©ãªWebã¢ããªã±ã¼ã·ã§ã³éçºãã«ã¤ãã¦è©±ãã¦ãã #phpcon2013
å æ¥ã®PHP Conference 2013ã§PhpStormã®ä¾¿å©ãªæ©è½ã¨ãããã¬ã¼ã ã¯ã¼ã¯éçºã§ã®å°ãã¿ã¨ãã«ã¤ãã¦è©±ãã¦ãã¾ããã éãããæéã ã£ãã®ã§ç¢ç¶ãæ©ã«ãªã£ã¦ãã¾ã£ã¦ããã¡ãã§è©³ç´°æ¸ãã¦ã¿ã¾ãã
PhpStorm à Framework
Symfony2
å¼·åãªã³ã¼ãè£å®ããµãã¼ããã¦ãããSymfony2ç¨ã®ãã©ã°ã¤ã³ã§ãã xml/yamlãã¡ã¤ã«å ã§ã®ã¸ã£ã³ãã¨ãããµãã¼ããã¦ããã¾ãã
ãããªæãã§ããµã¼ãã¹ã³ã³ããããåå¾ããã¯ã©ã¹ã«å¯¾ãã¦ãã³ã¼ãè£å®ãã¦ãããããã¾ãã
詳ããè¨å®ã使ãæ¹ã¯ãã¡ããåèã«ãªãã¾ãã
PhpStromã®Symfony2 Pluginã«ããå ¥åè£å®ã便å©ããã
CakePHP
ç§ãå人çã«ä½ã£ã¦ããCakePHPç¨ã®ãã©ã°ã¤ã³ã§ãã1.3ç³»ã2ç³»å ±ã«åãã¾ãã
ControllerâViewãViewâElementãModel/ControllerâTestCaseãªã©ã®ãã¡ã¤ã«éã¸ã£ã³ãã$this->render()ãã¦ãããã³ãã¬ã¼ããã¡ã¤ã«ã¸ã®ã¸ã£ã³ãããµãã¼ããã¾ãã
詳細ã®ä½¿ãæ¹ã¯ãã¡ããåç §ãã¦ãã ããã
PhpStormã®CakePHPãã©ã°ã¤ã³ãCakeStormãä½ã£ã¦ã¿ã¾ãã
Laravel
ä¸æéæããã¾ãããä¸ã®Helperãè¨å®ãã¦ããã¨å種ã¯ã©ã¹ã§ã®ã³ã¼ãè£å®ããã¦ããã¾ãã
ãã®ä»ãã¬ã¼ã ã¯ã¼ã¯ãªã©
å°ç¨ãã©ã°ã¤ã³ããªããã¬ã¼ã ã¯ã¼ã¯ã§ããPhpDocããã£ããæ¸ãã°ç¹æ®ãªå¼ã³åºãæ¹ããã¦ããã¯ã©ã¹ãããã³ã¼ãè£å®ãã¦ããã¾ãã
ä¾ãã°ãCodeIgniterã¨ãã§ã¯
@property Search_model $Search_model
ã®ãããªå½¢ã§ã@propertyã¢ããã¼ã·ã§ã³ãæå®ãã¦ããã¨ã
ãã®ããã«ã$this->Search_modelã®ãããªå¼ã³åºãã®å½¢ã§ãã³ã¼ãè£å®ãã¦ããã¾ãã
PhpStormã§ä¾¿å©ãªæ©è½
便å©æ©è½ã¯ãã¡ããã¡ãå¤ããã§ããããé«æ©è½ããã¦ææ¡ããããªã・・・ãã¨ãããããªæ¹ã¯å¤ãã¨æãã¾ãã ããã§ãå人çã«ãã使ãã³ãã³ããã ãã¤ãã¼ã ãã©ä¾¿å©ã ãªã¼ã£ã¦æãæ©è½ãå¹¾ã¤ãç´¹ä»ãã¾ãã
ã¾ããæ©è½ã¯å ¨ã¦ã¢ã¯ã·ã§ã³ã®æ£å¼å称ã®ã¾ã¾è¡¨è¨ãã¦ããã®ã§ã æ°ã«ãªã£ãã·ã§ã¼ãã«ãããªã©ã¯[Preferences]-[Keymap]ããæ¤ç´¢ããã¨ããè¦ã¤ããã¨æãã¾ãã
æ©è½åã®æ¨ªã®()ã¯Windowsç°å¢ã§ã®ããã©ã«ãã·ã§ã¼ãã«ããã表ãã¦ãã¾ãã
Find Action (Ctrl+Shift+A)
PHPã¨ã³ã¸ãã¢é¤æèªæ¬ã§ããã¨ããã®ãæå¼·ã³ãã³ããã§ãã PhpStormå ã§å®è¡ãããã¢ã¯ã·ã§ã³ãããã§å ¥åããã¨ãããã«ããããã or è¿ããã¢ã¯ã·ã§ã³ãä¸è¦§ã§è¡¨ç¤ºãã¦ããã¾ãã ãªã®ã§ãåæ©è½ãã¨ã®ã·ã§ã¼ãã«ãããè¦ããããªãã¦ãããã®ã³ãã³ãã®ã·ã§ã¼ãã«ããããè¦ãã¦ããã°ä¸éãã®ãã¨ãå¯è½ã«ãªãã¾ãã
ä¾ãã°ãGitã«PUSHãããã¨ãã¯Ctrl+Shift+A â "push"ã¨å ¥åããã¨
ãã®ããã«ãªããç½®æãä¸æ¬ç½®æãè¡ãããã¨ãã¯Ctrl+Shift+A â "replace"ã¨å ¥åããã¨
ãã®ãããªå½¢ã§ãå®è¡å¯è½ãªã¢ã¯ã·ã§ã³ãä¸è¦§ã§è¡¨ç¤ºãã¦ããã¾ãã
Jump to Class (Ctrl+N) / Jump to File (Ctrl+Shift+N)
ããããã¯ã©ã¹åããã¡ã¤ã«åãæå®ãã¦ç´ã«ãã¡ã¤ã«ã«ã¸ã£ã³ãåºæ¥ãæ©è½ã§ãã 1æåå ¥åæ¯ã«ãã¡ã¤ã«ä¸è¦§ãé«éã§ãµã¸ã§ã¹ããã¦ããã¾ãã å人çã«ã¯JetBrainsç³»IDEã®ééå³ã¨è¨ã£ã¦ãéè¨ã§ã¯ãªããããã®è¶ æç¨æ©è½ã ã¨æãã¾ãã ã¡ãªã¿ã«PhpStorm7ãããã¡ã¤ã«ã®ãµã¸ã§ã¹ããè¶ é«éã«ãªã£ã¦ã¾ãã
ãããã"Account"ã¨ããåèªããä¸ãJump to Classãä¸ãJump to Fileã§çµãè¾¼ãã ç¶æ ã§ãã æ©è½ã®ååã®éããJump to Classã¯ã¯ã©ã¹åã«Accountãå«ã¾ãããã¡ã¤ã«ã Jump to Fileã¯ãã¡ã¤ã«åã«Accountãå«ã¾ãããã¡ã¤ã«ãä¸è¦§ã§è¡¨ç¤ºãã¦ããã¾ãã
Go to Decralation (Ctrl+B)
å¤æ°ãã¯ã©ã¹ãã¡ã½ããã®å®ç¾©å ã«ã¸ã£ã³ãããæ©è½ã§ããVimçã§ããã¨ããã®"gf"ã³ãã³ãã«ç¸å½ãã¾ãã
ä¾ãã°ãCakeEventã¯ã©ã¹ä¸ã®Ctrl+Bãæ¼ããã¨ã«ãããCakeEventã¯ã©ã¹ã®å®ç¾©ç®æã¾ã§ã¸ã£ã³ããããã¨ãåºæ¥ã¾ãã åæ§ã«ã¡ã½ãããå¤æ°ããåç §å¯è½ãªç¯å²ã§ããã°ã¸ã£ã³ãåºæ¥ã¾ãã
Recent Files (Ctrl+E)
PhpStormä¸ã§ç´è¿ã«éãããã¡ã¤ã«å±¥æ´ã表示ãã¦ããã¾ãã æ®æ®µéçºããã¦ããã¨åããããªãã¡ã¤ã«ãä½åãè¡ãæ¥ãããã¨ã¯å¤ãã®ã§ã使ç¨é »åº¦ã¯ããªãé«ãã§ãã
é¡ä¼¼ã³ãã³ãã§Recent Changed Filesã¨ãããã®ãããããã¡ãã¯ãç´è¿ã«ç·¨éãããã¡ã¤ã«ãå±¥æ´ã表示ãã¦ãããã®ã§ãç¨éãåãã¦ä½¿ãåããã¨ããã§ãã
èªåã¢ãããã¼ã
ç§ã¯ããã¼ã«ã«ã®Macä¸ã§PhpStormãç«ã¡ããã¦éçºãããéçºç¨ã®ãµã¼ãã«ã³ã¼ããç½®ãã¦å®è¡ãã®ãããªã¹ã¿ã¤ã«ã§éçºãã¦ãã¾ããã ãã¡ã¤ã«ãç·¨éãã度ã«æåã§ã¢ãããã¼ãããªããã°ãªããªãã®ã¯æ»ã¬ã»ã©è¦çã§ãã
PhpStormä¸ã§ã¯ã"ãã¡ã¤ã«ã«å·®åãçºçãããèªåçã«ã¢ãããã¼ã"ãã¦ãããæ©è½ãããã®ã§ããã¡ããè¨å®ãã¦ããã¨ä¾¿å©ã§ãã
ä¸è¨ãªããã«ããµã¼ãã«åãããå½¢ã§Deployment Serverãè¨å®ãã¦ããã [Tools]-[Deployment]-[Automatic Upload(always)]ã«ãã§ãã¯ãå ¥ãã¦ããã°okã§ãã
ã¾ããGitä¸ã§ãã©ã³ãã移åããéã«ããã©ã³ãã®å·®åãã¡ã¤ã«ã®ã¿ãèªåã¢ãããã¼ããã¦ãããæ©è½ãããã¾ãã ãã®éã¯ã以ä¸ã®ããã«[Tools]-[Deployment]-[Options]ãã[Upload external changes]ã«ãã§ãã¯ãå ¥ãã¦ããã°æå¹ã«ãªãã¾ãã
Local History
PhpStormä¸ã§ç·¨éãããã¡ã¤ã«ãããã¡ã¤ã«æ¯ã«æç³»åã§ç·¨éå±¥æ´ãé²è¦§ãããã¨ãåºæ¥ã¾ãã ãGitã«ã³ããããã¦ãªãã£ããã©ãä»æã®æç¹ã«æ»ãããã»ã»ã»ãã¿ãããªã¨ãã«ã便å©ã§ãã ã¾ããããããæ©è½ããããã¨ãç¥ã£ã¦ããã ãã§ãããã¨ããã¨ãã®ä¿éºã«ãªãã¾ãã®ã§æ¯éæ¼ããã¦ããã¾ãããã
ãªã¢ã¼ããããã°
EclipseãNetbeansãªã©ã®IDEã¨åæ§ãPhpStormã§ããªã¢ã¼ããããã°ãå¯è½ã§ãã é¢åãªè¨å®ãã»ã¼ä¸è¦ãªã®ã¨ãã³ã¼ãã®åçå®è¡ãå¯è½ãªç¹ãä»ããåªãã¦ãã¾ãã
ãªã¢ã¼ããããã°ã®è¨å®ã«ã¤ãã¦ã¯ãã¡ããåèã«ãªãã¾ãã
Zero-configuration Web Application Debugging with Xdebug and PhpStorm
ã³ã¼ãã®åçå®è¡ã¯ãããã¬ã¤ã¯ãã¤ã³ãã§åæ¢ããç®æã§ä»»æã®PHPã³ã¼ããå®è¡åºæ¥ããæ©è½ã§ãã ã©ããªå½¢å¼ã§è¿ã£ã¦ããã®ã試ãããé¢æ°ããè¤éãªã³ã¼ãã§ã©ãããéä¸çµæã帰ã£ã¦ãã¦ãã®ãç¥ããããããªå ´åã«ä¾¿å©ã§ãã ãã¡ãããåæ¢ç®æã§ä¿æãã¦ããå¤æ°ãåç §ãã¦å®è¡ãããã¨ãå¯è½ã§ãã
ä¾ãã°ãCakePHPã§ã¯find()ã¡ã½ããã§Databaseããä»»æã®ãã¼ã¿ãåå¾åºæ¥ã¾ããããåå¾æ¡ä»¶ãå¤ããæã«ã©ããªå¤ãè¿ã£ã¦ããã®ã試ããããã¿ãããªãã¨ã¯å¤ã ããã¾ãã ãã®ãããªã¨ãã¯ãä»»æã®ç®æããã¬ã¼ã¯ãã¤ã³ããè²¼ã£ã¦æ¢ãã¦ãããå®è¡ä¸ã®ãã©ã°ã©ã ã§
$this->Search->find('all', array( 'contain' => false, 'conditions' => array( 'Search.created <' => $today ) ));
ã®ãããªç®æãé¸æãã[Evaluate Expression]ã®ã³ãã³ããå®è¡ããã¨
ãã®ãããªå½¢ã§å®è¡çµæãè¦ãã¾ãã