JavaScript Settings missing in PHP project settings - php

I'm using Netbeans 7.3.1.
I can see JavaScript Files section in my Netbeans projects settings when I create a HTML5 project.
But I want the same for my PHP projects. after all I want to be able to add dependencies as easily as I could, when using HTML5 project.
Is there a workaround to show JavaScript files in PHP projects?
Regards,

Related

How to add External Dependencies to a PHP project?

While trying out the VSCode on my PHP projects, I couldn't find an option/setting/extension that would allow me to add an external library and show any autocomplete tips based on the included code.
This feature is present in PHPStorm out of the box.
Am I missing something or VSCode really doesn't support this yet?
To add an external dependency you can use the VSCode multiroot workspace feature.
The File > Add Folder to Workspace... command brings up an Open Folder
dialog to select the new folder.
https://code.visualstudio.com/docs/editor/multi-root-workspaces#_adding-folders

Eclipse for PHP, how to make it to include downloaded files in project?

first of all I explain the reason why I try to do it.
I tried many editors/IDEs which could provide convenient syntax and variables check. Eclipse did the best.
But it works correctly only if I work with its project, otherwise there are a lot of glitches and no correct support of syntax suggestion/auto-complete.
I set my FTP client to download files into project's folder, but Eclipse does not recognize them as a part of this project so I still don't have it's full support. If I create PHP files with Eclipse in the same folder it works just fine. Is there a way to make read all PHP files in project folder as parts of a project?
Or, if you can suggest IDE which performs syntax check/auto-complete tasks as Eclipse does please do, I check if I tried it. I can't include all CMS into project, because it is Bitrix, it can kill any IDE which can try to chew it, so I just need a reliable tool which could work as code validation of currently edited script. The perfect tool could just be set for PHP 5.6/7.1 for example and perform validation based on language rules.
If you are trying to get Eclipse php support for randomly downloaded files you can set your FTP client to download that files in project's folder. Then you open Project Explorer in Eclipse, press refresh button to get actual folders/files list, find you file in there and open it by that project explorer. That makes Eclipse to consider that file as a part of your project so auto-complete and validation works fine. Other ways of opening it does not count.

NetBeans - AngularJS project within a PHP project, all using the same git repo

I just inherited an application that is Magento with an Angular frontend. The Angular code is wholly contained within a single subdirectory of the Magento application. I can set up a PHP project in NetBeans and I get PHP autocomplete and other goodies, but no love for the Angular .js files. The goal is to have both PHP development goodies and angular development goodies. All the code is in one git repo (else this would not be an issue, I could just have two separate directory trees).
NetBeans will not let you create a project within a project. I've tried stitching the codebases together with a symlink both directions, and either git doesn't like it (refusing to treat the symlink as a directory), or NetBeans doesn't like it (still seeing the Angular files as residing with the already existent PHP project).
Anybody have any ideas? Changing the repo structure (like using a git submodule) is not an option currently.
You cannot make "a project inside a project", that is correct. :)
In your project, check if in Remote Files (next to Source Files in the Projects tab) you have the necessary JS files. If not, you have to link to them in your project.
Also what version of Netbeans are you using? It should work in the latest ones (8.1 and up) but may not work in earlier (8.0 and below).

Automatic FTP synchronization with PhpStorm

I'm trying out PHPStorm by Jetbrains at the moment, which I think is an awesome IDE.
The only complain I have is that Im always in fear that I will overwrite changes other people made.
I'm currently working on a project without Git, just pure FTP. If I start PHPstorm, the first thing I have to do is synchronize my local files manually using the "Compare with local version..." dialog, which takes a lot of time at bigger projects.
Is it possible that PhpStorm behaves like Eclipse Remote Explorer?
It would be awesome if PhpStorm would check the file I just opened for a newer version on my default remote and replaces it automatically.
In the Tools > Deployment > Options dialog, you will see the following option:
Changing these options will allow you to customize how your uploads are pushed and when you're warned about overwriting changes

How do I get my HTML5 project in Netbeans to recognize PHP?

I have created a web page in NetBeans with Html 5 and CSS, and now I want to add a PHP file in that project, but there is no option to add a php file.
I added empty file (xxxxx.file) and renamed it xxxxx.php and added the php code there, but it doesn't recognize it as php code. It sees the file as php file.
What should I do? Should I create new PHP project and copy the html and css files from my old project to the php project to get them working all together?
You can have php files in HTML5 projects. If you are not seeing the syntax highlighting for the code make sure that your php files have the opening php tag:
<?php
Without this the exitor will not highlight it correctly
if PHP's aren't being recognised you should install the PHP plugin for Netbeans. You should go to Tools > Plugins > Available Plugins and select the ones for PHP in the list. Then, restart the IDE.
It seems there is a Netbeans bug which makes you impossible to add php files to html5 projects. The answer, as given by Netbeans people, is to create a new php project and add the html5 files there.
Here you can see the bug report on netbeans forum: https://netbeans.org/bugzilla/show_bug.cgi?id=226280

Categories