I don't know if I fully understand your problem, but I know that phpstorm didn't properly load all the classes and namespaces etc until I started using ide-helper (https://github.com/barryvdh/laravel-ide-helper). now it generates a helper file for all the namespaces etc and also a models file. Sorry if this doesn't help, or if you already have that implemented and I'm just not understanding!
Class paths not found during debug in PHPSTORM
I succesfully installed Laravel and PhpStorm, using windows 8.1 and Wamp (www/laravel).
In the default Laravel installation we see the namespace: App\Http\Controllers. HomeController extends Controller in that namespace. All works fine on localhost, and when I change some content it is visible. No problem there, I could run a mini website.
PhpStorm uses Xdebug, which is setup correctly in my php.ini and PhpStorm, as I did check. Now when I debug my homecontroller or any end controller, it sais that the underlying Controller Class cannot be foud. Like so:
PHP Fatal error: Class 'App\Http\Controllers\Controller' not found in C:\wamp\www\laravel\app\Http\Controllers\HomeController.php on line 3. (extit code 255).
However, controller.php is there, in the right namespace, with the right syntax. And the class is working fine on localhost.To be sure I tried the "use" statement in homeController, although I know I dont need to. I checked all settings, plugins etc. One thing came up which also is related to debugging:
When I select the entire controller directory with my mouse and run debug, I get: Process finished with exit code 1. Cannot find PHPUnit in include path (.;C:\php\pear)
So I checked PHPUnit settings and tried the option with a path to a .phar file, which I then downloaded because it did not come in the composer installation. (C:\wamp\www\laravel\vendor\phpunit\phpunit\phpunit.phar). Then I got: PHPUnit 4.5.0 by Sebastian Bergmann and contributors. Time: 201 ms, Memory: 2.25Mb No tests executed! Process finished with exit code 0.
I explored more in depth vids and tuts about Xdebug, without results.
I also tried stuff like 'composer dump-autoload' which did not help and php artisan dump-autoload which does not execute. Even tried a classmap autoload in composer's 'installed.json' with the correct path, as could be copied from a Jeffrey tutorial.
I tried PhpStorm 8.3 (using 8.1), same results.
So basically:
- Laravel Class paths cannot be found while debugging, but the files are there right from the setup. Syntaxes are correct.
- It might be related to PHPUnit , Xdebug or Laravel. I explored all ways I could think off and read the forums. In Google I found 2 more or less similar cases but without a solution.
So I hope this post might help. Cheers!
Please or to participate in this conversation.