Question

I am created a Symfony2 project in NetBeans 7.3 .

The project created successfully but NetBeans shows syntax errors in some of vendor package files of my Symfony2 project.

All things that i did was :

1.Download netbeans 7.3(php) and install it.

2.Download "Symfony 2.3.2 with vendors" zip file.

3.Insert into tools-->Symfony2 the adress of zip file.

4.Created the project.

Errors are from 5 or 6 file on vendor package files , some of them are PHP files and others are twig files.

snapshot of netbeans

i apperciate for any bit of help.thansk

Was it helpful?

Solution

Netbeans will show errors in some of the vendor files because, well, they contain "errors". For example, under the Sensio generator bundle, there are some template type controller files with a php extension. The files themselves are not valid php and hence get flagged by netbeans.

It is annoying but it's just something you have to ignore. Or maybe coax the vendors to tweak their code. Some folks are trying to get netbeans to skip these sorts of errors but no luck so far.

More info here: https://netbeans.org/bugzilla/show_bug.cgi?id=226954

OTHER TIPS

As Cerad pointed, those files are not valid PHP files (for instance, skeleton files).

In Netbeans 7.3 you can ignore folders which means Netbeans won't show them in the UI or index or scan them.

So, If you don't need to work with those files, just go to projects properties -> Ignore folders, and add the problematic folders there (in your case, "vendors").

More info: https://blogs.oracle.com/netbeansphp/entry/ignored_folders_sure

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top