FAQ Database Discussion Community


How can I debug my docker container with phpStorm

php,docker,phpstorm,xdebug,boot2docker
Under the following IP my Container run successful in my Webbrowser http://192.168.99.100:32775 I have also create a volume to share files between my container and my filesystem docker run --name lampf -d -p 32775:80 -v /Users/sja/Sites/lamkepf2:/var/www/html --link=lampf_db:db codinglimo/apache_php540_gs_imgmck_pdflib9 Now I install also xDebug successful in my container with the following...

Intellij - Hide file paths from Favorites window

intellij-idea,phpstorm,pycharm,webstorm
I organized my project files in the Favourites window according to the programming language e.g. python, javascript etc. However, the path to each file takes a lot of space and requires you to horizontaly scroll the window. Is there a way to hide path from the Favourites, so only file...

PHPStorm Intellisense Does Not Recognize Constants Defined in Class

phpstorm
Is there a way to get PhpStorm intellisense to pick up these dynamically defined constants? Given the code below, PhpStorm gives the "Undefined constant SAMPLE_CONSTANT_THAT_WAS_DYNAMICALLY_DEFINED" error message. class ExampleConfiguration { private $configurationMapping; ... public function DefineConfigConstants() { foreach ($this->configurationMapping as $key => $value) define($key, $value); } } class ExampleClass {...

PhpStorm 8 - Rename Refactoring - How do I rename a object property throughout my project?

php,refactoring,phpstorm
In PhpStorm 8, under the 'Refactor' menu the option 'Rename' exists. If I click on a variable in my code and then select 'Rename', then I believe 'Rename' will attempt to search throughout my project and rename the variable to whatever I wish it to be. However, if I click...

PhpStorm : Error in argument 1, char 2: option not found S

php,phpunit,phpstorm
So PHPstorm is running the PHP code fine in its console when I click run; that's great but I want to see it in the browser. So, I created a Built in Server inside project. Now, when I clicked on Run -> Run Project, I'm getting error as: "Error in...

Custom Button in PhpStorm

phpstorm
I have defined several command line tools in PhpStorm. Is there a way to create custom buttons for calling this scripts? I can't find any settings for this in the preferences panel....

How to see all git commands in PhpStorm?

git,phpstorm
Is is possible to see the commands PhpStorm executes when i e.g. do a "push" and than rebase it? Sometimes i do not know what PhpStorm is doing when i do a "push" and than "merge" or "rebase", it stahes sometimes thing and so on... Would be great to see...

Xdebug with PHPStorm 8 — opens WRONG file at non-existing breakpoint

debugging,phpstorm,xdebug
I am having trouble using Xdebug with PHPStorm. I have searched Google, etc. I have Xdebug setup on a remote host with my local files mirroring the remote host. I am using the Xdebug Chrome extension. When I run the debugging through PHPStorm, it OPENS a file and shows a...

PHPstorm - Unable to set breakpoints in blade.php files

php,debugging,laravel,laravel-4,phpstorm
I'm working on a Laravel application and can debug my controller php files fine, but Id like to also debug the blade.php files. With my current setup Ive followed all of jetbrains recommend settings for Laravel, (http://bit.ly/1B64Dgx) but it is still not allowing my to set breakpoints in the blade.php...

PhpStorm not highlighting PHP code inside a .php file when mixed with HTML

php,html,phpstorm
I am having a problem in PHPStorm where it won't highlight PHP code (but will intellisense it) inside a .php file when it's mixed with HTML code. Screenshot (click to enlarge): If I invalidate cache/restart, it will, for a few seconds, show the correct highlighting. However, after it "calculates", it...

Group files with the same name in filelist

phpstorm
All my projects contains alot of files with the same name 'file1.php file1.less file1.css file1.min.js file1.js file1.json' Is there a plugin or a way to group all those files with same basename under eg. file1.php, just like the filewatchers does it....

Chromium and Dart: “An error occurred loading file”

apache,dart,phpstorm,chromium
I'm trying to run some Dart templates from Stagehand. The 'ubersimplewebapp' app works. There's almost nothing to it. I've tried a couple of others and they don't. I'm currently trying to get 'webapp' to work. In install using PHPStorm and there are no errors. When I run it in the...

Git - Make all files in a branch dirty

git,branch,phpstorm
I am using an IDE which allows me to deploy changes to a remote server as part of a commit. I am trying to find an easy way to deploy to the remote server all the changes I have made on a given feature after multiple commits all in the...

How to fix Class 'Behat\Behat\Output\Printer\ConsoleOutputPrinter' not found

php,plugins,phpstorm,behat
Im trying to use the Behat plugin for PHPStorm (on Behat 3). the problem is once i try to run a feature i will receiving the following Fatal error: Fatal error: Class 'Behat\Behat\Output\Printer\ConsoleOutputPrinter' not found in /private/var/folders/js/27x3tw5n5jx9b14vn_cn12w0748zmg/T/ide-behat.php on line 82 I had a look in the Behat source i can...

Fix all occurrences of similar warnings in PhpStorm

phpstorm,jetbrains
In a php File I have a class, which methods do not have PHPDoc comments. PhpStorm suggests that I add them. I do Alt + Enter on each one, and I was wondering if there were a way to bulk fix all similar warnings like these....

After Google App Engine SDK update not able to run local server through PHPStorm 8?

php,google-app-engine,phpstorm
After updating Google App Engine SDK to 1.9.20 I am unable to run local server through PHPStorm 8. I get the following error: The PHP interpreter specified with the --php_executable_path flag ("/usr/local/bin/php-cgi") is not compatible with the App Engine PHP development environment. Unable to load GAE runtime module at /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/php55/gae_runtime_module.so...

PhpStorm - how to display “connecting lines” between files and folders?

phpstorm
Some of JetBrains's IDE's have lines between the file and folders in the "Project" sidebar, which is helpful for showing the file folder hierarchy. Here is how my PhpStorm file explorer currently looks: File Explorer Here is how I want it to look: File explorer sidebar with lines between files...

How to update and generate DocBlock for the entire project in PhpStorm?

php,phpstorm,phpdoc
I have set up code inspection for PhpDoc, so now I will get warning if they are missing something or are incomplete. When I have one class open, I can use Code > Generate > PhpDocBlocks to generate them or just start a comment via /* in front of a...

Problems with Xdebug failing to connect with PHPStorm

php,debugging,phpstorm,xdebug,remote-debugging
I'm trying to get Xdebug working with PHPStorm for a Magento site I'm working on. It is a remote server, and this is my first time setting that up. As best I can tell it's setup correctly, but when I have PHPStorm Listen it never connects. When I click "Debug"...

How do I get PHPStorm to use the correct path for css

php,html,css,firefox,phpstorm
I have been using "Delphi PHP XE2". The file structure has worked fine for over a year on the development machine and the production. The folders are organised as follows src/app_login.php src/add src/css src/js src/fnc src/db src/images etc I am just trying out PHPSTORM. The include files work fine. When...

Reg Expression to Match '

regex,phpstorm
I'm trying to search a app for any use of <? rather than <?php with PHPStorm with a regular expression. After checking out https://support.google.com/a/answer/1371417?hl=en#Match-Whole-Word-Only I've tried (\W|^)<?(\W|$) but it does not work. Any idea what I should use....

Settings in PhpStorm IDE

php,laravel,phpstorm
I wonder what these "warnings" bellow are and how I can get rid of them. If I hover over white markings or the arrows these will show up. But the ones coming from the arrows shows code that I already have deleted. ...

Pressing tab in blade template wraps text in xml tags

phpstorm,blade
I'm having a new issue since moving to PhpStorm 8.0.3 Whenever I am in a *.blade.php. Whenever I type some text and hit tab it wraps it as a xml element. I tried to disable all the the live templates, but the issue still occurs. This is pretty annoying as...

Error under PHPStrorm 8.0.3, Laravel Plugin 7.2 and IDE HELPER 2.0.3

php,laravel,phpstorm
I am receiving an error under PHPStrorm 8.0.3, Laravel Plugin 7.2 and IDE HELPER 2.0.3. I have followed all of the steps in the instructions. Installed the IDE Helper with composer Generated the ide helper file Installed the Larvel Plugin Enabled my plugin for my project. Restarted PHPStorm. In some...

Can “Run” but can't “Debug” Cordova in PhpStorm 8

cordova,phpstorm
I've set up my PhpStorm to use the PhoneGap/Cordova plugin and it works insofar as I can go to Run > Run to run cordova emulate ios with this Run configuration. However, for some reason it won't let me Debug (so I can't use breakpoints or inspect variable values) and...

How can I tell PHPStorm to find references to rewritten URLS?

reference,phpstorm,file-rename
I wanted to rename one of my files, mypage.php into myprofile.php, but PHPStorm does not find any file references. In the code, mypage.php is referenced without the file extension. For example: <a href='../user/mypage/'> So it has to look for mypage, not mypage.php and rename it myprofile, without file extension. How...

Adding dates and time to bundled templates in PhpStorm

templates,phpstorm,velocity
I want to add some data to the default phpDoc comments. In this case, the one for classes. I can add string text, but some of the conventional variables do not work. See below: /** * Class ${NAME} #if (${NAMESPACE}) * @package ${NAMESPACE} #end * @copyright ${YEAR} * @date ${YEAR}-${MONTH}-${DAY}...

Disable PHPStorm's built-in inspection of JavaScript semicolons

javascript,phpstorm,semicolon,code-inspection
PHPStorm 8.0.3 for Mac wants to tell me about missing semicolons in my JavaScript. I don't want PHPStorm to do this. This blog page says... Built-in inspections help you detect errors and potential problems, from obvious ones like a missing semicolon ... Later, the blog indicates that "The full list...

How to export and import Run/Debug configurations in PHPStorm?

phpstorm
I have a lot of similar projects created in PHPStorm and I need the same Run/Debug configuration in all my projects. Right now the Run/Debug configuration is empty when I create a new project. I have tried exporting and importing settings from the file menu but that does not copy...

Search file names that contain a string

phpstorm,webstorm
I have a module named flume and file names that include that module name, like flumeIndexController, flumePlugin etc. Now I've decided to rename the module to oozie so I want to have these files renamed to include new module's name like oozieIndexController, ooziePlugin. How can I get a list of...

Phpstorm, IDE, Appearance

phpstorm
how i can hide this block? in editor area. ...

PHPStorm keeps opening Firefox by default when running

phpstorm
I want PHPStorm to run my default browser - Internet explorer... and yet it runs Firefox. I have unticked all options in the settings/web browsers and left only IE ticked. I have changed my run application options to internet explorer (under edit configuration) It keeps running Firefox or comes up...

Where does PhpStorm store the Local History

phpstorm
PhpStorm keeps a Local History of all the files. Does anyone know where these files are stored?...

Angular parameter types on jsdoc

angularjs,ide,phpstorm,webstorm,jsdoc
I'm wondering what are the "proper" parameter types on angular specified stuff within jsdoc? Eg. if I have something like: /** * Some comment * * @param {WhatHere} $http * @param {WhatHere} $timeout */ function FooBar($http, $timeout) { } What are the proper types for those $http and $timeout so...

How to change breadcrumbs highlight background color in PhpStorm

phpstorm,breadcrumbs,appearance
How to change breadcrumbs background color on crumb hover? Screenshot...

Turn off highlights

phpstorm
I want to turn off PHPStorm's annoying highlighting for non-error related things. I read their docs, which said to go to preferences->editor->inspections. I deselected all for SQL, yet I still get this green highlighting for no reason: How do I disable this? It's quite distracting....

Accessing files inside Docker container

docker,phpstorm
I started playing today with Docker, pulled the Centos image, configured apache inside the container with php and I am able to access the website using the ip address. However, I don't know how am I supposed to access the source files of my app that is stored inside the...

PhpStorm - wrong syntax highlighting with Blade

laravel,syntax-highlighting,phpstorm,blade
When I create a Blade template in PhpStorm, for example login.blade.php, syntax highlighting works correctly. But when I name it layout.blade.php, it doesn't. Why? How can I fix it? ...

Debug Project in PhpStorm

php,magento,debugging,intellij-idea,phpstorm
I have been searching for a satisfactory answer on the net and StackOverflow without success. How should I debug Magento as a whole application — not a single file — using the PhpStorm IDE? You can do this in Visual Studio, Netbeans, and IntelliJ IDEA but I need to know...

PHPStorm Drush on Vagrant

drupal-7,vagrant,phpstorm,drush
I'm wondering if it's possible to use the command line tool in PHPstorm to run Drush on a Vagrant box? If so how do I go about this? Thanks, Neil....

How to setup PhpStorm to start a “watch” task when its project is opened?

phpstorm
I have a gruntfile.js in my project and the file contains a watch task that watches changes in JS and CSS files. How can I avoid manually starting this task via Grunt Console in PhpStorm? (I often forgot to run the task and I'm often surprised why my changes are...

Is there a way to bring up the method signatures in Phpstorm's autocomplete?

phpstorm
As per most IDE's, PhpStorm will bring up a list of matching options when you type part of a function (assuming the IDE is configured properly etc). PhpStorm, will also show the function signature, which is ideal, for giving hints when you have a function that accepts lots of parameters,...

Disable PHPStorm new file branding

php,codeigniter,phpstorm
When I create a new file using PhpStorm it creates it's own comment at the top, this would be fine however when using codeigniter comments using /* */ do not work, anyway to disable this? if not i'm going to have to get a new editor. Here is what I...

Double-tap 'search everywhere' feature has stopped working

ide,editor,phpstorm
I am using PHPStorm 7.1 and suddenly overnight the 'double-tap' feature that quickly pops up a box to search anywhere has just stopped working - can anyone suggest how I can possibly fix this without re-installing the software? It is a work machine so I'm prefer to not have to...

Enabling code completion for bootstrap.js in PhpStorm

twitter-bootstrap,twitter-bootstrap-3,phpstorm
For some reason I get no code completion for the bootstrap.js. I added the non minified version from https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.js as well as adding the library manually in the javascript library settings. Same thing happened for me with knockout until I found out I have to use the knockout-debug version since...

Trying to run a Gulp script that needs ruby on PHPStorm

ruby,shell,sass,gulp,phpstorm
I've edited a simple Gulp pipeline (that i've tested and works outside the IDE) and i'm now trying to include it into PHPStorm Project in order to achieve a better css workflow in a real project. This is the script, (it's a simple css optimization pipeline): var gulp = require('gulp'),...

