phpstorm

Local variables not shown when OPcache is enabled while debugging with Xdebug

会有一股神秘感。 提交于 2019-12-24 09:13:16
问题 I have Xdebug enabled and working together with OPcache. OPcache module is loaded first by phpfpm (important). If you try to debug the code below (from the browser) and put a breakpoing in the local variables you will see that they are not displayed. If I deactivate OPCache everything works as expected. I'm using PhpStorm 2018.2.5 to debug. class Foo { public $member = 'Some value'; public function methodFoo() { $localFoo = "local2"; } } class Bar { public $firstMember = "foo"; public

PhpStorm - wrong syntax highlighting with Blade

。_饼干妹妹 提交于 2019-12-24 08:58:19
问题 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? 回答1: Settings (Preferences on Mac) | Editor | File Types Text files Find and get rid of unwanted pattern (most likely will something be similar to layout.blade or alike. 来源: https://stackoverflow.com/questions/30909095/phpstorm-wrong-syntax-highlighting-with-blade

Override PHP docblock/annotation of method without overloading (PhpStorm autocompletion)

你。 提交于 2019-12-24 08:49:30
问题 This is a question about the autocompletion behavior in PhpStorm (and possibly other IDEs) in conjunction with PHP docblocks. I have to groups of classes in my application. First there are individual classes for various products (CarProduct, FoodProduct etc.), all inheriting from BaseProduct, and the counterpart for individual contracts (CarContract, FoodContract etc.), all inheriting from BaseContract. <?php class BaseContract { /** @var BaseProduct */ private $product; /** * @return

Is there a way to put double quotes around selected text?

让人想犯罪 __ 提交于 2019-12-24 08:25:56
问题 I used to use Sublime Text 2 but now I'm working with Visual Studio 2015 and PhpStorm. In these I can not insert double quotes in a selected text like I can do in Sublime Text. In Sublime Text when you select some text and then press double quotes ( Shift + 2 ) the text does not disappear but double quotes get inserted around selected text. Is there a way to do that in VS2015 and PhpStorm? 来源: https://stackoverflow.com/questions/38752551/is-there-a-way-to-put-double-quotes-around-selected

Routes not found in PhpStorm, Symfony2 and FOSRestBundle

微笑、不失礼 提交于 2019-12-24 06:18:11
问题 I'm using latest PhpStorm with the Symfony2 plugin on a Symfony 3.2 project and FOSRestBundle. The routes generated by the FOSRestBundle don't get resolved automatically in PhpStorm (you get "missing route") although the routes work fine and show up with php bin/console debug:router Has anyone found a trick to get them to show as good routes? It's not blocking me from anything, just a visual thing. Update: Appears to be working except for explicitly named routes. I had forgotten (or not

Why PHPStorm says “dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib” when I run tests?

*爱你&永不变心* 提交于 2019-12-24 03:56:04
问题 Each time I try to run tests with PHPStorm I get this error: /usr/bin/php /private/var/folders/jl/34t9y2h94jsgchv4wfcxl6g80000gn/T/ide-phpunit.php -c app --configuration /Users/simonegentili/Sviluppo/web/wishventures/SendA/app/phpunit.xml.dist WishVentures\GeeftyApiBundle\Test\Controller\ApiControllerTest /Users/simonegentili/Sviluppo/web/wishventures/SendA/src/WishVentures/GeeftyApiBundle/Tests/Controller/ApiControllerTest.php Testing started at 18:46 ... dyld: Library not loaded: /usr/local

Prevent error reporting for variable variable in PhpStorm

喜你入骨 提交于 2019-12-24 03:50:19
问题 I have this code and get an error reported for the two "undefined" variables $tables = [ 'foo', 'bar', 'baz' ]; foreach ($tables as $table) { $$table = $this->setUpTables($table, $prefix); } $all = $this->getBaz($foo,$bar); // those two are reported as undefined Is it possible to tell PhpStorm to not report this "error"? EDIT: /** @var foo $foo */ /** @var bar $bar */ $all = $this->getBaz($foo,$bar); 回答1: Using simpler language features wins in this case, I think. PhpStorm should also have no

PhpStorm 7 tooltips positions

爷,独闯天下 提交于 2019-12-24 03:34:49
问题 How to show live templates first in tooltips, like in a screenshot? 回答1: It's a known issue -- already fixed: http://youtrack.jetbrains.com/issue/IDEA-115287 Hopefully it will be in next minor version -- 7.0.1 (should be, as quite a few users got very annoyed by current behaviour). Currently you will have to close code completion popup ( Esc ) in order for Live Template to expand properly (or explicitly choose it from the list). Alternative approach (which can be used in mean time): disable

<reference> expected, unexpected end of file on PHPStorm

主宰稳场 提交于 2019-12-24 02:22:49
问题 I am using PHPStorm and having some interesting errors/warnings showing up. Not sure if I skipped configuring something. Here is a query for example, $query = "INSERT INTO tblperson ("; $query .= " personName, personLname, personNumber, personPhone, personAttr"; $query .= ") VALUES ("; $query .= " '{$personName}', '{$personLname}', {$personNumber}, {$personPhone}, '{$personAttr}'"; $query .= ")"; And I get this warning: " expected, unexpected end of file" on first line of the code. Is there

How remove vertical line in PhpStorm

不羁的心 提交于 2019-12-24 02:15:11
问题 Today I bought PhpStorm and set it up with new settings, but unfortunately I don't know how to remove this vertical line in the editor (as you can see in the picture below). 回答1: Settings/Preferences | Editor | Code Style That would be Hard wrap at and Visual guides fields. Please note that some languages (e.g. PHP etc) may have own rules for that (override aforementioned ones). 来源: https://stackoverflow.com/questions/52654630/how-remove-vertical-line-in-phpstorm