Recently I started to use PHPUnit on my project and so far everything works perfectly, I can launch my tests just fine.
But following a potential mishandling on my part when I launch my tests here is the message that appears, preventing me from playing them:
Cannot open file "/tests/bootstrap.php".
FYI, I have not touched a file with this name, I have never heard of it before.
Has anyone ever encountered not opening the file /tests/bootstrap.php? Do you have any idea where it comes from?
Problem solved !
I don't have any special setup, just point it to config/bootstrap.php to let symfony load the standard test environment.
Related
I've been working on setting up correctly my xdebug debugger so I can improve my soft dev process, I manage to get xdebug working with phpstorm for some files that are outside of the project as in the first picture. But when it comes to debug some of the files that are inside of my mvc project (my app folder) I can set my debbuger to work properly and as far as now Im kind of stuck so any help would be welcome.
When I debbug phptest.php it work perfectly because it's an easy mapping
But when I need to debbug something like any php script on my controller folder for example, I can't get to there.
So please any ideas on how to do this.
Regards
Added a new screen shot of my mappings settings as #rafail pointed :)
For further or similar problems, my error was that i added index.php to my excluded paths and because of that I was never be able to debug, I deleted it and now it works fine.
especial thanks to Rafail Akhmetshin for his patience help.
Resume:
Check for exclude paths
Start debugging with phpStorm button
Make sure you are listening on the port
as a note point
make sure to check/uncheck
break at first line on php code
and break on first line when no mapping
Yesterday my Web Profiler stopped working, in Symfony v.3.0.9 (on Win, with WAMP, PHP v7.0.4). Before that it worked just fine and I'm not sure exactly what happened when it stopped.
I first checked the JS errors being reported, then possible errors in dev.log, then tried clearing the cache (with cache:clear), also as an admin and also manually in file system. Nothing helped.
There are no errors returned anywhere and there are no tries from client side to even call it with AJAX. I tried restarting Apache, Wamp & Windows.
Then, I tried composer update, which naturally brought up some new, unrelated issues, and eventually I ended up installing Symfony 3.1, but still no sign of Profiler.
My HTML page does have a body, so the solution here: Web Profiler not showing up in dev doesn't help me. All other mentions of this problem usually lead to some compiling issue, which I don't have (or didn't find it yet).
I also made sure I am running in dev mode, by putting breakpoints in app_dev.php directly.
Has anyone any other/new idea what could be going on?
Addition: I also tried updating Symfony to 3.2, without Profiler appearing.
Addition #2: Just wanted to share, that the only way I can get my Web Profiler to show is, after the cache is rebuilt, go into the var/cache/dev/appDevDebugProjectContainer.php, into the getProfilerService() function and manually comment out the line with:
$instance->disable();
Ugly as hell, but I haven't find any other solution until now. At least, now I see that somehow Symfony decides, based on some internal logic, to actually not show the profiler. At least there is some logic at works.
The final answer to my "mysterious" issue was that someone in the team changed the profiler's setting in the config_dev.yml, and set the:
framework:
profiler:
collect: false
Getting that back to collect:true (which is also its default value) made it all work.
Since recently I use PhpStorm 2016.3.1 for my php projects. XAMPP works in the background and is connected to the IDE. It's a great IDE but I'm searching for a solution to run a single file in the browser.
The index file of Laravel loads over the run command perfectly. But an individual file makes a problem.
Everytime I want to open the file the browser gets me an error back that the directory to the file is wrong or the classes not found.
How can I setup that for a better workflow?
I’ve just bought a new MacBook and have made a new local development set up, and have been through PHP installation, set up for user rather than root and tested and all seems to work okay. My project is running on Smarty, which also seems to work okay.
However file_get_contents script contained in my project is returning a "failed to open stream: No such file or directory" error message. However, my file is in the right place and this script was working on my previous computer (OSX 10.11). I’ve just copied files over from the old computer rather than doing a full migration, so I’m wondering if it’s anything to do with file permissions or something rather than something wrong with my PHP installation.
Has anyone come across something similar – I’ve been wracking my brains trying to even formulate this query.
I have a problem with Symfony 2. trying the example from the book. I have written a controller but when i go to the URL specified in the route i get an error. The server can't find the page. When i run app_dev.php i get an error that the file boostrap.php.cache is missing.
searched on the internet but found nothing relevant so far. I don't know if the front-controller is already written or if that is something that still has to be done by me.
I can't get the application to run.
Found the solution. I followed the guidelines installing sf2 in netbeans. Instead of running the application as a local website i used the build-in server option wich gave me access to the cli commands. There i could use the command run server and all of my problems were gone.