Skip to main content

Questions tagged [phpstorm]

JetBrains PhpStorm is a commercial IDE for PHP built on JetBrains' IntelliJ IDEA. PhpStorm provides an intelligent editor for PHP, HTML, CSS and JavaScript with refactoring and on-the-fly code analysis.

0 votes
2 answers
585 views

OpenAPI file, reference to a component from another file does not work

I want to split my OpenAPI file components to separate files and reuse them in my documentation. My problem is that although my IDE finds the reference of my component in another file the Swagger ...
CyberHunter's user avatar
0 votes
1 answer
50 views

PhpStorm Catch sentence with multiple exception classes PSR-12 code style

I am using PhpStorm 2023.3.4. I set the code standards for my project to PSR12. This means 4 space indentation, no tab char. I have a PSR-12 compliant chunk of code like this: <?php class MyClass { ...
Nicolas's user avatar
  • 1,415
0 votes
1 answer
37 views

PhpStorm Xdebug stuck on past breakpoint

I did not find any solution or post about this so I might as well try it here. I am using PhpStorm with Xdebug and Docker. The debug is working - that is not an issue. What sometimes happens for ...
t0is's user avatar
  • 39
1 vote
0 answers
71 views

PhpStorm with Git shows thousand of changed file every couple of minutes

I'm experiencing a strange issue in the last couple of months with PHP + Git. While working on some local branch every couple of mins (sometimes it more random an less aggressive) PhpStorm will show ...
nragonnragon's user avatar
0 votes
0 answers
149 views

PhpStorm shows undefined class but I can use this class

I'm creating my first project in Symfony and PhpStorm shows me something like this "Undefined class 'AbstractController'" or "Undefined class 'JsonResponse'". I tried everything I ...
OldSchoolViking's user avatar
0 votes
1 answer
63 views

PhpStorm formatting, chopped down line indent after context

Our team will start to use a formatter for PHP. We decided the easiest way was to use an already existing standard and decided for PSR-12. Half the team uses VSCode and the extension Intelephense for ...
Vincent Harrius's user avatar
0 votes
1 answer
168 views

Cannot modify path mapping in PhpStorm - Project files are not being detected

Greetings to everyone, I'm facing a problem when I cannot setup the path mappings. Debug starts but because of missing mappings I cannot reach any breakpoints. here is how my configuration looks like: ...
Grokking's user avatar
  • 705
0 votes
1 answer
58 views

I want the entry to be autocompleted in the PHP class

My PhpStorm PHP autocomplete works but I can't customize it for modded inputs. This is my method in the PHP class: public function orientation($orientation = 'landscape') { } First, I want this ...
alireza.haraji.dev's user avatar
0 votes
0 answers
19 views

How to remove an empty line before return in condition line with only few lines?

When in PhpStorm 2023 I make auto reformat of code, I got an empty line before return in condition line: if (empty($categoryName)) { $this->error('Category Name is not provided'); return; }...
Petro Gromovo's user avatar
0 votes
0 answers
34 views

How to display ECHO real-time outputs in the browser Xdebug?

The real-time outputs are only displayed in the PhpStorm "Output" tab, and only when the script finishes does it display the result in the browser. This setup didn't work for me: ...
Jorge Gatica's user avatar
0 votes
1 answer
26 views

PhpStorm how to upload individual differences on file comparison viewer between local and remote files

PhpStorm 2023.3.3 When viewing a local PHP file we can compare differences to the remote (Server SSH access) file, and this difference split screen view highlights the differences between the local ...
Martin's user avatar
  • 22.7k
1 vote
0 answers
67 views

PhpStorm ExpectedValues/expectedArguments array auto-complete

Is it possible to use the ExpectedValues trait or the expectedArgument() meta directive to hint the possible values in an array? My use-case is a function that accepts either an array or a string: ...
K1ll3rM's user avatar
  • 63
0 votes
0 answers
48 views

Make PhpStorm respect v-if for variable resolution in a project with Vue 3, Pinia, and TypeScript

I'm using JetBrains PhpStorm for a Vue 3 project that utilizes TypeScript and a Pinia store. The Pinia store defines a variable currentSnackbar=ref<ISnackbar>(). The value may be undefined or an ...
Andrew Sauder's user avatar
0 votes
1 answer
117 views

WSL2 Docker containers displayed as orphans in PhpStorm

I'm using Windows 11 and PhpStorm (2023.3.2). PhpStorm connects to a WSL2 Ubuntu (22.04 jammy). This Ubuntu has Docker engine installed, it is used for builds and composing dev servers. PhpStorm is ...
Issac411's user avatar
0 votes
1 answer
236 views

PhpStorm 'Cannot resolve symbol' problem with multiple Vue.js projects installed

Root project structure: -node_modules/ ... -package.json -package-json.lock -vue2/ ... -vue3/ -node_modules/ -src/ App.vue main.ts shims-vue.d.ts -package.json -tsconfig.json -webpack....
The50's user avatar
  • 1,108
0 votes
0 answers
64 views

JetBrains IDE custom refactor extract to new file

In JetBrains IDEs there's an option called refactoring witch allow you to easily refactor your code. One of the things it can do is extract some part of your code inside a new file. For example, when ...
Rignchen's user avatar
0 votes
1 answer
200 views

PhpStorm encountered issues with debugging Xdebug

This is my php.ini zend_extension = xdebug xdebug.mode=debug xdebug.client_host=127.0.0.1 xdebug.client_port=611 xdebug.idekey=PHPSTORM My env: PHP 8.1.3 macOS PhpStorm 2023.3.2 httpServer cmd ...
gogobar's user avatar
0 votes
0 answers
40 views

Can in PhpStorm insert code which is in clipboard commented?

Can I in PhpStorm 2023.2.2 by selecting hot key inside editor to insert code which is in clipboard commented? The result would be something like : /* Text from clipboard */ I did not find where enter ...
mstdmstd's user avatar
  • 2,941
0 votes
2 answers
84 views

How to avoid inspection warning when call a static method of a variable class name in PhpStorm?

When I call something like: $class_name = '\App\Models\User'; $class_name::create($attributes); PhpStorm shows an inspection warning "Method 'create' not found in string". I don't want to ...
Yevgeniy's user avatar
0 votes
0 answers
93 views

How correctly work with stub files of Laravel project in PhpStorm 2023?

After I installed stubs in Laravel 10 app with command php artisan stub:publish and try to open one of *stub files, it is opened by kate of my Kubuntu 22.04. In PhpStorm 2023.2 I applied command “...
mstdmstd's user avatar
  • 2,941
0 votes
0 answers
81 views

Unresolved variable ckeditorInstance PhpStorm

Is there any way how to make PhpStorm recognize what is a ckeditorInstance in this context? const ckEditorElement = document.querySelector('.ck-editor__editable'); const ckEditorInstance = ...
mrzalais's user avatar
0 votes
0 answers
301 views

How to configure JetBrains IDE (PhpStorm or WebStorm) to autocomplete Vue components from sibling project in monorepo

I am trying to solve a problem related to PhpStorm's and/or WebStorm's auto-import feature of Vue components. I have a monorepo project structure (attachment 1) with a component library project and a ...
Dan Charousek's user avatar
0 votes
0 answers
119 views

PhpStorm Tailwind Autocompletion not working inside of script tags

Autocomplete suggestions for Tailwind classes are working fine except if the string literal is surrounded by a script tag. File extension doesn't matter. Works inside of js file: Does not work: ...
curry's user avatar
  • 3
0 votes
1 answer
68 views

PhpStorm suggestions of dynamic class declaration

I'm using PhpStorm, and I have a class like this. class MasterClass { public function getClass($className) { require_once("/php/class/$className.php"); $newClass = ...
Fabio T's user avatar
0 votes
1 answer
97 views

How to save my formatting of MySQL stored procedure?

I work with MySQL stored procedures in PhpStorm 2023.2 and I edit procedure in console editor I use formatting But after I saved stored procedure or used Alt + R for automatic formatting of the code ...
Petro Gromovo's user avatar
0 votes
1 answer
33 views

How to disable replace with "?->" suggestions?

I am not entirely sure what to even google for (I tried few things without luck). No option on the popup to disable that particular suggestion - anyone know how to do this? When I click "More ...
gvanto's user avatar
  • 2,038
0 votes
1 answer
85 views

How can I call this controller in Codeigniter?

I´m totally new to php and Codeigniter. Below you can see my first controller that I wrote. namespace App\Controllers; class FirstController extends BaseController{ public function viewExample(){...
Lars's user avatar
  • 1
0 votes
1 answer
183 views

Xdebug validation issues with PhpStorm and WSL2

I'm trying to add Xdebug to my Magento project for better debugging. I'm actually working on WSL2, where I have installed Laradock. If I try to display xdebug_info() I can see I have properly ...
dandan's user avatar
  • 1
0 votes
0 answers
74 views

Why PhpStorm does not show latest available packages for some project?

Usually PhpStorm 2023.3 shows all latest available packages in project composer.json file. But in the laravel/PHP project I work now PhpStorm 2023.3 does not show latest available packages : Under ...
mstdmstd's user avatar
  • 2,941
0 votes
0 answers
28 views

Can I run PhpStorm editor in "diff" mode - to show live changes to text like it shows in gutter

Can I see in PhpStorm editor constantly highlighted changes made to file? Same way it is shown when you use "show diff" option in git submenu, but in default view.
Krzysztof's user avatar
  • 309

15 30 50 per page