All Questions
Tagged with visual-studio-code php
908 questions
1
vote
1
answer
31
views
Intelephense is showing Undefined Type errors that are not true
Windows 11: 24h2
VS Code: 1.102.1 (WSL: Ubuntu 24.04.2 LTS)
Intelephense: 1.14.4
Symfony: v6.4.23
PHP: 8.2.28
<?php
namespace App\Command;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\...
0
votes
1
answer
27
views
Laragon + Visual Studio Php Server & Live Server + Live Server Web Extension Not Auto-Reloading Together
I’m attempting to set up a development environment where I can edit PHP files stored under C:\laragon\www\, and have the browser automatically reload when I save changes. I am using Laragon to run the ...
0
votes
1
answer
24
views
get_header() flagged as undefined function in vs code intelephense
I'm new to vs code and I don't understand why core wordpress functions like get_header(), or add_action() are being flagged by intelliphense as undefined functions. The same is true for ACF functions ...
-1
votes
1
answer
50
views
Composer version control vendor directory with local repository
We don't want to run composer update on our production server we would rather version control the vendor folder. We have shared files between our webapplications and we have a git repository called &...
1
vote
1
answer
55
views
Is there a quick shortcut or alternative to select a multi-line statement (like echo) from start to end in VS Code?
I am using VS Code for PHP development, and I often work with statements that span multiple lines, such as echo, if, foreach, and similar constructs. I need a quick way to select the entire statement, ...
2
votes
1
answer
47
views
Visual Studio Code (PHP) tooltip transforms to real characters and the code crashes [duplicate]
Sometimes VSCode goes crazy and converts the tooltip to real characters and the code crashes because it doesn't understand what baseOptions: means.
I don't want to turn off the tooltip.
How can I turn ...
0
votes
0
answers
53
views
Why cmd+click does not open the file when the route uses {{ asset(' in laravel - vscode
When working with React and the endless VSCode libraries we got used to tracking files and components with cmd+click (at least I did).
However, when working with Laravel (in a new VSCode profile) I ...
0
votes
0
answers
83
views
Problems with Live PHP finding root folder
I use Visual Studio Code 1.96.4 where Live Server and PHP Server are two of my extensions.
I have PHP 8 installed locally on my computer (Windows 11) which I downloaded from php.net.
When I open an ...
0
votes
0
answers
246
views
Upgrade on MacOS Sequoia 15.1.1 from PHP 8.3.13 to 8.3.16 to install Imagick does not see the class after succesful install
I have to show scanned PFD files in thumbnail format so users can pick a file which they can then read in full format. I was on PHP version 8.3.13 and Imagick does not install under that version as ...
2
votes
1
answer
220
views
How to have XDebug send log entries to VS Code 'Debug console' window?
I am developing a PHP application hosted on Apache installed through XAMPP 3.3, on Windows. I have the XDebug 3.x extension set up in VS Code and debugging works perfectly fine. My launch.json entry ...
0
votes
0
answers
174
views
How to turn off error types in VSCODE (PHP6606 for example)
In some inherited code, there are many cases where certain errors (such as PHP6606)
Constant from class 'subclass' referenced through child PHP(PHP6606)
appear due to the standards in place when the ...
0
votes
1
answer
960
views
Xdebug for PHP in Visual Studio Code - how to set up and allow breakpoints
I've read most all of the posts about setting up PHP Xdebug for VS Code but no solution for me. I've installed VS Code on a new laptop (that's relevant because I know what else is installed and there ...
-1
votes
1
answer
58
views
How to auto-complete variables in VS Code without typing the $ symbol?
In VS Code, how can I make variable names auto-complete without typing the $ symbol? For example, when I type data, it should automatically suggest and complete it as $data. When I used IntelliJ IDEA ...
0
votes
0
answers
13
views
Open in a PHP file in browser using Vscode extension PHP Server and Live Server [duplicate]
I am running PHP Server and Live Server extension on Vscode on my Windows machine. I am trying to open a .php file in my browser so I can easily see front-end changes.
However, this is what I see:
Php ...
0
votes
0
answers
180
views
VS Code warning "does not match PSR autoload pattern" but it actually does?
as it says It is expected to be slot, or the file name should be Slot.php and it IS named "Slot.php", I made it with php artisan make:model Slot, just like I did it with Contact and Customer,...