Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use PHP_VERSION instead of `phpversion()` in CI depends script.

  • Loading branch information...
commit 7327c99529be9a23cce50106c0341db9ea1f26a1 1 parent e248498
@davidpersson davidpersson authored nateabele committed
Showing with 3 additions and 11 deletions.
  1. +3 −11 tests/ci_depends.php
View
14 tests/ci_depends.php
@@ -59,14 +59,6 @@ class PhpExtensions {
);
/**
- * After instantiation holds the current PHP version.
- *
- * @see http://php.net/phpversion
- * @var string Current PHP version.
- */
- protected $_phpVersion;
-
- /**
* After instantiation holds the path to loaded PHP configuration file.
*
* @see http://php.net/php_ini_loaded_file
@@ -80,7 +72,6 @@ class PhpExtensions {
* @return void
*/
public function __construct() {
- $this->_phpVersion = phpversion();
$this->_iniPath = php_ini_loaded_file();
}
@@ -91,9 +82,10 @@ public function install($name) {
if (isset($extension['require']['php'])) {
$version = $extension['require']['php'];
- if (!version_compare($this->_phpVersion, $version[1], $version[0])) {
+
+ if (!version_compare(PHP_VERSION, $version[1], $version[0])) {
$message = " => not installed, requires a PHP version %s %s (%s installed)\n";
- printf($message, $version[0], $version[1], $this->_phpVersion);
+ printf($message, $version[0], $version[1], PHP_VERSION);
return;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.