I tryed install phpunit with netbeans and the installation done correctly! But, when a try generate the phpunit class, the follow error occurred: "The referenced parameter '--ansi' is not registered." and the file was not generated.
Anyone have any idea about this?
It happened the same to me. It seems that we were using the old phpunit-skelgen 1.2.1 version. Apparently, NetBeans 8.0.1 assumes you are using the newest version of phpunit-skelgen, that is 2.0.1.
So, you only have to update the phpunit-skelgen version, for example using this: https://phar.phpunit.de/phpunit-skelgen.phar
I copied that file to where I had my previous phpunit-skelgen.bat files: C:\xampp\php. Of course, this may vary according to your OS or your project structure.
After that, configure NetBeans to use the downloaded file instead of the old file. Something around Tools > Options in Netbeans menu.
Hope this helps!
Related
I import two different projects to PhpStorm. After that, like always I need to switch PHP version for project from 5.3 to 5.5. After doing this I saved project.
When I reopen this project I see that PhpStorm don't save this setting. I do this same operation again. But again, after reopen project I need to set proper version for project.
I check xml files in .idea folder and php version is there set to 5.5.0 . I check project.default.xml and there php version is set to 5.5.0 too.
I reinstall PhpStorm using JetBrains Toolbox but this doesn't change anything.
My OS is Ubuntu 14.04 . My project files are in my /home folder and user/group of this is www-data/www-data. My user is in group root/www-data/pmucha. There is no problem with edit files (no permission problem).
I use latest version 2017.3.5 of PhpStorm.
I can't find solution to this problem. Can someone help me ?
I'm really tired of setting PHP version every time I open project or start new one.
Do you have composer.json in these projects? Most likely yes.
Thing is: PhpStorm by default synchronizes some settings from composer.json file. It can sync your PHP Language Level as well as Source & Test roots.
Right now it looks like PHP version defined in composer.json is 5.3 or lower (5.3 is the lowest in PhpStorm) .. so PhpStorm resets your manually configured version to the provided one by composer.json. Such sync usually happens on project opening .. hence the feeling that IDE does not remember the settings.
https://blog.jetbrains.com/phpstorm/2017/07/configuring-with-composer-in-phpstorm-2017-2/
Two possible solutions:
Either put a proper minimal PHP version into your composer.json (if you are writing your code using PHP 5.5 features .. so what's the point stating the 5.3 as lowest supported -- such code will fail if run using 5.3).
For example (small part of composer.json):
"require": {
"php": ">=5.5",
...
}
Or disable such synchronisation at Settings/Preferences | Languages & Frameworks | PHP | Composer --> Synchronize IDE settings with composer.json
I'm having a problem with Netbeans 8.1 working on Symfony2 project - I don't have any code hints and autocomplete suggestions. It applies to both userland code written by me and autoloaded from vendors.
For example when I want to implement an interface, there's no hint for missing methods. I don't even get autocomplete for $this.
I already tried to clear cache directory with no success.
My Netbeans info:
Product Version: NetBeans IDE 8.1 (Build 20151231-debian-8.1)
Java: 1.8.0_111; OpenJDK 64-Bit Server VM 25.111-b14
Runtime: OpenJDK Runtime Environment 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14
Running on Ubuntu 16.04.1 LTS
Perhaps someone had that problem?
I had this problem when I excluded vendors directory in Netbeans project properties. I did it when I wanted Netbeans to use code sniffer.
Maybe you'll find it helpful information.
Upgrading to Netbeans 8.2 solved the issue (I'm not sure if it would not work with reinstallation of Netbeans 8.1).
I had to download new version from https://netbeans.org/downloads/index.html because it was not available through apt.
I have VSCode installed, but don't seem to have php - i.e. there is no "php.exe" anywhere on my computer. No guides that I can find on the web about setting VSCode up for PHP suggests that I need to download and install php itself seperately (only debuggers and linters)... my question is:
Do I need to install PHP seperately? Should I have had to do this, or is there a bug in my VSCode installation...
Yes you need to install PHP from the php website and then tell VSCode where PHP.exe is located.
VSCode is an editor not an interpreter.
I think if you install PHP at the default location VSCode will automaticly pick it up but if not you need to specify its path in options.
If you install XAMPP you will get apache,php and mySql in one installation.
EDIT: an interpreter is software that translated your code(in your case PHP) into code that the CPU can understand and then executes.
#kpollock it' not you. Yes, it should seem obvious that the language should be installed manually or separately, so you should have gotten that part, sorry. But no, there doesn't seem to be information anywhere about defining the underpinnings. This "understanding" seems to be left to the individual through research as you're doing.
After I installed PHP I manually set my environment PATH to include the PHP folder. OR in VS Code you can go to menu>File>Preferences>User Settings, the settings are maintained as a JSON object (unlike VS) and there is a PHP section for the .exe path.
Since you mentioned Node, you may not have installed Node.js manually. (I don't know if Node comes with VS Code either.) It might have come in with a VS2015 extension like Gulp or some other higher-level functionality, or maybe it was an installation option with VSC. If you can't use node or npm from a console, set your environment PATH to include it.
I have installed Netbeans 8.0 and I think he installed with php because I haven't made others installation and everything work, but now I try to make Zend Framework 2 work and I have downloaded the skeleton select it, select the composer but because it can't detect php interpreter it can't run the composer and gives an error when use zend classes.
My question is where I can find the interpreter because I look in netbeans/php and I haven't find a php.exe and also I haven't find it anywhere my pc.
You can use software like XAMPP, LAMP (both available also for linux), WAMP. All off them contain PHP. Windows packages have pretty installers.
I am trying to debug this simplepie.inc (called from index.php )which is dumping me with error during parsing one of the feed.
After stepping through the line $utf8_data = 'UTF-8'; which I hardcoded in to test things out, the value of the variable remains <Uninitialized> as shown in the screenshot below.
Why is that so?
Variables and values are showing up nicely if I am stepping through the debug in index.php thou.
alt text http://a.imageshack.us/img713/486/14jul10105825pm.jpg
There is an existing bug in the 2.0.x branch of XDebug with PHP 5.3 which prevents local variables from being visible. I would recommend updating/building either the latest version from SVN, or using a recent 2.1.x release, even if in RC/Beta status.
More information available here: http://www.eclipse.org/forums/index.php?t=tree&th=158396
This issue has bugged me for almost a year. Actually we had to set up virtual machines with ubuntu because we did not get xdebug to work on windows.
I just downloaded XAMPP 1.7.7 from www.apachefriends.org and it seams that this bug has been fixed now.
ActiveState provides precompiled versions of Xdebug for most operating systems. Package can be downloaded from this page;
http://code.activestate.com/komodo/remotedebugging/
Look for "PHP Remote Debugging Client" and download for your OS.
If you choose this option, take the xdebug.so from the appropriate PHP version directory and use it.
If you're updating a XAMMP for Mac install, it's in the XAMMP folder.
xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so
Snagged from here:
http://kubyshkin.ru/posts/installing-php-xdebug-extension-on-mac-os-x-10-7-lion.html