I've cloned a Laravel project from Github, then I've run composer install
for getting vendor
folder. This folder has appeared but I also get weird red lines under each class that show Undefined Type
errors. I also deleted the composer.lock
and run composer update
, but the errors are still there!
Is there any other thing that I should do?
Asked
Active
Viewed 267 times
0

Hanie Asemi
- 1,318
- 2
- 9
- 23
-
What is the version of laravel ? – Aro Jul 26 '22 at 11:12
-
@Aro It's version 9.11 – Hanie Asemi Jul 26 '22 at 11:13
-
@Aro I can also find the ```'Illuminate\Foundation\Testing\DatabaseMigrations'``` file under the vendor folder but the error is still there. – Hanie Asemi Jul 26 '22 at 11:15
-
Are you sure that you use it via namespace? – Aro Jul 26 '22 at 11:17
-
@Aro Yes, also it isn't just for one class,it's happening for all classes. – Hanie Asemi Jul 26 '22 at 11:18
-
Are you sure that `composer install` didn't throw an error? – Thomas Jul 26 '22 at 11:20
-
Hm. It's very strange. Because I have installed project and I don't have problem with it. Maybe problem with IDE ? – Aro Jul 26 '22 at 11:20
-
@Aro It's the link of my project! https://github.com/hanieas/Expense-Mgmt-Backend could you please check it out? – Hanie Asemi Jul 26 '22 at 11:22
-
@Aro go to the ```src``` and run ```composer install``` – Hanie Asemi Jul 26 '22 at 11:23
-
@brombeer The project is running perfectly, but the errors still are there. – Hanie Asemi Jul 26 '22 at 11:44
1 Answers
0
The project was running perfectly, So I found out it was because of my IDE.
The VS Code wanted to validate code using php, and it is not finding php installed.
It's solved by setting php.validate.executablePath
in Vs Code setting.
For more information: "Cannot validate the php file. The php program was not found"

Hanie Asemi
- 1,318
- 2
- 9
- 23