Configuring Composer in Netbeans 7.3 - php

Netbeans claims they support Composer in Netbeans 7.3. However, I can confirm that I am running version 7.3, but there is no composer options in the PHP section of my preferences (running OSX 10.8.4)
Is there something else I have to do to get this working?
Thanks.

just right click your project (the root of the directory tree) and you will see the composer menu

Well, turns out that for some reason in OSX, it didn't install the Composer module. Don't know why, in Windows, it was installed from the get go. I had to install it from plugins, and I had initially missed it because it was titled "PHP Composer" and I was looking for simply "Composer"

Related

PHP error while installing composer

I tried to install composer on windows 10, I opened the composer.exe and clicked next until I arrived to choose PHP command-line for it, so I selected php 7.0 from the dropdown menu and clicked next. then I faced with an error displaying in this screenshot.
please help me to solve this problem and tell me what should I do to install composer with PHP 7.0 command-line using.
use composer.phar
It's more comfy as it's portable solution
there was a file MSVCP140.dll missed from my PC that is required by php_intl.dll extension file.
I installed it on my windows then I restart my PC and installed Composer.exe without any errors :)
click here to learn how to install .dll files on windows.

Composer reading wrong PHP version (ACQUIA DEV DESKTOP on WINDOWS)

I am trying to install a library https://github.com/thephpleague/csv via composer but getting following errors i.e
'This package requires php >= 5.5.9 but your php version <5.4.45> does not satisfy that requirement.'
My current PHP version is 5.6.30 but for some reason composer is showing <5.4.45> which is strange.
I am using ACQUIA DEV DESKTOP on WINDOWS and can switch between PHP versions easily and can check PHP version either by a) dpm(phpinfo()); or b) drush php which is showing same version as set in ACQUIA DEV DESKTOP.
This leads to an issue linked with the composer as it's reading a wrong PHP version.
Steps I have followed to install this library i.e
Copied composer.phar file from 'DevDesktop/tools' folder onto my Drupal project root and then via drush used 'composer require league/csv' which gives me this error ....
'This package requires php >= 5.5.9 but your php version <5.4.45> does not satisfy that requirement.'
'drush php' gives me this... 'Psy Shell v0.8.3 by Justin Jileman'
I have checked online resources for the similar errors but none of the solution out there matches my situation hence posting this question.
Not sure if this is linked to the issue but I have noticed 'DevDesktop\tools\drush.bat' have first line i.e
IF "%PHP_ID%"=="" (SET PHP_ID=php5_5)
which I changed to
IF "%PHP_ID%"=="" (SET PHP_ID=php5_6)
Stack stop/start and tried to download 'composer require lease/csv' but no change (same results).
Thanks in advance.
Found a solution for this error and wanted to share so as it helps anyone else having same problem and possibly improve the solution as it seems to be a quick fix while it should be a universal fix :)
If you install Acquia DevDesktop software, composer comes with this by default.
From Acquia DevDesktop software, we can easily switch between php versions and can also set a default php version but that was not helpful when I try to download library via composer which kept on reading version 5.4.
As Acquia DevDesktop supports different PHP versions i.e 5.3, 5.4, 5.5, 5.6, 7. By default composer was reading php version 5.4 and I still need to find the file which needs to be modified so as default php version can be changed for composer.
In my case what I did was...
Go to Program Files > DevDesktop > tools folder.
There are 4 files having different extensions but same name i.e 'composer'. Remove these all files will remove composer from your system.
Download composer.exe from https://getcomposer.org/ and give it a target folder i.e 'Program Files > DevDesktop > php5_6' and install.
Once installed, now go to your project and by using command prompt or drush console, type 'composer require league/csv' which should download all files in your projects 'vendor' folder.

How to use symfony2 commands in Eclipse

I just switched from NetBeans to Eclipse (PDT). I am using Kubuntu 14.10. I really love it, but I can't get an important feature working: composer and other (symfony2) commands.
I've tried to run composer update (using this great plugin), but I'm getting this error:
[bundle] requires ext-curl * -> the requested PHP extension curl is missing from your system.
It's working in NetBeans, so it's installed. For some reason, Eclipse doesn't recognize it.
How can I the CLI in Eclipse, so I can run commands? That solves one of my problems and helps me finding out why Eclipse can't find the Curl extension.
Update: composer is working
I've installed php5-curl, so composer is running fine. For some reason that packages wasn't needed to run composer in NetBeans, but it is in Eclipse.
So part of my problem is solved, but I still don't know what the best way of running (Symfony2) commands is.
Eclipse does not necessarily use the same PHP that NetBeans used. Or the configuration differs. If that extension is reported to be missing, that's exactly what the problem is with the PHP you are using when running the command.
Find the location of the php.ini file by running php -i or phpinfo() (in a script on the command line, just like you run Composer) , and add the curl extension there.
If you are linux/macports user, you have to enable "use system default php.ini configuration" in preferences/php/php executables.

How can I find out the missing phpunit-skelgen in xampp for netBeans?

I install the xampp 3.2.1 and netBeans 8.0 last night, trying to make some Yii framework projects.
I try to config the phpUnit for netBeans and open tools->options->php->framework&tools
asking me for the phpunit script and I found out where it is, c:\xampp\php\phpunit.bat
but the next one is phpunit-skelgen, which I don't know where to find...
phpunit-skelgen in XAMPP for Netbeans can be added by using XAMPP shell.
Go to XAMPP shell by opening XAMPP control panel and click the Shell button.
Type pear install phpunit/PHPUnit_SkeletonGenerator. Press Enter to install phpunit-skelgen.
Open Tools > Options > Frameworks and Tools. Click Search button alongside the Skeleton Generator Script. If phpunit_skeletongenerator has been installed successfully, it will show C:\xampp\php\phpunit-skelgen.bat.

Linux / Ubuntu cannot find JVM

I'm trying to install Netbeans to learn PHP.
I chose the all option from here
https://netbeans.org/downloads/index.html>
And when I tried installing it on terminal, it said I needed JDK 7. After downloading and installing JDK 7 from
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I tried to install netbeans again and it gave me the same message; that JDK is not installed and I need to install it.
What should I do to get netbeans to isntall?
Did you try using the Package manager? You should already have a JRE installed by default, but you should be able to use:
sudo apt-get install openjdk-7-jdk
To verify that you actually installed Java on your system you can try:
java -version
Once you have that you should be able to run netbeans by using the netbeans.sh script in the bin/ of the netbeans download. If I remember correctly it doesn't really install anything, just runs from there.

Categories