IntelliJ/Webstorm not finding import reference

javascript,intellij-idea,phpstorm,webstorm,ecmascript-6
I have the following project structure: root src scripts main.js foo.js Inside of my main.js file, I'm importing foo.js like so: import 'src/scripts/foo.js' When I click on the import statement above and go to Navigate -> Declaration I get a super helpful message that says Cannot find declaration to go....

Transfer file colors settings to another project

phpstorm
How can I transfer File Colors settings in other project? I've tried doing it via File | Export Settings... but there is no "File Colors" entry......

Deployment PhpStorm gone

deployment,upload,phpstorm
My Deployment in PhpStorm is gone. I tried to upload a project and noticed that I couldn't. Then I figured it must be mappings that aren't set the right way, but when I went to Tools and wanted to click Deployment, Deployment wasn't even there....

How to change the default author in PhpStorm for PHPDoc

configuration,phpstorm,phpdoc
I search for a moment a way to change the name and mail used by PHPDoc in PhpStorm when you use the "autocomplete" by pressing Enter after typing /** just before a class or a function. Example : /** * Class DepartmentType * * @author Foo Bar <foo.bar@email.com> */ class...

How can I make PHPStorm auto-import namespaces in use statements?

phpstorm
I have checked the box for "Enable auto-import in namespace scope" in preferences, however when I select a class from the autocomplete, the FQN remains rather than placing it in a use statement. What am I doing wrong and how can I force phpstorm to auto-import these?

