I have recently upgraded to net-beans 7.4 (PHP). Afterwards I have edited a php file and tried to create a patch as we generally do in net-beans Team > Export Diff Path & Tools Drop-down as well. However I am not able to find any option there. I have attached for where I am looking for.
Is there any way to create patch on net-beans 7.4
That would only happen if somehow your sources aren't recognized by NetBeans as managed by Git (or any source control).
Export Diff Patch is clearly listed in Git support specification for NetBeans 7.4.
However, it is invoked a bit differently:
Select the project root node in "Projects" view and invoke Team | Patches | Export Uncommitted Changes... main menu action.
"Export Diff Patch" dialog shows up.
Make sure you have the mlatest version of the Git plugin in your latest NetBeans.
Related
I need to debug a drush command in a ddev project, but I don't know how to do it. In ddev v0.18.0, the PhpStorm debugger breaks at the beginning, but it can't find the associated code.
Updated 2020-12-28: This answer is obsolete since ddev already sets the PHP_IDE_CONFIG environment for you in recent versions. In general, if you've done any debugging already (which creates the .ddev.site "server"/mapping) then things should just work. Some people also prefer to use vendor/bin/drush as that skips the use of /usr/local/bin/drush, which is Drush launcher.
------- Original Answer -------
PHPStorm provides a very nice way to do this, and ddev makes it super easy with the automatic debugging setup.
This technique works best for a Drupal 8 site with drush vendored in, like you get with drupal-composer setups. It assumes that drush is vendored into vendor/drush/drush.
This PHPStorm blog post explains the technique.
Create a server in PHPStorm (Project settings->Servers). My "server" name is d8composer. It doesn't matter what you call it, you just need to use it later.
In the PHPStorm server configuration, map your host project directory to /var/www/html:
Click the "Listen for Debug Connections" button.
Click a breakpoint at a place you know should be hit by your drush command.
Inside the container (ddev ssh), export PHP_IDE_CONFIG="serverName=d8composer" - Yours will be named something other than d8composer of course.
Inside the container /var/www/html/vendor/drush/drush/drush uli (or whatever command you want). PHPStorm will break at your breakpoint. (Of course you could execute that command many ways, but the point is you need to execute the version of drush that's vendored into the repo.
On earlier versions of drupal you can actually just put a copy of drush into your repo temporarily to solve the mapping problem in the same way.
Note that Matt Glaman also wrote a blog post on Xdebug Over the Command Line with DDEV
Also check PHPStorm and uncheck “Ignore external connections through unregistered server configurations."
I have a Yii 1.x project, and i use Netbeans 8.0.2. In this website there is an admin folder in web folder. This is one netbeans project but 2 yii project with one framework (one for users, one for admins). When i am in the web folder the auto complete works, however it doesn't work in web/admin folder.
I tried everything:
-Delete cache manually - C:\Users\username\AppData\Local\NetBeans\Cache\8.0.2
-Reinstall Netbeans
-Delete the project without source code, after create a new project.
-Code completion on. (tools->option->editor->codecompletion)
-Updates
Here is my "about":
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12
System: Windows 7 version 6.1 running on amd64; Cp1250; hu_HU (nb)
User directory: C:\Users\Siki\AppData\Roaming\NetBeans\8.0.2
Cache directory: C:\Users\Siki\AppData\Local\NetBeans\Cache\8.0.2
So can i enable auto complete?
Since you are using Yii 1.x, there is a certified NetBeans plugin for Yii 1.x in its plugin repository. This plugin will provide options like
Creating new Yii project from netbeans. No need to use Terminals
Code completion.
Go to a Class file by clicking on accessible snippets.
Plug this in you NetBeans to get above benefits as well as to overcome auto code complication problem, which you mentioned in your post.
Plugin page # http://plugins.netbeans.org/plugin/47246/php-yii-framework-netbeans-phpcc
In project properties > Include path, add the folder where are the yii framework base files
Right click over the project in tab projects, then select properties
Image project properties
This enables code completion.
PhpStorm has a list of method stubs from various compile-time libraries here that it will use for autocompletion in development.
I currently have a list of stubs for the PHP AMQP PECL extension here that I would like to add to my PhpStorm build to get autocompletion for that library.
Is there any way to do this?
Just place such stub file(s) anywhere in your project (or reference in any other supported way, e.g. as Settings | Languages & Frameworks | PHP | Include path) -- IDE will use it for code completion (and similar) purposes only (so you can exclude them from uploading/VCS etc).
In long term -- you may submit the PR to the already mentioned PhpStorm stubs repository and it may become part of the standard PhpStorm distribution on next release.
January 2017 Update: You can git clone (checkout) the PhpStorm stubs repository to your local machine, and point PhpStorm to that directory. From there you can add stubs or even modify/delete existing stubs.
git clone https://github.com/JetBrains/phpstorm-stubs
Open Preferences -> Languages & Frameworks -> PHP
Click Advanced Settings at the bottom
Next to Default stubs path, click the ... and navigate to the root of your phpstorm-stubs folder
In Sublime Text 3 PHP Unit doesn't work. Bundle has installed correctly but plugin is inactive. Has anyone resolved the problem?
Thanks in advance.
I strongly suggest you to use this package which isn't available on Package Control:
Sublime-PHPUnit
You need to pull this in manually by navigating to ~/Library/Application Support/Sublime Text 3/Packages and paste it in. If you setup a few key binding, the workflow is very snappy. Watch this video for more info:
Instant PHPUnit Feedback and Workflow
At the time of writing, there is a working ST3 version in the develop branch:
https://github.com/stuartherbert/sublime-phpunit/tree/develop
I got it to work by cloning the develop branch into my {ST3}/Packages folder and then restarting ST3.
At the time when I installed the plugin (a couple of months ago), the ST3 compatible version of sublime-phpunit was not available through Package Control, which is why I installed it with git.
Hope this helps!
Try PHPUnitKit, a Sublime Text plugin for running tests on different granularities. It's available on Package Control!
FEATURES
Run Test File
Run Test Suite
Run Nearest Test
Run Last Test
Fully customisable configuration
Supports Composer installed PHPUnit
Supports colour results, diffs, errors, etc.
Jump to next and jump to previous failure
Not sure how to troubleshoot this problem. I have an IntelliJ Ultimate Edition, used in 64-bit, which I use for a PHP project with several modules. This project has 3 modules, but every time I close Intellij 11, when I open IntelliJ again, I find that the module has disappeared.
Steps that I have used to add this PHP module:
File->Add Module->Create Module From Existing Sources and I select the directory with the module.
or
File->Add Module_>Import Module from IML (I've tried importing the the module-level IML file for the disappearing module), but regardless of which I try, I still fail to retain the 3rd module on the restart of my IntelliJ and I end up having to add the module again.
Edit: A hack to get around this issue is to import the top level IML file into your project. IntelliJ will reorganize the project to show the entire tree structure of your folders.
PHPStorm handles this more effectively than IntelliJ Ultimate. I'd say, that's the only way it's not better than PHPStorm itself.
It's not intuitive, but what you need to do instead is create a new project in the directory containing your existing sources, and choose "Web Module".