Few questions..
Hi! Just switched from netbeans to phpstorm.
I have a few questions:
1)There is no jquery support by default? I need to download library to my project? --2) how can i fix this, when i'm trying to access some object like this - $this->object_name->method - undefined method.
3)How can i make ctrl+s to save only one file, not all?
4)Can phpstorm generate getters/setters with phpdoc?
5)Can i exclude some files/directories, when i'm working with FTP/SFTP connection?
6)Is there a feature - when i click on <div id="something"> phpstorm will highlight the ending of this div?--7) there is array key autocomplete: it works only like second array, or i can enable first variant too?
8)Another question, why, when i create project from existing files from mounted network drive, phpstorm needs to download all files to local path? can i disable this? in our project there are >15k files.
9)And small example, how to fix autocomplete..
$container = object array
foreach($container as $item) {
$var = $item->getSomething(); -- how can i fix this method autocomplete?
}
thank you! :)
Please sign in to leave a comment.
Hi Vladislav,
It would be great if you can numerate and separate your questions -- makes answering them more easier.
1) Yes, you need to download jQuery library into your project.
2) It depends on context (how it implemented). To fix it (generally speaking) you need to tell the IDE what db is (which type -- via PHPDoc comment, for example).
3) You cannot.
4) Sorry, I do not understand this question. Please re-phrase and give some example. But in general -- Yes, PhpStorm can generate setters/getters -- Code | Generate.
5) Kind of -- you can exclude items by name ("File | Settings | Deployment | Options" or "Tools | Deployment | Options"). There are quite few tickets for a better/more flexible & convenient items selection on Issue Tracker, for example: WI-1255, WI-3762, WI-4325, WI-2226, WI-5462.
6) Almost Yes -- "File | Settings | Editor --> Highlight matched brace" (but it highlights matched braces not tags -- so you have to stand on opening brace to see the closing one). You can also look at "File | Settings | Editor --> Highlight current scope".
There is a ticket for highlighting the actual tags (search on Tracker).
7) Currently only 2nd way -- there are some tickets to further improve this feature, for example: WI-1029, WI-3423, WI-142, WI-5164.
8) No, you cannot -- because IDE needs fast access to project files & accessing them over network is much slower. Such scenario is highly not recommended and is not supported (which means devs will not accept any bug reports/performance issues complains if you setup your project to work directly over network).
9) Use PHPDoc comment to tell IDe which type $item is. For example:
or
Thank you. Another question..i am creating project from mounted drive, but when i save any file in IDE it saves only in local path, but not in moutned drive. How it can be fixed?
There is no sync. :/
Hi Vladislav,
I'm not working with mounted folders (eveything is local on the same PC), but it should be the same as working with FTP -- right click on Editor tab/File in Project Tree and chose "Upload to" (obviously, you have to have your Deployment server configured as Default.
As for automatic upload -- "File | Settings | Deployment | Options" (or "Tools | Deployment | Options") and tick "Upload changed files automatically to the default server". Check other options as well.
Thank you. Its ok now.
Andriy,
Thank you for your help!:)
I realize you answerd the question regarding the code highlighting for an undefinied method or property but since I work with a PHP library and this is the wayt he library uses the code I have to say it is a little annoying to have my a large portion of my code hjighlighted. Maybe you can make it optional int he future; Thanks Just a thought anyways
Hi Edgar,
Are you talking about PhpStorm highlighting methods with "Undefined method" warning (or something like that) ? If your library works "that way" (does not have any PHPDoc comments etc so PhpStorm cannot 100% validate your code) and you do not want to see such warnings then just disable appropriate inspections in File | Settings | Inspections --> PHP --> General.
If I misunderstood your question, please give some more details (preferably with screenshots).
P.S.
Can you tell us which library is that?
WOW that was the fastest reply I have ever gotten to a post. Thank you. That did the trick. I personlay appriciate the highlighting unfortunetly the developers of the librarty didnt comment everything. Anyways thank you again for the quick reply. This is my first full day using PHPStorm I am coming over from PHPEd from Nusphere, and I have to say I am impressed and love it. Very advanced. Very fast and love the plugins.