KO
|
EN
gitlite — search
Search
#php
#java
#python
#opencv
#ruby
#c-plus-plus
#linux
#erlang
#javascript
#tutorial
#c
#hacktoberfest
requirements
★ 23
Open GitHub ↗
Requirements checker
Download README (.md)
Explore Similar Repositories
yii-auth-client
:
Yii Framework external authentication via OAuth and OpenID Extension
db-redis
:
Yii DBAL Redis connection
db-elasticsearch
:
Yii Framework Elasticsearch Query and ActiveRecord
yii-debug-viewer
:
Debugger frontend
db-mongodb
:
Yii Framework MongoDB extension
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
requirements
?
Download (.md)
<p align="center"> <a href="https://github.com/yiisoft" target="_blank"> <img src="https://yiisoft.github.io/docs/images/yii_logo.svg" height="100px" alt="Yii"> </a> <h1 align="center">Yii Requirements Checker</h1> <br> </p> [](https://packagist.org/packages/yiisoft/requirements) [](https://packagist.org/packages/yiisoft/requirements) [](https://github.com/yiisoft/requirements/actions/workflows/build.yml) [](https://codecov.io/gh/yiisoft/requirements) [](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/requirements/master) [](https://github.com/yiisoft/requirements/actions/workflows/static.yml?query=branch%3Amaster) [](https://shepherd.dev/github/yiisoft/requirements) The package allows to check if a certain set of defined requirements is met. ## Requirements - PHP 7.4 or higher. ## General usage Requirements checker could be used either from web or from command line. First, create `requirements.php` file: ```php <?php require_once('vendor/yiisoft/requirements/src/RequirementsChecker.php'); use Yiisoft\Requirements\RequirementsChecker; $requirementsChecker = new RequirementsChecker; // Add here the conditions that must be verified $config = [ [ 'name' => 'PHP version', 'mandatory' => true, 'condition' => version_compare(PHP_VERSION, '7.4.0', '>='), 'by' => '<a href="https://www.yiiframework.com">Yii Framework</a>', 'memo' => 'PHP 7.4.0 or higher is required.', ], [ 'name' => 'PDO MySQL extension', 'mandatory' => false, 'condition' => extension_loaded('pdo_mysql'), 'by' => 'All DB-related classes', 'memo' => 'Required for MySQL database.', ], [ 'name' => 'Intl extension', 'mandatory' => false, 'condition' => $requirementsChecker->checkPhpExtensionVersion('intl', '1.0.2', '>='), 'by' => '<a href="https://secure.php.net/manual/en/book.intl.php">Internationalization</a> support', 'memo' => 'PHP Intl extension 1.0.2 or higher is required.' ], ]; $result = $requirementsChecker ->check($config) ->getResult(); $requirementsChecker->render(); exit($result['summary']['errors'] === 0 ? 0 : 1); ``` And now it could be either put to webroot or executed as: ```shell php requirements.php ``` ## Documentation - [Internals](docs/internals.md) If you need help or have a question, the [Yii Forum](https://forum.yiiframework.com/c/yii-3-0/63) is a good place for that. You may also check out other [Yii Community Resources](https://www.yiiframework.com/community). ## License The Yii Requirements Checker is free software. It is released under the terms of the BSD License. Please see [`LICENSE`](./LICENSE.md) for more information. Maintained by [Yii Software](https://www.yiiframework.com/). ### Support the project [](https://opencollective.com/yiisoft) ### Follow updates [](https://www.yiiframework.com/) [](https://twitter.com/yiiframework) [](https://t.me/yii3en) [](https://www.facebook.com/groups/yiitalk) [](https://yiiframework.com/go/slack)