PhpStorm 8.0.3 crashing itself and Windows Samba share

windows-7,centos,phpstorm,samba,windows-explorer
I access the code on my CentOS VM through a Samba share on my Windows machine. I have been using PhpStorm for a while now, however this morning I have been unable to use PhpStorm to access the Samba share. When PhpStorm loads it shows a blank screen (no project...

Configuring PhpStorm RESTful Client to work with Laravel

php,rest,laravel,phpstorm
I'm trying to build RESTful API with Laravel using PhpStorm and artisan server, but when I try to test with Rest Client I receive this error: For now I write only the GET method and I receive correct output in my browser with the address http://localhost:8000/users This is my code:...

PhpStorm: How to separate PHP & HTML indentation

php,html,phpstorm,indentation
Is it possible to configure PhpStorm 8 to indent HTML and PHP code separately? I'll copy the examples from this question: How to properly indent PHP/HTML mixed code? How PhpStorm formats the code currently: <table> <?php foreach ($rows as $row): ?> <tr> <?php if ($row->foo()): ?> <?php echo $row ?>...

Portuguese accents not working on PHPStorm

phpstorm
Recently on a fresh Ubuntu installation, suddenly PHPStorm stopped allowing me to use words with portuguese accents. For example: Trying TILDE+A should result in: ã Instead it results in: a And this happens with other accents like: Trying DIACRITICAL SIGN+E should result in: é Instead it results in: e Currently...

PhpStorm 8.0 - How enable code completion in another file?

autocomplete,phpstorm,jetbrains,completion
I implement MyClass containing the method method() and I store the instance in $_ENV['key'] in test.php. Also in test.php the code completion works when I type $_ENV['key']->. In test2.php I include test.php and the code completion does not work any more for $_ENV['key']->. Does anyone know how to enable this...

Making PhpStorm recognise instances defined in PHPUnit setUp

php,phpunit,phpstorm
Consider the following test case: class FooTest extends \PHPUnit_Framework_TestCase { public $foo; public function setUp() { $this->foo = new Foo(); } public function testBar() { $expected = 42; $actual = $this->foo->bar(); $this->assertEqual($expected, $actual); } Because $this->foo is instantiated in setUp PhpStorm doesn't recognize it as an instance of Foo in...

How to include separate directories into one project?

php,phpstorm
I have a folder outside the document root named Base and a folder inside the document root to display HTML pages. I originally had them separate projects but that's not the ideal situation obviously? I saw one suggestion to make the directory which holds Base the project root and to...

How to disable “Project Files Changes” alert in phpstorm?

phpstorm
How to disable this alert box in phpstorm. ...

What does 'field declared dynamically' mean in this situation?

php,oop,phpstorm
I'm pretty new to OOP and PHP. I'm using the IDE PhpStorm and it's giving me this (see below) warning on my reference to $width. Here is my code: <?php class box { private $width; function __construct(){ $this->width = 3; } } ?> I've never seen the term "field" used...

How to automatically format PHP annotations in PHPStorm

php,annotations,phpstorm,swagger-php
I'm working with a large number of files that have PHP block docs with Swagger PHP annotations on them, however they are not indented. Is there anyway to automatically format them with spaces? Turning /** * @SWG\Api( * path="/building/{buildingId}", * @SWG\Operation( * method="GET", * type="Building", * summary="Returns a Building object...

PHP: Function parameter weirdness I can't find a rule for

php,phpstorm
I have a class with a static function: public static function log($logEntryType) { ... { in the same class I have a few CONSTS: const TEST1 = 'test1'; const TEST2 = 'test2'; From another class I am making the following call; MyLogClass::log(MyLogClass::TEST1); For some reason in PHPStorm 8 -- the...

Maintain splitted editor windows in PhpStorm

editor,phpstorm
Using PhpStorm, I usually have 2 or 3 source files opened in splitted editors. Now that I have a secondary screen, I've put all the toolbars in the second screen, and I'd like to have a fixed 3-splits layout for my editors. But as soon as I close the last...

How to get PHP manual references automatically in PHPStorm 8?

phpstorm
I'm a newbie and there is so much to learn. I would like to see PHP Manual reference if I type a function. Something like this: strlen() int strlen ( string $string ) Returns the length of the given string. example: <?php $str = 'abcdef'; echo strlen($str); // 6 $str...

gitignore in PHPStorm

php,git,phpstorm
I create a .gitignore file and add two folders. But when I click "commit directory" in PHPStorm my folders are always in my commit changes. magento/media/ magento/var/ What is going wrong? In Terminal it works great ...

How to upgrade PhpStorm 7 to PhpStorm 8 on Windows 7

php,windows-7,phpstorm
Is there are a way to upgrade PhpStorm 7 to PhpStorm 8 on Windows 7 while keeping current settings ? or do we have to uninstall 7 and install 8 after exporting settings ?

PhpStorm: open source JS file instead of min file when Ctrl+Clicking

phpstorm,minify,file-watcher
I just started using File Watchers on PhpStorm to minify all my JavaScript in the project, and I've linked my docs already to the minified versions of the JS. The problem I'm having now is I lost the ability to JUMP to the JS source code (function/method) directly by control...

How to make a Drupal theme with PhpStorm

drupal,drupal-7,phpstorm,drupal-theming
I want to make my own custom theme with PhpStorm. I found lots of information how to create your own module, but nothing for theme with this IDE. For creating a module you should open a PhpStorm, to choose from "Project Type" -> "Drupal Module", to add some additional settings...

Change color of different HTML tags in PhpStorm

phpstorm
I'm using PhpStorm 8.0.3 and I'm trying to customize fonts/colors. I would like to have different colors for different HTML tags (form, table, tr, etc). But in PhpStorm's editor through Settings | Editor | Colors & Fonts | HTML I'm only finding a way to change all HTML tags to...

PhpStorm SCSS - File Watcher Setting

html,css,phpstorm
I have structure like this: Where I am trying to setup SCSS file watcher. Here are my current options: My goal is to compile ../scss/style.scss to ../css/style.css ../scss/user/profile.scss to ../css/user/profile.css How to setup my setting in file watcher to achieve this pattern?...

Why do I see my excluded folders in PHPStorm 8?

phpstorm
I just upgraded from PHPStorm 7 to PHPStorm 8, and all of a sudden my excluded directories became visible again. I excluded them not only because I don't want to have them searched or inspected, but also because I just don't need to see them - at all. PHPStorm 7.1:...

Keep getting 'Partial Merge Commit' Dialog

git,phpstorm,bitbucket
I am trying to commit some changed files. There are several, but I only want to commit a few from a specific folder. Everytime I attempt to commit, I get a Dialog box with a popup that says Partial Merge Commit. It also has the message Partial commit during a...

Setup Xdebug and PHPStorm with remote server

php,phpstorm,xdebug,remote-debugging
I'm trying to debug a PHP script using Xdebug and PHPStorm on a remote server, and am quite new to remote debugging. I do not have full access to the server but have FTP (not SFTP) access to most of the files (I can't get to php.ini for example). Xdebug...

silex and twig css cache issues - odd behavior

css,google-chrome,twig,phpstorm,silex
I've run into a very frustrating bug. I can't reload changes in my css file. style.css seen in PhpStorm looks like: body { background-color: blue; } Yet seen in Chrome shows: body { background-color: green; } Here's the odd behaviour: If I change style.css to "foo bar testing" Chrome displays...

PhpStorm LESS Watcher configuration

css,less,phpstorm
I am using PhpStorm 8 to work on some LESS files. variables.less gets imported from styles.less. When I save variables.less only a variables.css is being made. How do I configure the watcher to transpile only styles.less > styles.css and automatically upload styles.css? Here's my current config: ...

PhpStorm via phpunit.phar - Warning: require_once(PHPUnit/Runner/Version.php)

php,unit-testing,phpstorm
I have downloaded phpunit.phar from official website https://phar.phpunit.de/phpunit.phar v4.6 PhpStorm v8.0.3 (PS-139.1348, February 12, 2015) Configured phpunit settings in PhpStorm. Set "Path to phpunit.phar". I created simplest unittest to test if it is working and run test in PhpStorm <?php class MyTest extends PHPUnit_Framework_TestCase { public function testOneEqualsOne() {...

Make PhpStorm add a warning if calling a function with more arguments than declared

phpstorm
Using PhpStorm 8.0.3. Let's say I have this function: public function myFunction($argA, $argB) { // ... } And I'm calling it from somewhere else in the project with one extra argument, like: $myClass->myFunction($arg1, $arg2, $arg3); I know this is not considered an error in PHP, and it can be useful...

Can I assign values to null-initialized properties in JavaScript?

javascript,null,initialization,phpstorm,type-mismatch
I am creating a JavaScript object and I'd like to be able to distinguish between unset and empty properties. Therefore I initialize it's properties to null at creation. Then I can fill the properties with specific values. Sometimes these values are empty (such as '' for string properties and 0...

Braces placement in object definition in PhpStorm

javascript,phpstorm,webstorm,code-formatting
Is there any way to make PhpStorm place curly brackets on new line in this situation? var test = { '*': { // something } } instead of making this (after reformatting): var test = { '*': { // something } } ...

PhpStorm Git folder modified color

git,version-control,phpstorm
My PhpStorm is coloring changed files when a project is under Git, I want to color the folder also so I can notice that there is a file changed under that colored folder. Thanks....

Surrounding text with a method call

php,templates,keyboard-shortcuts,phpstorm
I have a class that has two methods that are used often:self::foo() and self::bar(). I would like to surround text, mainly variables in other methods. I can do comments, if/else, try/catch, etc, but I can't with arbitrary method calls. I don't even know if PHPStorm does this, honestly. Does anyone...

Line breaks in phpStorm are removed

php,ftp,newline,phpstorm
I am using phpStorm to edit some files. They appear fine in phpStorm, but when i open them in notepad everything is on one line. So for example this: <?php include('hello.php'); print 'test'; ?> Will become : <?phpinclude('hello.php');print 'test';?> Obviously, this causes error. Why is this happening and how can...

PhpStorm: How does one exit full screen?

ubuntu,fullscreen,phpstorm
First of all I'm a heavy user of Ctrl + Shift + A. I've entered Full Screen mode on PhpStorm on Ubuntu. When I tried to exit I've typed "Full Screen" and an option called View: Toggle Full Screen mode. Once I pressed enter nothing happened. Workaround: I've enter in...

Webstorm: Ctrl + Arrow not working. How to fix?

linux,phpstorm,webstorm
I downloaded Webstorm 10.0.2 and noticed that when I pressing Ctrl+Left/Right it selects char as Shift+Left/Right but not jumps over word. And at Keymap Settings when I'm trying to add shortcut and pressing Ctrl+Left/Right it doesn't show this shortcut, but Ctrl+Any other works normally. Also, at PhpStorm 7.1.3 Ctrl+Left/Right works...

Run PhpStorm's Create Project with sudo

phpstorm
I want to create a new node.js app in PhpStorm but it can't build it as npm requires root to install. I can't seem to find a way to make PhpStorm run npm as su. Is there a way to do so?...

How to stop PHPStorm from automatically refactoring my code

refactoring,phpstorm,automated-refactoring
I renamed one of my files and phpstorm asked if I wanted to do a refactor on my project. I accidentally clicked yes to "Refactor", and it changed a bunch of the variable names in a handful of random files in my project. Not a big deal. I'm using GIT...

What button is represented by this symbol in phpstorm?

osx,keyboard-shortcuts,phpstorm,key-bindings
I was fiddling around in PhpStrom's keymap, and was confused by the predefined key binding for Hide active tool window as I don't recognize the circle symbol with the tilted arrow. What button am I supposed to press? ...

PhpStorm - navigation back keyboard shortcut not working

php,phpstorm
When I Ctrl + click on method it will jump to declaration of that method. Question: How to jump back to usage of that method? I tried Ctrl + Alt + Left combination but nothing happen (not working). When I click Navigation > Back it worked. https://www.jetbrains.com/phpstorm/help/navigation-in-source-code.html Back [Ctrl]+[Alt]+[Left] Undo...

PhpStorm: How to add method stubs from a PECL library that PhpStorm doesn't currently support?

php,phpstorm
PhpStorm has a list of method stubs from various compile-time libraries here that it will use for autocompletion in development. I currently have a list of stubs for the PHP AMQP PECL extension here that I would like to add to my PhpStorm build to get autocompletion for that library....

Regex replace uppercase with lowercase letters in PhpStorm

regex,phpstorm
Hey I have to change in a lot of places camelCase to snail_case. I have following example: billingAddress paymentDetails I tried to use find and replace with regex in PhpStorm In 'find' input field I put in: ([A-Z]) In 'replace' input field I put in: _\L$1 Result I got: billing_LAddress...

PhpStorm - Remove underlining of SQL statement in PHP

phpstorm,color-scheme
I'm using PhpStorm with the Monokai scheme. When I write an SQL statement in PHP they get underlined. Where can I disable/change this? See images below. I've looked in Color & Fonts but can't seem to find the place to change it. I'm used to the Monokai scheme so I...

Phpstorm insert code on keyword with autocomplete

php,phpstorm
My question is if I can create my own auto complete items in Phpstorm. So when I type met and enter it will insert: public function () { } I found a solution at this page, posted by LazyOne...

Select to end of line in phpstorm

osx,phpstorm
I want to select the text from current position to end of the line with keyboard shortcuts in phpstorm (mac OS). What is the shortcut? Also I want to select the text from current position to next word with keyboard shortcuts in phpstorm (mac OS). What is the shortcut? I...

Can PhpStorm resolve mod_rewrite rules in .htaccess when doing code analysis?

.htaccess,mod-rewrite,phpstorm
I have a bunch of mod_rewrite rules in my PHP project. When I commit to git PhpStorm runs a code analysis on what I'm committing, which is great, but it produces a bunch of warnings because links point to the rewritten URLs, not the actual PHP files, for example: Warning:(103,...

PhpStorm IDE. Collapse custom/debug code

debugging,ide,phpstorm
Is it possible to collapse custom code in PhpStorm? Like if you set in settings pattern: [START]$this->debugOutput(*)[END] The concept is to hide debug code after developing finished. In example below all lines with $this->debugOutput should be hidden class Foo { public function bar() { $x = 1 + 2; $this->debugOutput($x);...

Add containing folder to project in PhpStorm

phpstorm,moodle
I'm developing a plugin for Moodle and created a project inside my Moodle installation. I'm extending a class called block_base but PhpStorm says undefined class block_base. My guess is that is because all the moodle files (including the class block_base) aren't in the project files. How do I add this...

Using regex to find/replace in PhpStorm

regex,replace,phpstorm
I am working to refactor a dependency on Compass mixins to simply use CSS rules which will be vendor prefixed by autoprefixer as a post process. So I am going through a large code-base with the need to replace strings such as: @include border-radius($big-radius); With something like: border-radius: $big-radius; The...

Run external tool before GIT commit in PHPStorm

git,batch-file,phpstorm
Our project uses gettext to allow for multiple languages. Further, there is a *.bat and *.sh file, which generates the current POT file both from the PHP files and Smarty templates. Is there a way to configure PHPStorm to execute an external tool (for example the bat file), before doing...

Regular Expression to find a complete html tag in source file

html,regex,replace,html-parsing,phpstorm
I want a regular expression (to search in phpstorm) that will search for the starting tag and it's corresponding closing tag in all html files of my project directory. E.g here is my code <ul class="sub-menu"> <li id="menu-item-215" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-215"><a href="news-updates/index.html"><span>News / Updates</span></a></li> <li id="menu-item-295" class="menu-item menu-item-type-custom menu-item-object-custom...

PHPStorm and CodeIgniter routing issue

php,codeigniter,routes,phpstorm
I started studying CodeIgniter Web Framework and I am trying to work with PHPStorm 8.0.3 on Kubuntu 14.04. When I unzip CodeIgniter downloaded archive to root Apache folder /var/www/html and go to localhost/index.php then it works okay and I see "Welcome to CodeIgniter!" page. Also I can use localhost/index.php/welcome/index and...