This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269394 - Composer not seeing correct php version
Summary: Composer not seeing correct php version
Status: REOPENED
Alias: None
Product: php
Classification: Unclassified
Component: Composer (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-19 13:43 UTC by theub
Modified: 2017-01-03 14:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
PHP Interpeter (64.71 KB, image/png)
2017-01-03 14:14 UTC, theub
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theub 2016-12-19 13:43:59 UTC
Running composer in IDE returns:
"/usr/local/bin/php" "/usr/local/bin/composer" "--ansi" "--no-interaction" "update" "--no-dev"
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php >=5.6.4 but your PHP version (5.5.38) does not satisfy that requirement.

Run same command on command line works. 

wes$ /usr/local/bin/php -v
PHP 7.0.14 (cli) (built: Dec  8 2016 23:34:17) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
Comment 1 theub 2016-12-20 13:24:03 UTC
To clarify, the issue happens when right clicking on the project, selecting composer then update or install
Comment 2 theub 2016-12-21 22:04:58 UTC
Same issue appears when trying to run PHPunit tests by right clicking. I have set the php path to /usr/local/bin/php but the IDE keeps wanting to use /usr/bin/php. My path variables are correct.
Comment 3 Tomas Mysik 2017-01-02 09:18:45 UTC
(In reply to theub from comment #2)
> I
> have set the php path to /usr/local/bin/php

Where exactly?

> but the IDE keeps wanting to use
> /usr/bin/php.

Again, where exactly?

Simply reopen this issue, thanks.
Comment 4 theub 2017-01-03 14:14:26 UTC
Created attachment 163330 [details]
PHP Interpeter
Comment 5 theub 2017-01-03 14:21:54 UTC
Output in Netbeans terminal:
dev-imac:Kenshoo wes$ php -v                                                                                                                                                                                                                                                  
PHP 7.0.14 (cli) (built: Dec  8 2016 23:34:17) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies


Right clicking on project, selecting composer and update:
Output in Output window:
"/usr/local/bin/php" "/usr/local/bin/composer" "--ansi" "--no-interaction" "update" "--no-dev"
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit 5.7.4 requires php ^5.6 || ^7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
    - phpunit/phpunit 5.7.4 requires php ^5.6 || ^7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
    - Installation request for phpunit/phpunit 5.7.4 -> satisfiable by phpunit/phpunit[5.7.4].

Done.

Running command in Netbeans terminal, "/usr/local/bin/php" "/usr/local/bin/composer" "--ansi" "--no-interaction" "update" "--no-dev":

dev-imac:Kenshoo wes$ "/usr/local/bin/php" "/usr/local/bin/composer" "--ansi" "--no-interaction" "update" "--no-dev"
Loading composer repositories with package information
Updating dependencies
Nothing to install or update
  - Removing phpunit/phpunit (5.7.4)
  - Removing myclabs/deep-copy (1.5.5)
  - Removing phpspec/prophecy (v1.6.2)
  - Removing phpdocumentor/reflection-docblock (3.1.1)
  - Removing phpdocumentor/type-resolver (0.2.1)
  - Removing phpdocumentor/reflection-common (1.0)
  - Removing webmozart/assert (1.2.0)
  - Removing phpunit/php-code-coverage (4.0.4)
  - Removing phpunit/php-token-stream (1.4.9)
  - Removing sebastian/code-unit-reverse-lookup (1.0.0)
  - Removing phpunit/php-file-iterator (1.4.2)
  - Removing phpunit/php-timer (1.0.8)
  - Removing phpunit/phpunit-mock-objects (3.4.3)
  - Removing phpunit/php-text-template (1.2.1)
  - Removing doctrine/instantiator (1.0.5)
  - Removing sebastian/comparator (1.2.2)
  - Removing sebastian/diff (1.4.1)
  - Removing sebastian/environment (2.0.0)
  - Removing sebastian/exporter (2.0.0)
  - Removing sebastian/global-state (1.1.1)
  - Removing sebastian/object-enumerator (2.0.0)
  - Removing sebastian/recursion-context (2.0.0)
  - Removing sebastian/resource-operations (1.0.0)
  - Removing sebastian/version (2.0.1)
  - Removing symfony/yaml (v3.2.1)
Writing lock file
Generating autoload files

Same issue occurs when trying to run Test in IDE:
"/usr/local/bin/phpunit" "--colors" "--log-json" "/var/folders/xk/39cwzxsj4_l_d6v4lyv0sx3h0000gr/T/nb-phpunit-log.json" "--bootstrap" "/Users/wes/Documents/Work/Projects/Dygen/Kenshoo/tests/autoload.php" "--coverage-clover" "/var/folders/xk/39cwzxsj4_l_d6v4lyv0sx3h0000gr/T/nb-phpunit-coverage.xml"
This version of PHPUnit is supported on PHP 5.6, PHP 7.0, and PHP 7.1.
You are using PHP 5.5.38 (/usr/bin/php).
Done.