This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262737 - Cannot test Symfony 3 project
Summary: Cannot test Symfony 3 project
Status: RESOLVED INVALID
Alias: None
Product: php
Classification: Unclassified
Component: Symfony (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-08 13:10 UTC by geoB
Modified: 2016-08-02 07:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample Symfony project (9.63 MB, application/zip)
2016-07-29 15:42 UTC, geoB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description geoB 2016-07-08 13:10:56 UTC
A working Symfony 2.8 project has been re-created in a Symfony 3.1 branch.  The 3.1 branch behaves as the 2.8 branch in both prod and dev environments.  Any attempt to test the 3.1 project in Netbeans results in "Fatal error: Class 'AppBundle\Tests\AppWebTestCase' not found in ...\src\AppBundle\Tests\AdminTest.php".  The error is independent of the location\namespace of AppWebTestCase.

The error occurs in both testing the entire project or running a focused test. The project tests successfully from the command line.  The 2.8 branch can be successfully tested within Netbeans.  

The failure to test occurs in Netbeans version 8.1 and development build 201607050002.
Comment 1 Tomas Mysik 2016-07-27 09:00:41 UTC
Could you please attach a sample project we can use to reproduce this issue?

Thanks.
Comment 2 geoB 2016-07-29 15:42:44 UTC
Created attachment 161492 [details]
Sample Symfony project
Comment 3 geoB 2016-07-29 15:45:29 UTC
Sample test project attached above.  Testing performed in Build 201607050002 using Windows 10 Pro 64-bit, freshly installed Symfony project with PHPUNIT configured in Netbeans.  Netbeans project directory is included in zip.
Comment 4 Tomas Mysik 2016-08-01 06:09:57 UTC
Incorrect project setup - you have set bootstrap in Project Properties dialog to a wrong file (the proper one is specified in the PHPUnit XML configuratiorn [1]). Simply uncheck the "Use Bootstrap" in your Project Properties and it will work.

Thanks for reporting.
[1] bootstrap="app/autoload.php"
Comment 5 geoB 2016-08-01 13:02:41 UTC
Thanks for the update.  Did I miss documentation of this Netbeans difference between Symfony 2 & Symfony 3?
Comment 6 Tomas Mysik 2016-08-01 13:29:45 UTC
I am not Symfony expert so perhaps they changed their bootstrap file for Symfony 3? Or your project setup was just incorrect? I do not know, sorry.
Comment 7 Tomas Mysik 2016-08-01 13:44:06 UTC
In other words, this has nothing to do with NetBeans ;)
Comment 8 geoB 2016-08-01 13:55:24 UTC
Turns out it's my faulty assumption that the checkbox for "Use bootstrap" in PHPUnit config was to be checked.  In Symfony 2, checking that box and specifying the Symfony bootstrap file, I just learned, did not prevent testing.  In Symfony 3 it does.  While I appreciate that this behavior difference is due to action on Symfony's part, is there some way to provide a notice in Netbeans documentation?  I'm happy to help.
Comment 9 Tomas Mysik 2016-08-02 07:56:33 UTC
(In reply to geoB from comment #8)
> While I appreciate that this behavior
> difference is due to action on Symfony's part, is there some way to provide
> a notice in Netbeans documentation?  I'm happy to help.

IMO the best way is to report a new issue against documentation [1]; describe what documentation text exactly should be changed, where and how.

Thanks.
[1] https://netbeans.org/bugzilla/enter_bug.cgi?product=usersguide