pwuser1 Posted December 15, 2017 Share Posted December 15, 2017 Hi, What do you recommend to be the best paid PHP editor? Code completion included. Link to comment Share on other sites More sharing options...
Kiwi Chris Posted December 15, 2017 Share Posted December 15, 2017 I'm not sure if it's the 'best', but I use Netbeans, although the way Processwire is structured, some possible code completion isn't available, eg if you select a variable like $page, it can't give you a list of page fields, as they're defined in the database rather than in code. With some other CMSs where you have to define a page class for the equivalent of each template in Processwire, you'd get access to those properties. It's not a biggie, as I generally know what fields I've defined for a template. Netbeans has PHP documentation built in which can be handy. 3 Link to comment Share on other sites More sharing options...
pwuser1 Posted December 15, 2017 Author Share Posted December 15, 2017 @Kiwi Chris does NetBeans PHP debug support conditional breakpoints? Link to comment Share on other sites More sharing options...
EntitySelf Posted December 15, 2017 Share Posted December 15, 2017 I am a very happy PhpStorm user. 3 Link to comment Share on other sites More sharing options...
bernhard Posted December 15, 2017 Share Posted December 15, 2017 On 12/15/2017 at 5:03 AM, Kiwi Chris said: With some other CMSs where you have to define a page class for the equivalent of each template in Processwire, you'd get access to those properties. It's not a biggie, as I generally know what fields I've defined for a template. Expand Just had an idea: what if we created a module that creates some kind of static file that the IDE can read listing all fields of a given template. Maybe we could also extend this module to parse all hooks even for properties that where added via a hook does anyone need a challenge for christmas? to your question, pwuser1 (welcome btw): some use phpstorm, some vscode, some sublime, some atom... 6 Link to comment Share on other sites More sharing options...
adrian Posted December 15, 2017 Share Posted December 15, 2017 On 12/15/2017 at 10:43 AM, bernhard said: ust had an idea: what if we created a module that creates some kind of static file that the IDE can read listing all fields of a given template. Maybe we could also extend this module to parse all hooks even for properties that where added via a hook Expand I am tempted to add this to Tracy 8 Link to comment Share on other sites More sharing options...
bernhard Posted December 15, 2017 Share Posted December 15, 2017 On 12/15/2017 at 10:56 AM, adrian said: I am tempted to add this to Tracy Expand would be a perfect fit as every developer should use tracy anyhow no idea how different the IDEs work or how difficult that would be (i guess it should not be too hard?), but it would be great to support different IDEs of course. at least vscode 2 Link to comment Share on other sites More sharing options...
codelearner Posted December 15, 2017 Share Posted December 15, 2017 @bernhard I tried PHPStorm, Sublime Text but these paid editor does not offer siginificant advantages to Atom, VSCode, and even Brackets. The issue with with the most unpaid one is which plugins to use for PHP some of them overlap. So does anybody know how to setup Atom Editor for PHP and PW correctly? If there is a better alternative to Atom please let me know. 2 Link to comment Share on other sites More sharing options...
bernhard Posted December 15, 2017 Share Posted December 15, 2017 On 12/15/2017 at 2:19 PM, codelearner said: @bernhard I tried PHPStorm, Sublime Text but these paid editor does not offer siginificant advantages to Atom, VSCode, and even Brackets. The issue with with the most unpaid one is which plugins to use for PHP some of them overlap. So does anybody know how to setup Atom Editor for PHP and PW correctly? If there is a better alternative to Atom please let me know. Expand there's a thread for phpstorm and vscode - feel free to open one for atom... 1 Link to comment Share on other sites More sharing options...
Kiwi Chris Posted December 15, 2017 Share Posted December 15, 2017 On 12/15/2017 at 9:19 AM, pwuser1 said: @Kiwi Chris does NetBeans PHP debug support conditional breakpoints? Expand Unfortunaely no. Netbeans integrates with Xdebug which does support conditional breakpoints, but somehow it hasn't made it into Netbeans yet even though it's been a feature request for years. It seems like yet another open source project mismanaged by Oracle. Perhaps now Netbeans is moving to Apache there might be some progress on this. 2 Link to comment Share on other sites More sharing options...
Kiwi Chris Posted December 15, 2017 Share Posted December 15, 2017 If you want a free IDE with code completion and conditional breakpoints, it might be worth trying Visual Studio Code. It's considered more an editor than a full blown IDE, but it supports intellisense (Microsoft's version of code-completion) and It's cross-platform, and unlike Netbeans, it does support Xdebug's conditional breakpoints and quite a bit more. I think the full-blown Visual Studio supports PHP debugging too, but Visual Studio is a bit of a monster and Windows only, so you probably need to be using it for other development already to justify it. 4 Link to comment Share on other sites More sharing options...
pwuser1 Posted December 16, 2017 Author Share Posted December 16, 2017 @codelearner mentioned Atom, any advantage of Atom vs VSCode @Kiwi Chris? Link to comment Share on other sites More sharing options...
pwuser1 Posted December 17, 2017 Author Share Posted December 17, 2017 Codelobster PHP edition appears to be the best. Link to comment Share on other sites More sharing options...
Kiwi Chris Posted December 17, 2017 Share Posted December 17, 2017 On 12/16/2017 at 12:45 AM, pwuser1 said: @codelearner mentioned Atom, any advantage of Atom vs VSCode @Kiwi Chris? Expand I haven't used Atom personally, but looking at the documentation, the PHP plugin looks like an early release and it doesn't mention debugging, but VSCode seems to support full debugging. Someone who's used Atom may be able to comment regarding debugging. 1 Link to comment Share on other sites More sharing options...
pwuser1 Posted December 17, 2017 Author Share Posted December 17, 2017 @Kiwi thanks for you helpful comments, full debugging matters so I think VSCode is better that way vs Atom, but check out Codelobster it's a PHP specialist. Link to comment Share on other sites More sharing options...
desbest Posted December 21, 2017 Share Posted December 21, 2017 I use Sublime Text Link to comment Share on other sites More sharing options...
DaveP Posted December 22, 2017 Share Posted December 22, 2017 FWIW it's Atom for me. Has got much better recently and seems much less of a resource hog than Netbeans et al. Also has a uiKit autocomplete plugin. Link to comment Share on other sites More sharing options...
theo Posted December 23, 2017 Share Posted December 23, 2017 On 12/15/2017 at 10:43 AM, bernhard said: Just had an idea: what if we created a module that creates some kind of static file that the IDE can read listing all fields of a given template. Expand Do mean something like this? https://modules.processwire.com/modules/template-stubs/ 2 Link to comment Share on other sites More sharing options...
adrian Posted December 23, 2017 Share Posted December 23, 2017 On 12/23/2017 at 12:28 PM, theo said: Do mean something like this? https://modules.processwire.com/modules/template-stubs/ Expand Nice find! That last comment suggests it's not working completely as expected. Have you tested it? Any issues? Link to comment Share on other sites More sharing options...
theo Posted December 23, 2017 Share Posted December 23, 2017 On 12/23/2017 at 1:19 PM, adrian said: Nice find! That last comment suggests it's not working completely as expected. Have you tested it? Any issues? Expand It works with Netbeans here. I can select the fieldnames from within the IDE. 1 Link to comment Share on other sites More sharing options...
adrian Posted December 23, 2017 Share Posted December 23, 2017 That looks awesome. I'll have to give it a go. If it's working as expected in all/most IDEs I don't think I'll worry about building this into Tracy unless you guys can think of a reason why it would be a better fit there - it's nice to have less modules to install I guess, so maybe that's enough of a reason? 3 Link to comment Share on other sites More sharing options...
theo Posted December 23, 2017 Share Posted December 23, 2017 I have only discovered this today. I have made a code template for netbeans. For the $page var, the template_name has to be filled in, then it should work with the template-stubs module. Hope it helps. /* ----------------------- ProcessWire API variables ------------------------ */ // <editor-fold> /* @var $page tpl_${template_name} */ /* @var $pages Pages */ /* @var $modules Modules */ /* @var $user User */ /* @var $users Users */ /* @var $permissions Permissions */ /* @var $roles Roles */ /* @var $input WireInput */ /* @var $sanitizer Sanitizer */ /* @var $session Session */ /* @var $log WireLog */ /* @var $cache WireCache */ /* @var $datetime WireDateTime */ /* @var $files WireFileTools */ /* @var $mail WireMail */ /* @var $config Config */ /* @var $database WireDatabasePDO */ /* @var $fields Fields */ /* @var $templates Templates */ /* @var $languages Languages */ /* @var $wire ProcessWire */ /* @var $wire \ProCache */ // </editor-fold> 1 Link to comment Share on other sites More sharing options...
szabesz Posted December 25, 2017 Share Posted December 25, 2017 On 12/23/2017 at 2:22 PM, adrian said: it's nice to have less modules to install I guess, so maybe that's enough of a reason? Expand +1 Plus @mindplay.dk last visited the forums in Oct 2015 and seems to be working on non-PW related projects. 1 Link to comment Share on other sites More sharing options...
Robin S Posted December 26, 2017 Share Posted December 26, 2017 We are getting off-topic here, but... On 12/23/2017 at 2:22 PM, adrian said: If it's working as expected in all/most IDEs I don't think I'll worry about building this into Tracy unless you guys can think of a reason why it would be a better fit there Expand If @mindplay.dk is not actively maintaining the module then I think it would be good to update it. It would be cool to have as an option in Tracy, or the module could be forked. I found that the module isn't working in PW3 where a namespace is declared at the top of template files. I had to modify the module code to add the namespace to stubs.php because the FileCompiler does not compile this file. Also, I'm probably overlooking something but I can't see why the module needs to rebuild the stubs file after every Session::redirect and every ProcessPageView::finished. On 12/23/2017 at 1:19 PM, adrian said: That last comment suggests it's not working completely as expected. Expand I think that comment is due to a misunderstanding of what the module is for. The module only adds code completion to $page for field names in the current template - it isn't intended to provide code completion for all API variables (for that you have to add a DocBlock in every template file with tags for each API variable). 4 Link to comment Share on other sites More sharing options...
pwuser1 Posted December 29, 2017 Author Share Posted December 29, 2017 sorry I posted to wrong thread I deleted my post. Link to comment Share on other sites More sharing options...
Recommended Posts