Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Commit

Permalink
Check for PCRE > 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Apr 27, 2012
1 parent 2b6644e commit c7c44db
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions app/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Requirement

/**
* Constructor that initializes the requirement.
*
*
* @param Boolean $fulfilled Whether the requirement is fulfilled
* @param string $testMessage The message for testing the requirement
* @param string $helpHtml The help text formatted in HTML for resolving the problem
Expand Down Expand Up @@ -102,7 +102,7 @@ class PhpIniRequirement extends Requirement
{
/**
* Constructor that initializes the requirement.
*
*
* @param string $cfgName The configuration name used for ini_get()
* @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
Expand Down Expand Up @@ -328,7 +328,7 @@ public function getFailedRecommendations()
}

return $array;
}
}

/**
* Returns whether a php.ini configuration is not correct.
Expand Down Expand Up @@ -456,6 +456,14 @@ function_exists('simplexml_import_dom'),
'Add "<strong>phar</strong>" to <strong>suhosin.executor.include.whitelist</strong> in php.ini<a href="#phpini">*</a>.'
);

$pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null;

$this->addRequirement(
null !== $pcreVersion && $pcreVersion > 8.0,
sprintf('PCRE extension must be available and at least 8.0 (%s installed)', $pcreVersion ? $pcreVersion : 'not'),
'Upgrade your <strong>PCRE</strong> extension (8.0+)'
);

/* optional recommendations follow */

$this->addRecommendation(
Expand Down

0 comments on commit c7c44db

Please sign in to comment.