Skip to content
Advertisement

Tag: phpstorm

Resolve PhpStorm magic method and property warning using PHPDoc @property and @method for $this->stdout->styles

I’m trying to resolve “Field ‘stdout’ not found in …” and “Method … not found in array” warning using PHPDocumentor notations @property and @method on PhpStorm I was able to resolve the warning for stdout using: But now how do you resolve the Method ‘styles’ not found in array warning? (See screenshot above) I made up this code to demonstrate

PhpStorm Deployment menu missing on Mac OS X

I’m working in PhpStorm 2016.1, on Mac OS X. Colleagues who are on Windows have in Tools tab a Deployment menu. I’ve got nothing… Same in Preferences > Build, Execution & Deployment — all I’ve got is Debugger and Coverage. Answer Make sure that “Remote Hosts Access” plugin is enabled in Settings/Preferences | Plugins. That’s the only reason why “Deployment”

PhpStorm built-in server: Debug incoming requests

I am (locally) hosting a PHP script with PhpStorms built-in Server. Is there a way to debug an incoming HTTP request? I know that there is the “PHP HTTP Request” run-configuration, which allows you to perform a request and debug it, but somehow my problem only occurs when the requests is coming from an other application. I have no clue

PHPDoc – Function exits

Is there a way to document that a particular function calls exit()? The use case is that we have a function that is responsible for handling redirects (checks for already sent headers, set the response code, etc…) and then crucially calls exit(). Unfortunately, PHPStorm has no idea that this particular function terminates execution and thus suggests further warnings as if

How to tell phpDoc a string is a class name?

I often give objects static methods and properties that do not require the object to be initialized. For example: Now we subclass these objects and have some sort of controller that returns an object class string under certain circumstances where the object should not yet be initialized. For example: At times I might want to call the static function SomeObject::getSomeStaticString()

Shortcut key in PhpStorm to move to HTML end tag

Having a section of HTML tag: Suppose the caret is at the begin of the tag <div>, is there any key to move the caret to the closing </div>? There is a similar concept on CSS (doesn’t work on HTML) that works fine: in this case, Ctrl + ]/[ moves to the code block end/start. Here is the PhpStorm Default

Error running script.php: Port 9000 is busy

I set php.ini and Debug config in phpstorm. Trying to debug php script outputs in phpstorm Event log with: end of php.ini: Debug port in pStorm is also set on 9000. netstat -na outputs with: What if I set to other port. eg setting it to 10001 seems to do the job. Or just how to make it work properly.

Advertisement