Browse Source

Merge branch 'master' of https://github.com/yiisoft/yii2

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
909bbe62b0
  1. 2
      build/build
  2. 7
      tests/unit/framework/caching/ApcCacheTest.php
  3. 4
      yii/requirements/requirements.php
  4. 6196
      yii/requirements/views/web/css.php
  5. 118
      yii/requirements/views/web/index.php

2
build/build

@ -11,7 +11,7 @@
// fcgi doesn't have STDIN defined by default // fcgi doesn't have STDIN defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
require(__DIR__ . '/../framework/Yii.php'); require(__DIR__ . '/../yii/Yii.php');
$id = 'yiic-build'; $id = 'yiic-build';
$basePath = __DIR__; $basePath = __DIR__;

7
tests/unit/framework/caching/ApcCacheTest.php

@ -31,7 +31,8 @@ class ApcCacheTest extends CacheTest
return $this->_cacheInstance; return $this->_cacheInstance;
} }
// TODO there seems to be a problem with APC returning cached value even if it is expired. public function testExpire()
// TODO makes test fail on PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) -- cebe {
// TODO http://drupal.org/node/1278292 $this->markTestSkipped("APC keys are expiring only on the next request.");
}
} }

4
yii/requirements/requirements.php

@ -7,9 +7,9 @@ return array(
array( array(
'name' => 'PHP version', 'name' => 'PHP version',
'mandatory' => true, 'mandatory' => true,
'condition' => version_compare(PHP_VERSION, '5.3.0', '>='), 'condition' => version_compare(PHP_VERSION, '5.3.3', '>='),
'by' => '<a href="http://www.yiiframework.com">Yii Framework</a>', 'by' => '<a href="http://www.yiiframework.com">Yii Framework</a>',
'memo' => 'PHP 5.3.0 or higher is required.', 'memo' => 'PHP 5.3.3 or higher is required.',
), ),
array( array(
'name' => 'Reflection extension', 'name' => 'Reflection extension',

6196
yii/requirements/views/web/css.php

File diff suppressed because it is too large Load Diff

118
yii/requirements/views/web/index.php

@ -3,80 +3,68 @@
/* @var $summary array */ /* @var $summary array */
/* @var $requirements array[] */ /* @var $requirements array[] */
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta charset="utf-8"/>
<meta http-equiv="content-language" content="en"/> <title>Yii Application Requirement Checker</title>
<style type="text/css"> <?php $this->renderViewFile(dirname(__FILE__).DIRECTORY_SEPARATOR.'css.php'); ?>
<?php $this->renderViewFile(dirname(__FILE__).DIRECTORY_SEPARATOR.'css.php'); ?>
</style>
<title>Yii Application Requirement Checker</title>
</head> </head>
<body> <body>
<div id="page"> <div class="container">
<div class="header">
<div id="header"> <h1>Yii Application Requirement Checker</h1>
<h1>Yii Application Requirement Checker</h1> </div>
</div><!-- header--> <hr>
<div id="content">
<h2>Description</h2>
<p>
This script checks if your server configuration meets the requirements
for running Yii application.
It checks if the server is running the right version of PHP,
if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.
</p>
<h2>Conclusion</h2> <div class="content">
<p> <h3>Description</h3>
<?php if ($summary['errors']>0): ?> <p>
Unfortunately your server configuration does not satisfy the requirements by this application. This script checks if your server configuration meets the requirements
<?php elseif ($summary['warnings']>0): ?> for running Yii application.
Your server configuration satisfies the minimum requirements by this application. Please pay attention to the warnings listed below if your application will use the corresponding features. It checks if the server is running the right version of PHP,
<?php else: ?> if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.
Congratulations! Your server configuration satisfies all requirements. </p>
<?php endif; ?>
</p>
<h2>Details</h2> <h3>Conclusion</h3>
<?php if ($summary['errors']>0): ?>
<strong class="text-error">Unfortunately your server configuration does not satisfy the requirements by this application.</strong>
<?php elseif ($summary['warnings']>0): ?>
<strong class="text-warning">Your server configuration satisfies the minimum requirements by this application. Please pay attention to the warnings listed below if your application will use the corresponding features.</strong>
<?php else: ?>
<strong class="text-success">Congratulations! Your server configuration satisfies all requirements.</strong>
<?php endif; ?>
<table class="result"> <h3>Details</h3>
<tr><th>Name</th><th>Result</th><th>Required By</th><th>Memo</th></tr>
<?php foreach($requirements as $requirement): ?>
<tr>
<td>
<?php echo $requirement['name']; ?>
</td>
<td class="<?php echo $requirement['condition'] ? 'passed' : ($requirement['mandatory'] ? 'failed' : 'warning'); ?>">
<?php echo $requirement['condition'] ? 'Passed' : ($requirement['mandatory'] ? 'Failed' : 'Warning'); ?>
</td>
<td>
<?php echo $requirement['by']; ?>
</td>
<td>
<?php echo $requirement['memo']; ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<table> <table class="table table-bordered">
<tr> <tr><th>Name</th><th>Result</th><th>Required By</th><th>Memo</th></tr>
<td class="passed">&nbsp;</td><td>passed</td> <?php foreach($requirements as $requirement): ?>
<td class="failed">&nbsp;</td><td>failed</td> <tr class="<?php echo $requirement['condition'] ? 'success' : ($requirement['mandatory'] ? 'error' : 'warning'); ?>">
<td class="warning">&nbsp;</td><td>warning</td> <td>
</tr> <?php echo $requirement['name']; ?>
</table> </td>
<td >
<?php echo $requirement['condition'] ? 'Passed' : ($requirement['mandatory'] ? 'Failed' : 'Warning'); ?>
</td>
<td>
<?php echo $requirement['by']; ?>
</td>
<td>
<?php echo $requirement['memo']; ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div><!-- content --> </div>
<div id="footer"> <hr>
<?php echo $this->getServerInfo().' '.$this->getNowDate(); ?>
</div><!-- footer -->
</div><!-- page --> <div class="footer">
<p>Server: <?php echo $this->getServerInfo().' '.$this->getNowDate(); ?></p>
<p>Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></p>
</div>
</div>
</body> </body>
</html> </html>
Loading…
Cancel
Save