I'm testing pug-php (with laravel-pug) for use in a future project.
I'm using PHP expression syntax (I prefer it to JS expression syntax), but Pug plugin for PhpStorm is only for JS Syntax.
Can I configure PhpStorm for use PHP syntax and recognize PHP function like strtoupper($str).
This capture show errors and warnings marked by the IDE, but it code compile fine.
There is no support for pug-php in PhpStorm at the moment. We also did not receive any requests for this so it would be great if you could submit the feature request to our tracking system here: http://youtrack.jetbrains.com/issues/WI#newissue=yes.
You will be able to receive the answer directly from our developers while other users will be able to write their opinion of your proposal.
Related
Has anyone configured VS Code to show syntax/semantic errors in PHP development? Coming from full Visual Studio/C# world, I really miss this thing a lot. Currently I actually have to call my PHP function using a client, only to get a HTTP 500 error and then check server logs to see what went wrong. This is a huge pain. Going through all of this only to find for example that I didn't import a require namespace, is so frustrating.
I understand that PHP by design cannot detect all kinds of errors like C# at compile time (so to speak), but detecting functions that do not exist or not passing required parameters should be easy to catch.
Is there a plug-in or setting in VS Code that could handle syntax/semantic error in PHP code? I'm using Laravel on the server-side, if that matters.
Looks like I found something. I uninstalled PHP Intellisense extension this morning and installed PHP Intelephense and all seems to be far better. Not only that the syntax and semantic errors are highlighted, it automatically injects required namespaces too. And if that were not enough, Go To Definition (F12) command has started working correctly all of a suden. :)
Must-have extension for any PHP work in VSCode I'd say.
I'm starting a new project, for this project, I need a great IDE, which allows me to debug. I thought to aptana after some search.
But this project is a little specific, it has to work with a specific version of php and has not common extension(e.g. php_ingres), so I think I cannot use the internal server of aptana, otherwise it will not find every ingres function.
I've an EasyPhp environnement installed and working.
I've created a new "Simple server" and a new web browser configuration using this webserver(and chrome). But now when I try to debug it, I cannot see my browser configuration, it looks like it display only internal servers here. So is this possible to use aptana with easyphp? If yes, how?
If not, which IDE provide some auto-completion, debugging and allows me to use my own server?
Thank you very much
I think Netbeans can do your job, check this guide :
http://wiki.netbeans.org/HowToConfigureXDebug
Netbeans is great and is free too. But it maybe hard to figure your way around in that for a 1st time user. If money ain't a problem i'd suggest using phpDesigner 7 - http://www.mpsoftware.dk/phpdesigner.php. Easy and simple, with word completion, debugging features and also allows you to setup up an FTP connection to your servers so you can edit your files on the fly.(This method of editing files on the fly however may not be ideal if its mission critical data. I'd suggest using version control platforms like git, read more here - http://progit.org/book/ch1-1.html )
I finally used code lobster, which is not the best editor but can use easyPhp and actually debug into it.
I'm looking for a php syntax checker, preferably as an eclipse plugin, preferably be able to sort of compile it(at least find undefined variables in addition to syntax checking. Does such thing exist?
Every better IDE (PhpStorm, Eclipse/PDT, Eclipse/PHPEclipse, Netbeans with PHP-Plugin, and so on) comes with automatic syntax check built-in. At least PhpStorm is able to find undefined variables. The last time I used PDT it didn't support it. PHPEclipse seems to be not maintained anymore, so I assume, that it cannot find undefined variables too, and netbeans ... don't know.
If you just want to check the syntax the quick&dirty way, you can use the php-interpreter itself
php -l filename.php
Of course, look on this:
http://www.eclipse.org/pdt/
This IDE using php parser engine to syntax, and is for free :-).
But, better do not use the plugin version from update site, but All-In-One Package. At least previous versions from update site did not work too well...
Install phpEclipse for syntax-checking:
http://www.phpeclipse.com/
In PHP there is no such thing as an undefined variable. Variables are automatically initialized with null.
Zend Studio (custom Eclipse) also has a syntax checker, FWIW.
Our PHP Formatter parses PHP code to an AST, and then prettyprints the results. This can be used as a command-line script. If the source file isn't parsable, the tool exits with with an error (and doesn't prettyprint). So, if you ignore the prettyprint feature, this is precisely a command-line level syntax checker. Easy to launch from Eclipse.
Dreamweaver has been my favourite IDE for programming PHP for a while.
However we have recently updated our servers to work with php 5.3.x
Now everytime I use php 5.3 specific tags like namespace dreamweaver suggests that there is a syntax error.
I would like to be able to add the namespace as a valid tag or install a plugin which does that for me. If that can't be done it would be best if I could just disable the checking for errors.
Can anyone help me out?
Thanks in advance!
Dreamweaver CS5 PHP support is limited to PHP 5.2 (based on a couple of Google searches), and the syntax checker is not extensible, so no extension would be able to make that go away. I've seen in a couple of places that you can turn off the error checking by turning off the PHP related code hints (Edit [Dreamweaver on Mac] -> Preferences -> Code Hints), but I've not tried that. Of course, if that works, then you'll get no code hints for variables and functions defined in your code, so not sure that will be a good trade off. On the other hand, Dreamweaver does report that code hinting may not work until syntax errors are corrected.
Dreamweaver CS5.5 Dynamic Code HInting PHP support is updated to PHP 5.3
We have FireSymfony that allows one to view the Symfony, PHP variables in a firebug panel, so I wonder whether there is a similar extension that allows me to view PHP variables for general PHP apps ( not just Symfony apps)?
You may want to check out FirePHP. It is an extension to FireBug that allows sort of an extended logging of PHP through the Firefox Browser/Firebug Console.
Probably somewhat close to what you are looking for, even though you'd still have to make specific use of it in the PHP scripts.
I think that is part of what Symfony supports, exporting PHP variables to client side for debugging.
you see, PHP variables are located on the server, not at the client. Thus when you load the page, you won't be able to see the PHP variables from client side.
Thus if you want to debug PHP variables, you must have a way for your application to export the variables out to the client side for firebug or any other extension to debug.
In other words, it's not really possible for that to happen for ALL php applications.
Another option is Formaldehyde which integrates nicely with Firebug.